[Yaffs1] mkyaffs exits with "MTD Erase failure"

Martin Egholm Nielsen martin at egholm-nielsen.dk
Mon Jun 4 10:36:23 EDT 2007


Hi,

Ricard Wanderlof wrote:
> On Mon, 4 Jun 2007, Martin Egholm Nielsen wrote:
>> I have run into a problem: By "accident", we changed the die of our
>> NAND without paying attention to the new timing parameters. Hence,
>> the read-operation (with fixed timing!) reported ready before data
>> was actually ready on the NAND. Consequently, this caused checksum 
>> errors, and several blocks was erroneously marked bad!
>> 
>> So, I fixed the timing in the kernel and tried erasing the flash
>> again. But with no luck - mkyaffs refuses to erase/program the
>> flash:

> Mtd refuses to erase blocks that have been marked bad. There is no 
> workaround on a running kernel, but it is possible to patch the
> kernel to do this.

But as you see, flash_eraseall on the same device works perfectly fine:

flash_eraseall /dev/mtd0
....
Skipping bad block at 0x0179c000
Erasing 16 Kibyte @ 1ffc000 -- 99 % complete.


> The patch depends on whether or not you have a flash-based bad block
> table. Most do, but my only experience has been without the
> flash-based BBT. In this case, you simply remove the if clause around
> nand_block_checkbad() in mtd/nand/nand_base:nand_erase_nand(),
> recompile, and use that kernel to erase the blocks that have
> accidentally been marked bad.

I have a kernel with this patch, yes - and it does work. However, then I 
remove the factory-marked ones, as well. Not a good idea!


// Egholm





More information about the linux-mtd mailing list