[Yaffs] Settings for YAFFS2 & 2k mkyaffsimage

Chris Williams chris at jem.co.jp
Wed Jul 20 07:12:13 BST 2005


Thank you all for the various advice.

I've downloaded and plugged in the 2.4.25 code (MTD, JFFS2, and YAFFS2) 
to my kernel, but still no go.
Before, when data was written, there was no issue with anything until I 
reset the board and MTD redid the bad block test. But with the 2.4.25 
code, if I unmount and remount, the blocks written to show up as bad 
during the YAFFS guts init bit--and again my files have disappeared.

Also, one bug I had noticed in the CVS code for YAFFS2 that I had been 
using and now in the 2.4.25 code is that in nandmtd2_MarkNANDBlockBad() 
and nandmtd2_QueryNANDBlock(), the MTD functions block_markbad() and 
block_isbad() are being passed the index of the block number to check 
but the MTD code is expecting an offset. I fixed it by changing it from:

-  blockNo
+ blockNo * dev->nBytesPerChunk * dev->nChunksPerBlock

But I have to wonder, since this seems relatively central, if something 
about my settings is causing it use different sections of code than you 
guys. (This was causing the code to think all blocks were bad if the 
first one was--since all of the addresses passed in were contained in 
the first block.)

Thank you,
Chris Williams

Blair Barnett wrote:

>Your best bet is to go to http://www.toby-churchill.org/ and download
>the linux-2.4.25 kernel that has a working MTD/YAFFS2 combination. See
>http://www.aleph1.co.uk/pipermail/yaffs/2005q2/001172.html for more
>information.
>
>On Mon, 2005-07-18 at 05:30, Chris Williams wrote:
>
>>At the moment, if I erase the partition and mount, then it looks and 
>>seems fine. I can copy over files and unmount and remount. However, when 
>>I reset the board, all erase blocks that were written to get listed as 
>>bad blocks--so MTD won't allow the YAFFS2 driver to read them again. I 
>>read that there are some issues with sharing the OOB between MTD and 
>>YAFFS2, but I wouldn't think either of these would touch the bad block 
>>markers.
>>



More information about the yaffs mailing list