diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-28 17:19:41 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-02-04 17:20:09 +0100 |
commit | d052f13999a53e440975e0192c67c8a42c75e4ea (patch) | |
tree | 628cc1a5f98c2a6beedd8a4f0cc1f0b3282a72ce /utils/nwztools/scripts/dump_rootfs.sh | |
parent | 2ea0ccb6c5fb029aa8db997bdab7e1ef43df1406 (diff) | |
download | rockbox-d052f13999a53e440975e0192c67c8a42c75e4ea.tar.gz rockbox-d052f13999a53e440975e0192c67c8a42c75e4ea.zip |
nwztools/script: fix dump_rootfs.sh to handle ext4
Change-Id: I04bd7599a58669df96dfd018a2ab0e3d53e06694
Diffstat (limited to 'utils/nwztools/scripts/dump_rootfs.sh')
-rw-r--r-- | utils/nwztools/scripts/dump_rootfs.sh | 18 |
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..." | |||
66 | ROOTFS_TMP_DIR=/tmp/rootfs | 66 | ROOTFS_TMP_DIR=/tmp/rootfs |
67 | mkdir $ROOTFS_TMP_DIR | 67 | mkdir $ROOTFS_TMP_DIR |
68 | . /install_script/constant.txt | 68 | . /install_script/constant.txt |
69 | if ! mount -t ext3 -o ro $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR | 69 | |
70 | then | 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 | ||
73 | if [ -e /usr/local/bin/icx_mount.ext4 ]; then | ||
74 | /usr/local/bin/icx_mount.ext4 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR | ||
75 | else | ||
76 | false | ||
77 | fi | ||
78 | if [ "$?" != 0 ]; then | ||
79 | mount -t ext3 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR | ||
80 | fi | ||
81 | if [ "$?" != 0 ]; then | ||
82 | mount -t ext2 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR | ||
83 | fi | ||
84 | if [ "$?" != 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" |
72 | else | 86 | else |
73 | tar -cf $DUMP_DIR/rootfs.tar $ROOTFS_TMP_DIR | 87 | tar -cf $DUMP_DIR/rootfs.tar $ROOTFS_TMP_DIR |