Mounting a JFFS2 image in a Linux PC

Orange Pi Development Boards

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

2
Leave a Reply

avatar
2 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Tweets that mention CNXSoft – Embedded Software Development » Mounting a JFFS2 image in a Linux PC -- Topsy.comCNXSoft – Embedded Software Development » Mounting a JFFS2 image … | Linux Affinity Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
trackback

[…] the original here: CNXSoft – Embedded Software Development » Mounting a JFFS2 image … Posted in: Software ADD […]

trackback

[…] This post was mentioned on Twitter: Mounting a JFFS2 image in a Linux PC http://bit.ly/9GAvvP […]