Author: Luca Aliberti Date: To: yaffs Subject: [Yaffs] How to mount a yaffs2 partition on linux ubuntu 11.04
Hello,
I need to dump a NAND device (formatted to YAFFS2) in an image, then
write this image to the NAND emulated device on a linux computer.
To get image, I have done a nanddump of the device:
./nanddump -o -f /sdcard/userdataobb.nanddump /dev/mtd/mtd5
I get a 150 MB file. To write the image to the NAND emulated device, I
do this:
modprobe mtdblock
modprobe mtd
modprobe mtdchar
sudo modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51
fourth_id_byte=0x15
sudo nandwrite -a -o -p /dev/mtd0 userdataobb.nanddump
mount -t yaffs /dev/mtdblock0 /media/nand
In result, /media/nand contents only a "lost + found" dir. But making a
cat on mtdblock0 ouputs something which seems to be the contents of
userdataobb.nanddump. I thought I retrieve the files of the original YAFFS2
device, including all its clusters.
Is there a way to get a dump of a YAFFS2 device, and to flash the dump