I'm trying out YAFFS2 here with Linux 2.6.24. The kernel compiled fine
and I can mount the file system on a blank MTD device.
Now I've prepared an image using mkyaffs2image and written it, but when
I mount the volume it's blank!
$ ~/src/yaffs2/utils/mkyaffs2image /path/to/root elaraboot.yaffs2 convert
[...]
Operation complete.
418 objects in 36 directories
1753 NAND pages
which looks promising. (My target is armeb, host is x86-64, hence
convert option.) So I erase the device and write the image to it:
# flash_eraseall /dev/mtd7
[...]
Skipping bad block at 0x008e0000
Erasing 128 Kibyte @ 5280000 -- 32 % complete.
Skipping bad block at 0x052a0000
Erasing 128 Kibyte @ 6120000 -- 37 % complete.
Skipping bad block at 0x06140000
Erasing 128 Kibyte @ ffe0000 -- 99 % complete.
And write the image:
# nandwrite -p /dev/mtd7 elaraboot.yaffs2
Writing data to block 0
Bad block at 0, 1 block(s) from 0 will be skipped
Writing data to block 20000
Bad block at 20000, 1 block(s) from 20000 will be skipped
Writing data to block 40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 60000
[...]
Writing data to block c40000
Writing data to block c60000
#
And mount it:
# mount -t yaffs2 /dev/mtdblock7 /mnt
# ls /mnt
lost+found
# du /mnt
2 /mnt/lost+found
4 /mnt
So, perhaps I wrote it wrong. I tried:
# nandwrite -o /dev/mtd7 elaraboot.yaffs2
...
# mount -t yaffs2 /dev/mtdblock7 /mnt
# ls /mnt
lost+found
# du /mnt
1826902 /mnt/lost+found
1826904 /mnt
What am I doing wrong?
thanks
Hamish
--
Hamish Moffatt VK3SB <
hamish@debian.org> <
hamish@cloud.net.au>