forked from len0rd/rockbox
nwztools/script: fix dump_rootfs.sh to handle ext4
Change-Id: I04bd7599a58669df96dfd018a2ab0e3d53e06694
This commit is contained in:
parent
2ea0ccb6c5
commit
d052f13999
1 changed files with 16 additions and 2 deletions
|
@ -66,8 +66,22 @@ lcdmsg -f /usr/local/bin/font_08x12.bmp -l 0,12 "Dumping rootfs..."
|
|||
ROOTFS_TMP_DIR=/tmp/rootfs
|
||||
mkdir $ROOTFS_TMP_DIR
|
||||
. /install_script/constant.txt
|
||||
if ! mount -t ext3 -o ro $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
|
||||
then
|
||||
|
||||
# If there is an ext4 mounter, try it. Otherwise or on failure, try ext3 and
|
||||
# then ext2.
|
||||
# NOTE some platforms probably use an mtd and this might need some fixing
|
||||
if [ -e /usr/local/bin/icx_mount.ext4 ]; then
|
||||
/usr/local/bin/icx_mount.ext4 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
|
||||
else
|
||||
false
|
||||
fi
|
||||
if [ "$?" != 0 ]; then
|
||||
mount -t ext3 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
|
||||
fi
|
||||
if [ "$?" != 0 ]; then
|
||||
mount -t ext2 $COMMON_ROOTFS_PARTITION $ROOTFS_TMP_DIR
|
||||
fi
|
||||
if [ "$?" != 0 ]; then
|
||||
lcdmsg -f /usr/local/bin/font_08x12.bmp -l 0,13 "ERROR: cannot mount rootfs"
|
||||
else
|
||||
tar -cf $DUMP_DIR/rootfs.tar $ROOTFS_TMP_DIR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue