diff --git a/jffs2mount.alternative.sh b/jffs2mount.alternative.sh new file mode 100755 index 0000000..2027d16 --- /dev/null +++ b/jffs2mount.alternative.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# From: http://wiki.maemo.org/Modifying_the_root_image +mknod /tmp/mtdblock0 b 31 0 +modprobe loop +losetup /dev/loop0 "$1" +modprobe mtdblock +modprobe block2mtd +# Note the ,128KiB is needed (on 2.6.26 at least) to set the eraseblock size. +#echo "/dev/loop0" > /sys/module/block2mtd/parameters/block2mtd +#echo "/dev/loop0,128KiB" > /sys/module/block2mtd/parameters/block2mtd +echo "/dev/loop0,64KiB" > /sys/module/block2mtd/parameters/block2mtd +modprobe jffs2 +# check dmesg +mount -t jffs2 /tmp/mtdblock0 /mnt/temporary +# check dmesg again - if the above mount results in any errors there is a problem... diff --git a/jffs2mount.sh b/jffs2mount.sh new file mode 100755 index 0000000..c32521c --- /dev/null +++ b/jffs2mount.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# From: https://www.kutukupret.com/2010/09/16/mounting-a-jffs2-filesystem-in-linux/ +mknod /tmp/mtdblock0 b 31 0 +modprobe mtd +modprobe jffs2 +modprobe mtdram total_size=32767 +modprobe mtdblock + +dd if="$1" of=/dev/mtd0 + +mount -t jffs2 /tmp/mtdblock0 /mnt/temporary +# check dmesg again - if the above mount results in any errors there is a problem... diff --git a/jffs2umount.alternative.sh b/jffs2umount.alternative.sh new file mode 100755 index 0000000..e33d6f7 --- /dev/null +++ b/jffs2umount.alternative.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# From: http://wiki.maemo.org/Modifying_the_root_image +umount /mnt/temporary +modprobe -r block2mtd +modprobe -r mtdblock +modprobe -r jffs2 +losetup -d /dev/loop0 +rm /tmp/mtdblock0 diff --git a/jffs2umount.sh b/jffs2umount.sh new file mode 100755 index 0000000..fee40b1 --- /dev/null +++ b/jffs2umount.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# From: http://wiki.maemo.org/Modifying_the_root_image +umount /mnt/temporary +modprobe -r mtdblock +modprobe -r mtdram +modprobe -r jffs2 +modprobe -r mtd +rm /tmp/mtdblock0