[Yaffs] About phsyical NAND FLASH cloning
Charles Manning
Charles.Manning@trimble.co.nz
Thu, 3 Feb 2005 14:26:22 +1300
The process Brad wrote will work fine, mostly. It does, however, have =
one or two problems:
The image will include garbage as well (ie. Old data that has been =
deleted and not garbage collected). This, in itself, is not really a =
problem but it can mean that if you try progam it inot a device with =
more bad blocks than the one used to generate the image then you might =
run out of space.
A possibly better approach is to copy the yaffs file system into a as a =
set of files and use mkyaffsimage to generate an image file from that. =
This image will have no garbage in it.
So how do you detect bad blocks in the image? Look for blocks where the =
bad block marker in the spare area is zero.=20
You should also ignore empty blocks too.
The mkyaffs utility can "format" a NAND for yaffs (in other words just =
erase all non-bad blocks) and load an image. Even if you don't use this, =
reading the code will give you a good idea of what is involved (ie. What =
the NAND programming machine needs to do).
There are a few people using NAND loading machines to load NAND with =
yaffs images for cellphones etc.
-- Charles
> -----Original Message-----
> From: yaffs-admin@stoneboat.aleph1.co.uk=20
> [mailto:yaffs-admin@stoneboat.aleph1.co.uk] On Behalf Of=20
> noshel@idis.co.kr
> Sent: Thursday, 3 February 2005 1:38 p.m.
> To: Brad Beveridge
> Cc: yaffs@stoneboat.aleph1.co.uk
> Subject: Re: [Yaffs] About phsyical NAND FLASH cloning
>=20
>=20
> Brad Beveridge wrote:
>=20
> >Edward J. Lee(=C0=CC=C0=E5=BF=F8) wrote:
> >
> > =20
> >
> >>Hello,
> >>I'm using yaffs on a SAMSUNG 16MB flash chip.
> >>
> >>I've just heard that there is a device that can 'mass produce'=20
> >>programmed NAND chips, and just needs a 'bin' file.
> >>
> >>The machine has abilities to
> >>- write OOB data (which is included in the bin file),
> >>- check and skip bad blocks
> >>
> >>I guess it will work just fine for the parts that are written=20
> >>sequentially in raw binary, but I'm not sure about the=20
> yaffs part. So=20
> >>my question is : 'can a binary image of yaffs be extracted,=20
> and is it=20
> >>able to be dumped on a different NAND chip (same model, of course),=20
> >>just by writing the bin contents
> >>sequentially (skipping bad blocks)?'
> >>
> >>Thanks in advance.
> >>
> >>
> >>Regards,
> >>Ed
> >>
> >>_______________________________________________
> >>=20
> >>
> >> =20
> >>
> >Yes. Yaffs doesn't care about block order. You could place=20
> blocks from=20
> >one nand chip running yaffs, to another chip (as long as the page &=20
> >block sizes are the same) in any order that you like, and Yaffs will=20
> >scan and run fine. The only exception to this is that block 0 should=20
> >not be used, because for each yaffs partition block zero is reserved.
> >
> >Brad
> >
> >
> >_______________________________________________
> >yaffs mailing list
> >yaffs@stoneboat.aleph1.co.uk=20
> >http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >
> > =20
> >
> Hello, Brad,
> Wow, great. thx a lot.
> then here comes another question :
> 'How can a binary image of yaffs be obtained?'
> Should I hexdump the whole partition and search for blocks
> that seem dirty? Dumping the device wouldn't be hard,
> but the deciding of 'clean or dirty': I'm not sure how.
>=20
>=20
> _______________________________________________
> yaffs mailing list
> yaffs@stoneboat.aleph1.co.uk=20
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>=20