On Friday 08 October 2010 04:57:10 Bounlith Sirivong wrote:
> On Thu, 7 Oct 2010 16:25:02 +0200
>
> Bounlith Sirivong <bounlith.sirivong@atelier.tm> wrote:
> > Hello,
> >
> > I have dumped the contents of a flash NAND partition of an Android
> > device, using nanddump. I would like to write the dump to a Nandsim on a
> > Linux computer with nandwrite. What I notice is that if the size of the
> > Nandsim is not the same as the size of the dump image, mounting the
> > Nandsim shows no other file than the directory lost+found.
> >
> > So I would like to set the size of the Nandsim. But if I understand well,
> > Nandsim uses hardcoded defined sizes with the parameters first_id_byte,
> > second_id_byte, third_id_byte and fourth_id_byte. The size of my dumped
> > image is 150 MiB. Is it possible to partition the Nandsim to this custom
> > size? Or is it possible to give an arbitrary size when loading the
> > nandsim module? I have tried fdisk, parted, gparted without success.
> >
> > Thanks.
> >
> > Bounlith.
>
> Hi again,
>
> I finally found how to set the size of the partitions of Nandsim: with the
> parameter parts. I.e.:
>
> modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa
> third_id_byte=0x00 fourth_id_byte=0x15 parts=0x4b0
>
> The first partition has the size = (0x4b0 * erasesize).
>
> Hope this will help some people. In my case, this does not yet resolve my
> problem of dump image write/mount.
When you did the nandwrite did you include the argument to write spare bytes?
Also, I wonder if perhaps there is a problem due to the checkpoint not
matching the nandsim. Try mounting with the option to ignore checkpoints.
mount -t yaffs2 -o"no-checkpoint-read" /dev/mtdblock0 /mnt
-- Charles