Creating jffs2 image

 Hello people!   Last time I wrote that we had some problems in generating jffs2 file system image. So I read on the internet about a bug when using -v option in mkfs.jffs2. I tried to generate the jffs2 image by taping the command and I think that I got it.
So, you’ll need:
– mkfs.jffs2 (from mtd-tools)
– file system (it’s generated when compiling uClinux in the uClinux-dist directory named as romfs)
– dev_table.txt (located at uClinux/vendors/EmbeddedArtists/LPC2468OEM_Board/dev_table.txt)
To better comprehension let’s copy dev_table.txt to uClinux-dist directory:

cd uClinux-dist
cp ./vendors/EmbeddedArtists/LPC2468OEM_Board/dev_table.txt ./

Now let’s generate the jffs2 image by taping:

mkfs.jffs2 -d ./romfs -D ./dev_table.txt -l -o ./images/jffs2.img -e 128 -n -m none -p

If you want to understand what we are doing, take a look on mkfs.jffs2 man page, it’s not that complicated!

That’s it!
Marcelo Jo

Marcelo Jo

Marcelo Jo is an electronics engineer with 10+ years of experience in embedded system, postgraduate in computer networks and masters student in computer vision at Université Laval in Canada. He shares his knowledge in this blog when he is not enjoying his wonderful family – wife and 3 kids. Live couldn’t be better.

LinkedIn 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.