On Thu, 2011-03-31 at 14:21 +0800, Xiangfu Liu wrote:
>  the *strange* thing is after flash the /dev/flash5 not change.d.
>  all those *.png file still there .
> 
> any feedback will be great.

IMO you are not placing the chunks correctly, since we use a special
placement scheme that isn't implemented anywhere else in YAFFS and I do
not see code for this in your patch.

See:
https://github.com/lekernel/rtems-yaffs2/blob/master/direct/rtems/rtems.c#L125

In our layout, the 16 bytes of chunk tags (which emulate NAND OOB data)
are packed right after the 512 bytes of chunk data, yielding a 528 byte
total chunk size. Now there's a catch - NOR is erased by whole sectors,
which is 128K in our case, and YAFFS2 expects that an erase will always
clear the same amount of sectors. 128*1024 is not divisible by 528. So,
to make YAFFS2 happy, we pack as many as possible 528 byte whole chunks
into the 128K sector, and we lose the (128*1024) % 528 = 128 remainder
bytes (about 0.1% of the disk space for significant gains in simplicity,
speed and flash wear).

Your flash image must implement this layout.

Best regards,
Sébastien

_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode
Twitter: www.twitter.com/milkymistvj
Ideas? http://milkymist.uservoice.com

Reply via email to