Skip to content

Instantly share code, notes, and snippets.

@btbytes
Created April 17, 2010 19:25
Show Gist options
  • Select an option

  • Save btbytes/369754 to your computer and use it in GitHub Desktop.

Select an option

Save btbytes/369754 to your computer and use it in GitHub Desktop.

Installing GPE on Mini2440

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

Loop mount JFFS2 image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment