Bernard,

DM6446 and DM355 uses a different OOB layout for NAND booting than the one used by the Linux kernels. This forces the bootloader to use a custom OOB layout since the UBL needs to be loaded by the ROM code of the SoC. The OOB layout is not only different in the position of the ECC bytes, but in the location of the OOB, which uses syndrome mode (at least on DM355, not sure on DM6446). I assume for simplicity uboot should be using the same OOB for himself and the images it writes (our bootloader uses the custom OOB only for the UBL, and the standard one for the rest of the software).

If you want to be able to burn the software from Linux, the best you can do is to modify the OOB layout of the davinci nand driver in Linux to match the one used by your u-boot, or write and small application in user space that uses a custom oob to write the nand (take a look at the nandwrite program of the mtdutils package).

Diego Dompe
RidgeRun Engineering

On Jun 25, 2008, at 9:24 AM, 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.

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to