Author: Kenneth Ingham Date: To: yaffs Subject: [Yaffs] Writing a YAFFS image to a simulated MTD
I am using the kernel modules mtd, mtdblock, and nandsim to create a
simulated YAFFS setup for experimenting.
I can mount an empty YAFFS2 filesystem, mount it, copy files to it, etc.
What I cannot do is to create a YAFFS2 image and write it to the
simulator. flash.img is my YAFFS2 image; I have tried both mkyaffs2
from yaffs2utils and mkyaffs2image.bin from Google code. I can
unyaffs2 the image and extract the files.
Here is what I have tried:
dd if=/tmp/flash.img of=/dev/mtdblock0
nandwrite --pad /dev/mtd0 flash.img
flashcp flash.img /dev/mtd0
After any of these, all I have is an empty filesystem. What am I missing?