[#4285] Enabling CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC will introduce more and more NAND flash bad blocks.
Submitted By: Bryan Wu
2008-07-28 05:20:02 Close Date
Closed Fixed In Release:
Found In Release:
N/A Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: Enabling CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC will introduce more and more NAND flash bad blocks.
When CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC enabled, after some NAND flash writing operation such as erasing/mount YAFFS2/write something to YAFFS2, it will introduce more and more NAND flash bad blocks.
It was found in branch 08r1, but I guess it can also be found in trunk. When I disable the CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC, the bug is gone.
--- Mike Frysinger 2008-07-28 05:38:30
this isnt a bug. the different layout uses a different byte in the spare page
to mark the block bad. if you want to switch layouts on a NAND device, you need
to scrub it and redetect bad blocks.
--- Mike Frysinger 2008-07-28 05:58:23
also, this has been documented here:
--- Bryan Wu 2008-07-28 06:23:04
Right, we got your point here. So if people want to try boot U-BOOT from NAND
and Linux kernel supporting that kind NAND operation, they should do following
1. U-BOOT enable CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC and compile the U-boot
2. use this U-Boot to scrub the whole NAND device
3. Linux kernel enable CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC and compile the
4. Programing the U-boot and kernel image to NAND by U-Boot
5. Let bootrom boot U-boot, u-boot to boot kenrel.
6. When kernel boots up, we can program the NAND device in Linux kernel.
Right? I think so.
--- Mike Frysinger 2008-07-28 06:38:15
i think you can use userspace nand tools to also do the scrubbing step, but
generally yes, you've got the idea. it's a pain :/.
--- Bryan Wu 2008-07-28 09:33:31
Oh, how to scrub in Linux userspace?
I just found eraseall, erase, flashcp, nanddump and nandtest.
--- Mike Frysinger 2008-07-28 11:19:57
no idea ... i just assumed you could somehow
File Name File Type File Size Posted By
No Files Were Found