[Yaffs] Why does YAFFS skip the first block?
Peter Barada
Peter.B@LogicPD.com
Tue Jun 21 20:25:41 BST 2005
I have a NOR implementation of YAFFS, and I've been pounding my head
with mkyaffsimage.c trying to get an image that can be built on a linux
box and used on a ColdFire mcf5475 based embedded Linux board using
kernel 2.4.26.
To do this, I've set up the MTD access such that the spare abuts its
corresponding data chunk which all seems to work(this is that I make
sure that a data chunk and spare are in the same block). What I
stumbled across is that YAFFS refuses to use the first flash block(which
in my case is 64K in size) by setting dev->startBlock = 1 in
yaffs_internal_read_super. This causes it to behave bizarrely when I
first burned the image created by mkyaffsimage into the flash starting
at block zero.
If I change dev->startBlock to zero, then yaffs_GutsInitialize() fails
due to checks for a non-zero startBlock. If I change those checks to
allow a zero startBlock, things look like they work fine, including the
image that mkyaffsimage created(after I modified write_chunk to place
the data and spares in the appropriate offsets).
Am I setting myself up for a bunch of problems by changing the
startBlock to zero?
--
Peter Barada <Peter.B@LogicPD.com>
More information about the yaffs
mailing list