[Yaffs] Re: YAFFS and HW ECC

Charles Manning Charles.Manning@trimble.co.nz
Fri, 18 Mar 2005 14:22:05 +1300


The best way to look at mkyaffsimage, IMHO, is as a hackable tool that
you reconfigure to your needs. mkyaffsimage is pretty straight forward,
so this is easily done.

mkyaffsimage was written quite a while back and has not been made
flexible to work with different OOB layouts. All that is needed is to
mess around with write_chunk which is a very short and, IMHO, easy to
understand function.

If someone wants to make mkyaffsimage more flexible and contribute it
back(eg. James Ng contributed a pitch for BE and LE), that would be fine
too.



> I understand what's been said but I'm unclear on how the=20
> tools (mkyaffsimage, mkyaffs, and nandwrite) can be used in=20
> conjunction with this mechanism. Please point out the flaw in=20
> the following
> analysis:
>=20
> It seems like mkyaffsimage generates an image
> that contains the OOB info based on how it wants the tags placed:
>=20
> typedef struct
> {
>     __u8  tagByte0;
>     __u8  tagByte1;
>     __u8  tagByte2;
>     __u8  tagByte3;
>     __u8  pageStatus; 	// set to 0 to delete the chunk
>     __u8  blockStatus;
>     __u8  tagByte4;
>     __u8  tagByte5;
>     __u8  ecc1[3];
>     __u8  tagByte6;
>     __u8  tagByte7;
>     __u8  ecc2[3];
> } yaffs_Spare;
>=20
>=20
> Both nandwrite and mkyaffs will then use the MEMWRITEOOB=20
> ioctl to write these 16 bytes to the OOB. MEMWRITEOOB doesn't=20
> appear to use the oobfree info to figure out how to write the=20
> OOB info so it looks to me like it=20
> will write these 16 bytes as layed out above (which will not=20
> work with the hardware ecc placement scheme I am using).
>=20
> Is this just a case where the tools should really be using=20
> GETOOBSEL to figure out where the free bytes are and then=20
> program accordingly?=20
>=20
> >
> >tglx
> >
> >
> >
> >
> >
>=20
> _______________________________________________
> yaffs mailing list
> yaffs@stoneboat.aleph1.co.uk=20
> http://stoneboat.aleph1.co.uk/cgi-> bin/mailman/listinfo/yaffs
>=20