[U-Boot] Skipping bad blocks while reading and writing JFFS2 image to NAND flash

Fei, Yiyang YiYang.Fei at barco.com
Thu Feb 10 02:26:50 CET 2011


Hi,

 

When writing a JFFS2 image to NAND flash, any bad blocks in the BBT is
skipped.  However, while scanning a JFFS2 partition, bad blocks are not
skipped.  Is this intended or am I mis-configuring u-boot somehow?

 

I'm using the 2010.12 u-boot source code.  The BBT table for my system
includes the following bad blocks...

Bad block table found at page 524224, version 0x03

Bad block table found at page 524160, version 0x03

nand_read_bbt: Bad block at 0x000000d40000

nand_read_bbt: Bad block at 0x00002bb40000

nand_read_bbt: Bad block at 0x00002bb60000

nand_read_bbt: Bad block at 0x00002fec0000

nand_read_bbt: Bad block at 0x00003b6a0000

nand_read_bbt: Bad block at 0x00003ff40000

 

Offset 0xD40000 is in the middle of my JFFS2 partition, which contains
my kernel image.  During boot, when the JFFS2 partition is loaded, I see
the following errors:

In:    serial

Out:   serial

Err:   serial

### JFFS2 loading 'netviz_core_fpga.bit' to 0x1000000

Scanning JFFS2 FS: .  

read_nand_cached: error reading nand off 0xd40000 size 8192 bytes

 done.

### JFFS2 load complete: 9232568 bytes loaded to 0x1000000

 

I traced the code path while writing and reading NAND.  The "nand write"
command eventually calls the nand_write_skip_bad() function in
nand_util.c which is why it was skipping the bad blocks; this is what I
think should happen.  However, the JFFS2 code directly calls nand_read()
function instead.  What should be the correct behavior?

 

Thanks,

Yiyang Fei



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.


More information about the U-Boot mailing list