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 cat of the device:
cat /dev/mtd/mtd3 > <path>/yaffs2image.img
I get a 150 MB file. To write the image to the NAND emulated device, I
do this:
modprobe mtdblock
modprobe mtdchar
| modprobe nandsim first_id_byte=0x20 second_id_byte=0x71|
mount -t yaffs /dev/mtdblock0 /media/nand
cat yaffs2image.img > /dev/mtdblock0
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
yaffs2image.img. 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
to another device (emulated or not)?
Thanks.
--
Bounlith Sirivong.