[Yaffs] Re: Yaffs & bad blocks...

Martin Egholm Nielsen martin at egholm-nielsen.dk
Fri Jul 29 14:32:55 BST 2005


Hi,

> I began to test Yaffs on a 2Mb empty partition, with a little program 
> that recursively writes and erases files (one of 500*1024 bytes and many 
> of 1024 bytes).
> 
> I let it turn during approx. 15 min. Then, I wanted to format my yaffs 
> partition with mkyaffs, ... but once executed, it tells me a lot of 
> damaged blocks...!
> 
> Then, when I remount my partition, It's like none files had been 
> erased... I've only 176 kB now !
> 
> So do you have an idea of what could I do to *really* format my 2Mb 
> partition, in order to my empty 2Mb again ?

If you're lucky "flash_eraseall" (from mtd utils) will do it...

If not and you really really want to wipe all information about bad 
blocks away from your nand, you can hack the kernel file 
"drivers/mtd/nand/nand_base.c" and the method "nand_block_isbad" and 
force it to return 0.
Use that new kernel, and then erase the flash with "flash_eraseall".

NOTE: this will also wipe all the factory marked ones away!

I've used this strategy myself after having marked the *entire* device 
bad. This is where my situation differs from yours, since only part of 
yours has been marked.

BR,
  Martin Egholm




More information about the yaffs mailing list