我们公司的一款AM1808产品在正常运行了5个月时候,发生无法启动的情况,uboot输出提示内核crc校验失败,如下:
- I2C: ready
- DRAM: 128 MB
- NAND: 128 MiB
- MMC: davinci: 0
- Bad block table not found for chip 0
- Bad block table not found for chip 0
- Bad block table written to 0x000007fe0000, version 0x01
- Bad block table written to 0x000007fc0000, version 0x01
- In: serial
- Out: serial
- Err: serial
- ARM Clock : 372000000 Hz
- DDR Clock : 150000000 Hz
- Expander @ 0x20 write FAILED!!!
- RMII hardware init failed!!!
- Net: Ethernet PHY: GENERIC @ 0x00
- Hit any key to stop autoboot: 0
- U-Boot > boot
- Loading from NAND 128MiB 3,3V 8-bit, offset 0x200000
- Image Name: Linux-2.6.33-rc4
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 1945332 Bytes = 1.9 MB
- Load Address: c0008000
- Entry Point: c0008000
- ## Booting kernel from Legacy Image at c0700000 …
- Image Name: Linux-2.6.33-rc4
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 1945332 Bytes = 1.9 MB
- Load Address: c0008000
- Entry Point: c0008000
- Verifying Checksum … Bad Data CRC
- ERROR: can't get kernel image!
- U-Boot >
然后我去查看了nand上的内核分区(0x20000开始),发现其中一个bit位发生翻转了,地址再0x2f0520这里,如下:
- U-Boot > nand dump 0x2f0000
- Page 002f0000 dump:
- 39 bf 4d 1d fd 5f 6d 2b 79 f4 7f 4f 3e bf e6 b7
- a4 49 be bc fe f7 15 db 82 d9 57 66 e9 f6 8d ce
- 7b 17 28 b4 33 d4 29 1a 2c bf c1 7a 6d 13 f7 94
- 74 84 79 7a df 78 f9 e4 97 e1 f8 28 6f 58 69 f7
- d1 53 d7 c9 ca af 13 ca e5 b9 8d 60 09 b2 bf 6d
- 93 6f fe f8 98 f3 f5 c1 b1 88 67 92 f6 96 5a ee
- a2 72 e2 96 87 dd f5 72 be b1 81 eb 85 b6 87 6e
- …….
- fa 6f 18 2b 37 52 ae 0c 9e c7 3c c6 15 8d e2 3b
- 96 bd fe 52 7f b6 93 74 df 57 ae 9a ec 72 e1 c3
- de 67 8c 01 7c 97 c2 77 4e eb d8 f4 5e e2 35 ba
- e5 ba ce a8 23 cb 7c 8d f3 03 65 d9 c6 76 a7 52
- e2 21 95 ab ae d2 1e 45 ff 05 cb d0 4b d2 4a 1d
- 97 63 b9 22 ed 0c 58 b6 a1 71 33 32 f9 f4 6d f6
- a5 f4 cb 69 4f 06 2d d2 db 95 bd d3 2e d5 f4 60
上面标红色的地方是发生反转的地方,通过对比正常的板子,3c是反转后的值,38是正常的值.
然后我做了一个实验,分别执行了两次nboot.e 0xc0700000 0 0x200000,然后都把ram里对应的数据打印出来,发现了一个奇怪的现象,如下:
第一次执行nboot.e后ram的数据:
- U-Boot > nboot.e 0xc0700000 0 0x200000
- Loading from NAND 128MiB 3,3V 8-bit, offset 0x200000
- Image Name: Linux-2.6.33-rc4
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 1945332 Bytes = 1.9 MB
- Load Address: c0008000
- Entry Point: c0008000
- U-Boot > md.b 0xc07f0520
- c07f0520: fa 6f 18 2b 37 52 ae 0c 9e c7 3c c6 15 8d e2 3b .o.+7R….<….;
- c07f0530: 96 bd fe 52 7f b6 93 74 df 57 ae 9a ec 72 e1 c3 …R…t.W…r..
- c07f0540: de 67 8c 01 7c 97 c2 77 4e eb d8 f4 5e e2 35 ba .g..|..wN…^.5.
- c07f0550: e5 ba ce a8 23 cb 7c 8d f3 03 65 d9 c6 76 a7 52 ….#.|…e..v.R
- U-Boot >
第二次执行nboot.e后ram里的数据:
- U-Boot > nboot.e 0xc0700000 0 0x200000
- Loading from NAND 128MiB 3,3V 8-bit, offset 0x200000
- Image Name: Linux-2.6.33-rc4
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 1945332 Bytes = 1.9 MB
- Load Address: c0008000
- Entry Point: c0008000
- U-Boot > md.b 0xc07f0520
- c07f0520: fa 6f 18 2b 37 52 ae 0c 9e c7 38 c6 15 8d e2 3b .o.+7R….8….;
- c07f0530: 96 bd fe 52 7f b6 93 74 df 57 ae 9a ec 72 e1 c3 …R…t.W…r..
- c07f0540: de 67 8c 01 7c 97 c2 77 4e eb d8 f4 5e e2 35 ba .g..|..wN…^.5.
- c07f0550: e5 ba ce a8 23 cb 7c 8d f3 03 65 d9 c6 76 a7 52 ….#.|…e..v.R
- U-Boot >
此时这个发生反转的bit位被校正回来了,那么为什么第一次的时候没有校正,第二次就可以?这个实验每次现象都一样,问题出在了第一次从nand读到ram的时候没有校验成功,第二次在读的时候就可以了,希望TI的达人帮忙分析下原因,谢谢!
目前在用的软件版本:
uboot.2009.11
linux.2.6.33
硬件:
AM1808D4 ,K9F1G08U0D,镁光DDR2
jie luo3:
难道就只有我遇到这个问题了吗?
jie luo3:
TI的FAE达人们都去哪里了呢???
Jack Wang1:
回复 jie luo3:
我也遇到了这个问题,也是读一次是crc校验错误,再读一次就正常了
Jack Wang1:
回复 jie luo3:
请问您有解决这个问题了吗?我公司现在外面产品出现大批量爆发出来了,都是用了比较久的设备,有时候新出厂没多久也会出现这个问题。