June 2017
Intermediate to advanced
478 pages
13h 14m
English
Creating an empty JFFS2 filesystem at runtime is as simple as erasing an MTD partition with clean markers and then mounting it. There is no formatting step because a blank JFFS2 filesystem consists entirely of free blocks. For example, to format MTD partition 6, you would enter these commands on the device:
# flash_erase -j /dev/mtd6 0 0# mount -t jffs2 mtd6 /mnt
The -j option to flash_erase adds the clean markers, and mounting with type jffs2 presents the partition as an empty filesystem. Note that the device to be mounted is given as mtd6, not /dev/mtd6. Alternatively, you can give the block device node /dev/mtdblock6. This is just a peculiarity of JFFS2. Once mounted, you can treat it like any other filesystem. ...
Read now
Unlock full access