projects/S905: update.sh: fix boot failure if space in dtb filename

If the dtb placed in /storage/.update has spaces in filename, dd command fails leaving system without device tree as it has been previously erased
This commit is contained in:
CyBHFal 2017-12-10 01:08:08 +01:00 committed by Adam Green
parent 16380c0abb
commit 7a1c2db8f7
No known key found for this signature in database
GPG Key ID: 52B701B6EF2F2E58

View File

@ -68,11 +68,11 @@ for arg in $(cat /proc/cmdline); do
case $boot in
/dev/system)
dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none
dd if=$UPDATE_DTB_SOURCE of=/dev/dtb bs=256k status=none
dd if="$UPDATE_DTB_SOURCE" of=/dev/dtb bs=256k status=none
;;
/dev/mmc*|LABEL=*)
mount -o rw,remount $BOOT_ROOT
cp -f $UPDATE_DTB_SOURCE "$BOOT_ROOT/dtb.img"
cp -f "$UPDATE_DTB_SOURCE" "$BOOT_ROOT/dtb.img"
;;
esac
fi