Bernard Blackham wrote: > U-boot: 1.3.3 > Linux kernel: 2.6.24 + patches to approximate current git > NAND: 256MiB with 128KiB blocks and 2KiB pages > > I tried flashing a kernel image into NAND on an mtd device using the > nandwrite utility from within Linux. u-boot cannot read the image > and it fails with "read error". > > If I flash the image with u-boot's nand write, u-boot can boot it. > Reading it from Linux generates loads of correctable and > uncorrectable bitflip errors in dmesg. Also, comparing the result > read through Linux with the original image indeed shows a whole > bunch of bit flips all over the place (but with no pattern or > regularity). > > This leads me to believe that perhaps the ECC layouts used by u-boot > and the kernel differ slightly. It seems that u-boot defines a > custom nand_oobinfo in davinci_nand_oobinfo. However, the > davinci_nand driver in the kernel does not and I gather it uses the > defaults in nand_base.c, which are significantly different. Should > these be both using the same ECC layout? > > Has anybody else run into this, or am I doing something silly? All I > want to be able to do is drop a new kernel in for u-boot but from > Linux. > > TIA, > Bernard.
Not only are the ECC bytes stored in different locations in the spare area, but the ECC value stored is also different. (davinci-git vs U-boot) I've modified both the linux kernel, and u-boot to store the ecc at the end of the spare bytes. But I haven't pushed this anywhere. It's pretty trivial to make U-Boot use the same ECC algorithm as the davinci-git tree. Troy _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
