[U-Boot] Can't read kernel if bad blocks are present in partition

Peter Barada
2012-04-27T14:29:47Z

On 04/27/2012 03:16 AM, Alexandre Gambier wrote:
> Hi,
>
>
>>> Did you use "nand write.i" to write the kernel and "nand read.i" to
>>> read the kernel? the ".i" tells u-boot to skip bad blocks...
> No I use "nand read $load_addr AppKernel" cause I didn't know we can use
> "nand read.i" - "help nand" doesn't display this information.
> I tried "nand read.i" and now it works fine but I still can't boot the
> kernel cause its crc is wrong I will flash the kernel again with "nand
> write.i" and check if it works.
Assuming you load the kernel to ram with tftp (and that "AppKernel" is
an mtdparts partition in NAND), then you could do:

nand erase.part AppKernel
tftp $load_addr uImage
crc32 $load_addr $filesize
nand write.i $load_addr AppKernel $filesize
nand read.i $load_addr AppKernel $filesize
crc32 $load_addr $filesize

To verify the CRCs match between what you load off tftp and what you
read back from NAND.

--
Peter Barada
peter.barada at logicpd.com