I have a problem writing a new kernel image into the nand from Linux. We need this for an update procedure.
I used "nandwrite -s 0x200000 -p /dev/mtd3 uImage_new" ("-s 0x200000" because i dont want to destroy the working kernel). I reboot our board and load the new kernel with nand "read 0x81000000 0x480000 0x200000;bootm 0x81000000" (0x280000 is partition start for /dev/mtd3). The Result is:
NAND read: device 0 offset 0x480000, size 0x200000
ECC: uncorrectable.
ECC: uncorrectable.
ECC: uncorrectable.
....
NAND read from offset 480000 failed -74
2097152 bytes read: ERROR
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux-2.6.37+
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2038324 Bytes = 1.9 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
In spite of the ECC-errors the Kernel boots up correct. So the payload ar correct.
I checked the OOB-Data of the first block after writing from Linux and from uboot. There are some differences:
nandwrite from Linux:
OOB Data: ff ff 10 8c 40 b2 00 48 60 35 68 86 1a 01 08 00 |....@..H`5h.....|
OOB Data: 00 0e d1 90 12 08 04 10 68 06 10 8b 08 00 00 0a |........h.......|
OOB Data: 40 e0 10 48 20 18 08 04 00 5b 00 00 00 08 81 e2 |@..H ....[......|
OOB Data: 12 08 64 21 40 84 0a 19 02 00 ff ff ff ff ff ff |..d!@...........|
nandwrite from uboot:
OOB Data: ff ff 59 cc 66 b2 8c 5a fa 37 e8 8e ff 01 bc 00 |..Y.f..Z.7......|
OOB Data: c5 5e f5 99 5a 88 1e 52 7c 77 d0 ab ad 00 87 1b |.^..Z..R|w......|
OOB Data: 6e e1 5d 4a 20 5a 19 15 c5 5f b1 00 af 49 ad eb |n.]J Z..._...I..|
OOB Data: df 18 fe a1 55 ec ab 3d 23 00 ff ff ff ff ff ff |....U..=#.......|
Board-Data:
CPU: DM8168
Board: custom derived from the EVM
NAND: Micron MT29F1G08
EZSDK: 5_05_02_00
UBoot: u-boot-04.04.00.02
Linux: linux-04.04.00.02
There are some commits in the omap3 tree with a nand correlation after version 04.04.00.02: http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog
Are they possible notable?