diff options
Diffstat (limited to 'Scripts/mount_ubifs_rcc.sh')
-rw-r--r-- | Scripts/mount_ubifs_rcc.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Scripts/mount_ubifs_rcc.sh b/Scripts/mount_ubifs_rcc.sh new file mode 100644 index 0000000..322d29e --- /dev/null +++ b/Scripts/mount_ubifs_rcc.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +UBIFS_IMAGE=$1 + +mkdir -p /mnt/ubifs +if grep -qs '/dev/ubi' /proc/mounts; then + umount /mnt/ubifs + ubidetach -p /dev/mtd0 + rmmod nandsim +fi + +modprobe ubi +modprobe nandsim first_id_byte=0xec second_id_byte=0xd7 third_id_byte=0x00 fourth_id_byte=0x36 +flash_erase /dev/mtd0 0 0 +ubiformat /dev/mtd0 -s 4096 -O 4096 +ubiattach -m 0 -d 0 -O 4096 +ubimkvol /dev/ubi0 -N NAC_UBIFS -s 1024MiB +ubiupdatevol /dev/ubi0_0 $UBIFS_IMAGE +mount /dev/ubi0_0 /mnt/ubifs + +echo "${UBIFS_IMAGE} mounted on /mnt/ubifs"
\ No newline at end of file |