Author: Dominic Chen Date: To: yaffs Subject: [Yaffs] Problem mounting nanddump yaffs2 image
Hello,
I'm trying to mount a yaffs2 image taken from an Android device, but
unfortunately after mounting it with nandsim, the only thing that I see
is the lost+found directory. Since some people on this mailing list have
reported success doing something similar, I'd appreciate it if they
could tell me what I'm doing wrong.
To capture the image, I cross-compiled mtd-utils and pushed it to the
device, then ran "nanddump -o /dev/mtd/mtdX | gzip > /sdcard/mtdX.nd.gz"
on each mtd character device, and copied the resulting image back over
to a Ubuntu machine. I've attached the results of /proc/mtd and
/proc/yaffs on Android, if that information is helpful.
To mount the image, I first had to compile yaffs2multi, followed by
"modprobe mtdblock", "modprobe nandsim first_id_byte=0x20
second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15", and then
"modprobe yaffs2multi". After that, I erased the flash on the simulator
with "flash_erase /dev/mtd0 0 4096", then wrote the image with
"nandwrite -a -r /dev/mtd0 ./mtdX.nd" (after gunzip). But when I mount
the simulator with "mount -t yaffs2 -o
no-checkpoint-read,tags-ecc-off,empty-lost-and-found-off /dev/mtdblock0
/mnt/temp/", all I see is the lost+found directory, and /proc/yaffs
shows that the file chunks aren't being recognized. I've tried using dd
instead of nandwrite, but still no success. What am I doing wrong?