setenv ipaddr 10.1.7.68 tftp 0x31000000 10.1.7.66:gpe-image-micro2440.jffs2 nand write.jffs2 0x31000000 root ${filesize} setenv bootargs console=ttySAC0,115200 ip=10.1.7.69 gw=10.1.7.1 mask=255.255.255.0 root=/dev/mtdblock3 mini2440=1tb rootdelay=3 noinitrd setenv bootcmd 'nboot.e kernel ; bootm'
;;rootfstype=jffs2 ;; init=/linuxrc ;; init=/bin/sh
JFFS2 images can not be loop mounted. The loop device is essentially a driver which represents files as block devices. But JFFS2 works on top of MTD devices which are different. So an “mtdloop” device would be needed for this, but nobody implemented it yet.
maemo.org provide two solution to solve the issue. Block Device Emulating a MTD Kernel Memory Emulating a MTD
I think the second method is very convenient. The method is: mknod /tmp/mtdblock0 b 31 0 modprobe mtdblock modprobe mtdram total_size=65536 erase_size=256 modprobe jffs2 dd if=/pathtoimage/rootfs.jffs2 of=/tmp/mtdblock0 mkdir /media/jffs2 mount -t jffs2 /tmp/mtdblock0 /media/jffs2