Added scripts to mount JFFS2 images.
This commit is contained in:
parent
896803c645
commit
c4d62be1d6
15
jffs2mount.alternative.sh
Executable file
15
jffs2mount.alternative.sh
Executable file
@ -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...
|
12
jffs2mount.sh
Executable file
12
jffs2mount.sh
Executable file
@ -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...
|
8
jffs2umount.alternative.sh
Executable file
8
jffs2umount.alternative.sh
Executable file
@ -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
|
8
jffs2umount.sh
Executable file
8
jffs2umount.sh
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user