板子是别人的,没有其uboot代码,自带uboot的nand检测和操作都正常。
我是通过
tftp 0x81000000 u-boot_dvr.bin
go 0x81000000
启动自己编译的uboot。
uboot是DVRRDK_04.00.00.03上面的,nand是MT29F2G16ABAEAWP
什么都不改,启动后出现:
NAND info: HW ECC BCH8 Selected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
NAND bus width 8 instead 16 bit
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0
*** Warning – bad CRC or NAND, using default environment
nand无法读写。
然后在uboot中代码里面强制改成16位(nand_get_flash_type函数中注释掉下面一句话)
//busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0;
能检测到了。
但是读写的时候出现
UBOOT # nand read 0x81000000 0x00280000 0x300000
NAND read: device 0 offset 0x280000, size 0x300000
Skipping bad block 0x00280000
Skipping bad block 0x002a0000
Skipping bad block 0x002c0000
Skipping bad block 0x002e0000
Skipping bad block 0x00300000
Skipping bad block 0x00320000
Skipping bad block 0x00340000
Skipping bad block 0x00360000
Skipping bad block 0x00380000
Skipping bad block 0x003a0000
Skipping bad block 0x003c0000
Skipping bad block 0x003e0000
Skipping bad block 0x00400000
Skipping bad block 0x00420000
Skipping bad block 0x00440000
Skipping bad block 0x00460000
Skipping bad block 0x00480000
Skipping bad block 0x004a0000
Skipping bad block 0x004c0000
3145728 bytes read: OK
结果读进内存的内核是错的,无法启动,提示wrong format..
user1369122:
你用的是DVRRDK的哪个版本?
大白他弟:
回复 user1369122:
你好:
uboot是DVRRDK_04.00.00.03中的
大白他弟:
回复 user1369122:
你好,2.8你指的是mcfw 2.8版本么?
下面是自带uboot的打印:
U-Boot 2010.06-dirty (Mar 23 2013 – 00:23:05)
TI8168-GP rev 2.1
HDVICP clk : 600MHzL3 Fast clk : 560MHzHDVPSS clk : 280MHzDucati M3 clk : 280MHzDSP clk : 813MHzARM clk : 987MHzDDR clk : 796MHz
———— PLL Settings ————–MAIN_N : 64, MAIN_P: 1, OSC_FREQ: 27, FAPLL_K: 8
MAIN_INTFREQ1 : 0x8, MAIN_FRACFREQ1: 0x800000, MAIN_MDIV1: 0x2MAIN_INTFREQ2 : 0xE, MAIN_FRACFREQ2: 0x0, MAIN_MDIV2: 0x1MAIN_INTFREQ3 : 0xB, MAIN_FRACFREQ3: 0x851EB8, MAIN_MDIV3: 0x2MAIN_INTFREQ4 : 0x8, MAIN_FRACFREQ4: 0x3A83A8, MAIN_MDIV4: 0x3MAIN_INTFREQ5 : 0x9, MAIN_FRACFREQ5: 0x374BC6, MAIN_MDIV5: 0xC
MAIN_MDIV6 : 0x48MAIN_MDIV7 : 0x4
——— DDR PLL ———-DDR_N : 0x3BDDR_P : 0x1DDR_MDIV1 : 0x2DDR_INTFREQ2 : 0x8DDDDR_FRACFREQ2R_N : 0xD99999DDR_MDIV2 : 0x1EDDR_INTFREQ3 : 0x8DDR_FRACFREQ3 : 0x0DDR_MDIV3 : 0x4DDR_INTFREQ4 : 0xEDDR_FRACFREQ4 : 0x0DDR_MDIV4 : 0x4DDR_INTFREQ5 : 0xEDDR_FRACFREQ5 : 0x0DDR_MDIV5 : 0x4
———-EMIF Timings (identical for 0 & 1)——-EMIF_TIM1 : 0x1779C9FEEMIF_TIM2 : 0x50608074EMIF_TIM3 : 0x009F857FEMIF_SDREF : 0x10001841EMIF_SDCFG : 0x62A73832EMIF_PHYCFG : 0x00000110
———-SW LEVEL Info (EMIF 0) ——-RD_DQS_GATE_BYTE_LANE0: 0x00000160RD_DQS_GATE_BYTE_LANE1: 0x00000178RD_DQS_GATE_BYTE_LANE2: 0x000001B3RD_DQS_GATE_BYTE_LANE3: 0x000001D6
WR_DQS_RATIO_BYTE_LANE0: 0x0000007DWR_DQS_RATIO_BYTE_LANE1: 0x0000008FWR_DQS_RATIO_BYTE_LANE2: 0x000000A2WR_DQS_RATIO_BYTE_LANE3: 0x000000B2
RD_DQS_RATIO_BYTE_LANE0: 0x00000037RD_DQS_RATIO_BYTE_LANE1: 0x00000037RD_DQS_RATIO_BYTE_LANE2: 0x00000038RD_DQS_RATIO_BYTE_LANE3: 0x0000003B
WR_DATA_RATIO_BYTE_LANE0: 0x000000BDWR_DATA_RATIO_BYTE_LANE1: 0x000000CFWR_DATA_RATIO_BYTE_LANE2: 0x000000E2WR_DATA_RATIO_BYTE_LANE3: 0x000000F2
———-SW LEVEL Info (EMIF 1) ——-RD_DQS_GATE_BYTE_LANE0: 0x0000015FRD_DQS_GATE_BYTE_LANE1: 0x00000171RD_DQS_GATE_BYTE_LANE2: 0x000001B5RD_DQS_GATE_BYTE_LANE3: 0x000001D3
WR_DQS_RATIO_BYTE_LANE0: 0x0000006FWR_DQS_RATIO_BYTE_LANE1: 0x00000087WR_DQS_RATIO_BYTE_LANE2: 0x000000A5WR_DQS_RATIO_BYTE_LANE3: 0x000000B0
RD_DQS_RATIO_BYTE_LANE0: 0x00000035RD_DQS_RATIO_BYTE_LANE1: 0x00000043RD_DQS_RATIO_BYTE_LANE2: 0x0000003FRD_DQS_RATIO_BYTE_LANE3: 0x00000038
WR_DATA_RATIO_BYTE_LANE0: 0x000000AFWR_DATA_RATIO_BYTE_LANE1: 0x000000C7WR_DATA_RATIO_BYTE_LANE2: 0x000000E5WR_DATA_RATIO_BYTE_LANE3: 0x000000F0
I2C: readyDRAM: 2 GiBNAND: HW ECC BCH8 Selected256 MiBMMC: OMAP SD/MMC: 0:,;;:;:;;;;;;;;r;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:;;;;;;;;:,;;:;:;,;:::;;;;r;;;rssiSiS552X5252525259GX2X9hX9X9XX2325S55252i5:,;;:;:;;;;;;;;:,;;:;:;;;;;;;rrssSsS52S22h52299GGAAMHMM#BBH#B#HMM#HMBA&&XX2255S2S5Si:,;;:;:;;;;;;;;;:;;r;;rsrrriiXS5S329&A&MH#BMB#A&9XXA252GXiSXX39AAMMMBB&G22S5i2SSiiiisi:,;;:;:;;;;;;r;rr2iisiih393HB#B#AA99i22irrrX3X52AGsisss2Xii2299HBMA&X2S5S5iSiisSsi:,;;:r:r;rrsrsihXSi2&##MHB&Ahh3AGHGA9G9h&#H##@@@##MAMMXXX9SSS29&&HGGX2i5iisiiisisi:,;;rrrrsSiiiA&ABH&A9GAGhAhBAMHA9HM@@@@@@@@@@@@@@@@@@@HHhAh2S2SX9&Gh22SSiisiiisiir:rrssisiS2XM##&h3AGAX&3GG3Ssr5H@M#HM2; ;2X&&&MHMB###GBB#B&XXSSs529XX55iSsisisir;rsrisSi2XHAhX99A3XXG&&XS;:,rH#HGhAS @@@@3rs2XBM@@A552&&AHA2XiisSS252SSsisSsr;issi5S22&&3iSSX292&hXsr;;:;h@&G339&S9@@@@2@MA&9&HB##Xris29ABMAAX2ir;rsSi5iss5rrsSi2XhG&9GXh399&X99i;;;;;;r#H&293H9X#@@@@@@@B&9GhAH@XrrsrsiXABHB&HG2rr;rrSiSi;:rsisS599&AA9XG&3A35r;:::;,;BMh&&2iX5A@@@@@@@&392X5GB2;;;r;iSX393A##A&Xi:::rsi;:rss552222X553&XHMhir;;::,:,h#HhGSXhG3#@@@@#AXXS2XAHA;::;;;;ss55XShBA3239r:,;;r;ii2S5SSi2i53hirsh2srr::,,,,;MMXX359&Ah3h&Si59SX99A#i:,::::;;sri2,.2r;:SGAr;,:;:;rrrrssiriXGSi::shs;;;,,,:,,rBBA9h5s5h5iS5isi2SAHB5:,,,:::;rrs5&SrisSX5Srrr:,;,r;;;;rsriSSrrrr;;5Xrr;;,:,,.,;9AA2SsisS5323XXXG9&i:.,,::;;r;;;srrrrrr;;:;:::::,;r;r;rrissrrr;:;::;s;;;;,:,,..,r293h222hXXAAGGGX;:,,,:,:,::;:;::,:,,,,…,,,,;,;;;;rrrrrrrrirr;,.,,:::::::,,,,.,;SX&ABAB2hhXir:,,.,,.,,:,,,,..,,,..,..,,,..::.:;:;;;:;;;;r;rrs;:.. ,,:::::,:,:,,.::rrsrr;;,,…….,..,….,,,,,,,…,.,,:,:.:::,::::::;;r;rrr;:…….,.,.,,:::,,……………,,::.,,,,:,::,,:,:,,,:,;:,.::,:,,,,,;;;;;;;;r;;::,…………………………;;;:;::::,:::::::,:,:,,,: ,,:,,,,,,,,,,,,,:;rrr;;:;,,,,,,,::,.,.:.,.,;s,:;;;;:;:;;;;;::::,:::,:::,:,:,:,.,,,,,,,…,,.,,………………………………:,…………:,,,:,:,,,,,
Net: Detected MACID:7c:66:9d:54:b1:daEthernet PHY: GENERIC @ 0x01DaVinci EMACHit any key to stop autoboot: 0 TI8168_EVM#
还有奇怪的是,我运行自己编译的uboot命令提示符竟然是U-BOOT
大白他弟:
回复 user1369122:
你好,问题解决了。我修改顶层Rule.make中编译选项DVR_RDK_BOARD_TYPE
改为: DVR_RDK_BOARD_TYPE := DM816X_TI_EVM
然后就一切正常了。但我还是不太懂,请问在dvr_rdk4.0的包子中这两个选项对uboot的nand驱动有啥影响?