June 2017
Intermediate to advanced
478 pages
13h 14m
English
As with JFFS2, to create a YAFFS2 filesystem at runtime, you only need to erase the partition and mount it, but note that in this case, you do not enable clean markers:
# flash_erase /dev/mtd/mtd6 0 0# mount -t yaffs2 /dev/mtdblock6 /mnt
To create a filesystem image, the simplest thing to do is use the mkyaffs2 tool from https://code.google.com/p/yaffs2utils using the following command:
$ mkyaffs2 -c 2048 -s 64 rootfs rootfs.yaffs2
Here, -c is the page size and -s the OOB size. There is a tool named mkyaffs2image that is part of the YAFFS code, but it has a couple of drawbacks. Firstly, the page and OOB size are hard-coded in the source: you will have to edit and recompile if you have memory that does not ...
Read now
Unlock full access