The -o flag is tricky because the meaning is reversed between nanddump and
nandwrite:
Usage: nanddump [OPTIONS] MTD-device
...
-o --omitoob omit oob data
....
Usage: nandwrite [OPTION] MTD_DEVICE INPUTFILE
...
-o, --oob image contains oob data
...
The dump_image tool contains oob
Look at
http://svn.infernix.net/nandroid/nandtools/android-imagetools/dump_image.c
to see what you're getting from dump_image.
-- Charles
On Saturday 05 December 2009 10:54:44 McCash John-GKJN37 wrote:
> Charles,
> For what it's worth, I think I've figured out what's wrong. The
> size returned in /proc/mtd does not include the oob area. I verified
> this by creating an mtd device the same size as the one I'm trying to
> examine an image of, and then dumping it with nanddump. The resultant
> image is larger than the size of the device. I can also copy this image
> back in with nandwrite. However if I dump it with the -o option, to
> exclude oob, the image dumped is exactly the size listed in /proc/mtd.
>
> Now I just have to find somewhere a precompiled copy of nanddump
> for ARM. (I have a deep and abiding fear of cross-compilers.) I don't
> suppose anyone on the list could direct me to such an animal?
>
> Thanks
> John
>
> -----Original Message-----
> From: Charles Manning [mailto:manningc2@actrix.gen.nz]
> Sent: Tuesday, December 01, 2009 3:26 PM
> To: yaffs@lists.aleph1.co.uk
> Cc: McCash John-GKJN37; Andrew Hoog
> Subject: Re: [Yaffs] Access to files on a YAFFS2 image
>
> What I suggest is that you first start off by running yaffs on the
> nandsim
> then doing a dump from that and checking that looks like it should and
> that
> you can then nandwrite that back.
>
> Once you can make the process work with just one device it is then a lot
>
> easier to see why things don't work when importing from somewhere else.
>
> -- Charles
>
> On Wednesday 02 December 2009 01:57:04 McCash John-GKJN37 wrote:
> > Charles,
> > OK, so we apparently do have the OOB data in these image dumps
> > (obtained via the dump_image-arm tool included in nandroid), but when
>
> we
>
> > attempt to upload them to a nand emulator (under Ubuntu) with
>
> 'nandwrite
>
> > -a -o', we're still getting the error:
> >
> > Input file is not page-aligned. Use the padding option.
> > Data was only partially written due to error
> >
> > : Success
> >
> > Where do we go from here? Should this work, and if so, how do we
> > determine exactly what the problem really is?
> >
> > Thanks much for your help
> > John McCash
> >
> > _______________________________________________
> > yaffs mailing list
> > yaffs@lists.aleph1.co.uk
> > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
> _______________________________________________
> yaffs mailing list
> yaffs@lists.aleph1.co.uk
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs