how to mount a 256 MB jffs2 image (without using 256 MB of RAM)?

Tomasz Chmielewski mangoo at wpkg.org
Fri Jan 13 06:46:23 EST 2006


I just began to play with jffs2.

I have a small ASUS router which has a 4 MB flash, and 32 MB of RAM. It 
runs linux (http://www.openwrt.org).

4 MB flash is not much for a Linux distribution, but this tiny router 
has also a USB port, so I can connect a USB stick to it.

My original idea was to "format" this 256 MB USB stick with jffs2 to get 
more space - but of course, it's not possible, as it's not really a 
mtd/flash device.

So my second though was to create a ~256 MB jffs2 image on my Linux PC, 
copy it to the USB stick (formatted with ext2/3), and mount this image 
on a router.

I made some test, and unfortunately, it seems that to mount a 256 MB 
jffs image one needs an equal amount of RAM (256):


insmod mtdram total_size=262144 erase_size=256


Are there any alternative ways to mount a jffs2 image, so that it 
doesn't take so much RAM?


-- 
Tomasz Chmielewski
http://wpkg.org




More information about the linux-mtd mailing list