Mounting a JFFS2 image in a Linux PC

We often use JFFS2 binary images for embedded system, generating them with mkfs.jffs2.

In some instances, it could also be good to mount a jffs2 image into your PC to modify it directly.

To do that,  type the following commands as root in a linux shell:
modprobe mtdcore
modprobe jffs2
modprobe mtdram
modprobe mtdchar
modprobe mtdblock
dd if=image-jffs2 of=/dev/mtd0
mount /dev/mtdblock0 mnt

If your image is larger than the default kernel size (4MB in my case), you can try to adjust the mtdram device size with the total_size parameters. when inserting the mtdram module, e.g.:
modprobe mtdram total_size=8096
where total_size is expressed in KB

Further details can be found @ http://www.handhelds.org/hypermail/familiar/62/6232.html

Share this:

Support CNX Software! Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples

Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
0 Comments
Advertisements