[Yaffs] Settings for YAFFS2 & 2k mkyaffsimage
Charles Manning
manningc2 at actrix.gen.nz
Mon Jul 18 23:58:31 BST 2005
On Tuesday 19 July 2005 00:30, Chris Williams wrote:
> Hello, my group was asked to get yaffs2 running under the celinux 2.4.20
> kernel on an arm processor, using one of the Samsung 2k page nand chips.
>
> I've managed to get the March version of MTD running and JFFS2 (though
> it gains CRC errors every time I reset the board.) And I have gotten
> YAFFS2 to compile and partially run, but it is having issues and the
> source files are rather large and uncommented to fix--plus I'm not
> certain whether this would be an MTD or YAFFS2 issue.
>
> 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.
This sounds more like an mtd than a yaffs issue.
There was a problem in mtd where the autoplace stuff was not working
correctly. This caused corruption of part of the OOB data which in turn
corrupted yaffs. JFFS2 was unaffected because it does not use the OOB area.
This was fixed during May, I believe. I definitely would expect problems with
an older mtd.
>
> The current configs that I have on for the build (which has gotten me
> the best results) is:
> CONFIG_YAFFS_FS
> CONFIG_YAFFS_YAFFS2
> CONFIG_YAFFS_MTD_ENABLED
> CONFIG_YAFFS2_MTD_ENABLED
> CONFIG_YAFFS_USE_NANDECC
> CONFIG_YAFFS_ECC_WRONG_ORDER (? Seems to work the same with ot without)
> CONFIG_YAFFS_USE_GENERIC_RW
> CONFIG_YAFFS_USE_HEADER_FILE_SIZE (?)
> CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK (?)
> CONFIG_YAFFS_USE_OLD_MTD (Didn't start working until I turned this on)
This should only be used with yaffs1 format
>
> I was also wondering if there was a 2k page version of mkyaffsimage and
> mkyaffs? I didn't want to fiddle with them too much as I'm not sure how
> OOB space is supposed to be split up between MTD and YAFFS2.
mkyaffsimage was (relatively) easy to do with 512-byte pages because only one
main flash layout was used.
There is not yet a mkyaffsimage for yaffs2 layout. This would need to have a
slightly more abstract form because the mtd does a lot more in the new model
(ECC and bad block marking etc).
A mkyaffs2image for YAFFS2 would follow the same basic structure as YAFFS1,
but would not write 512 data + 16 oob for each chunk. Instead it would write
2k (or whatever) data + a yaffs_PackedTags2 structure (generated by
yaffs_PackedTags2.c)
The mkyaffs2 would then need a modification to call the new mtd interface and
write data + packedtags2 (in the spirit of yaffs_mtdif2.c).
-- Charles
More information about the yaffs
mailing list