summaryrefslogtreecommitdiff
path: root/utils/nwztools/scripts/dump_rootfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/scripts/dump_rootfs.sh')
-rw-r--r--utils/nwztools/scripts/dump_rootfs.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/utils/nwztools/scripts/dump_rootfs.sh b/utils/nwztools/scripts/dump_rootfs.sh
index 36e521ce3b..0a5570f050 100644
--- a/utils/nwztools/scripts/dump_rootfs.sh
+++ b/utils/nwztools/scripts/dump_rootfs.sh
@@ -66,8 +66,22 @@ lcdmsg -f /usr/local/bin/font_08x12.bmp -l 0,12 "Dumping rootfs..."
66ROOTFS_TMP_DIR=/tmp/rootfs 66ROOTFS_TMP_DIR=/tmp/rootfs
67mkdir $ROOTFS_TMP_DIR 67mkdir $ROOTFS_TMP_DIR
68. /install_script/constant.txt 68. /install_script/constant.txt
69if ! mount -t ext3 -o ro $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR 69
70then 70# If there is an ext4 mounter, try it. Otherwise or on failure, try ext3 and
71# then ext2.
72# NOTE some platforms probably use an mtd and this might need some fixing
73if [ -e /usr/local/bin/icx_mount.ext4 ]; then
74 /usr/local/bin/icx_mount.ext4 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
75else
76 false
77fi
78if [ "$?" != 0 ]; then
79 mount -t ext3 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
80fi
81if [ "$?" != 0 ]; then
82 mount -t ext2 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
83fi
84if [ "$?" != 0 ]; then
71 lcdmsg -f /usr/local/bin/font_08x12.bmp -l 0,13 "ERROR: cannot mount rootfs" 85 lcdmsg -f /usr/local/bin/font_08x12.bmp -l 0,13 "ERROR: cannot mount rootfs"
72else 86else
73 tar -cf $DUMP_DIR/rootfs.tar $ROOTFS_TMP_DIR 87 tar -cf $DUMP_DIR/rootfs.tar $ROOTFS_TMP_DIR