Debootstrap-ng fix for devices that don't use boot.scr (odroid)

This commit is contained in:
zador-blood-stained 2016-01-10 19:01:48 +03:00
parent 2cf437fd74
commit 565c4d41e1

View file

@ -468,12 +468,12 @@ create_image()
# needs rewriting and testing u-boot scripts
# for other boards
if [[ $BOOTSIZE != 0 ]]; then
if [[ $BOOTSIZE != 0 && -f $DEST/cache/mount/boot/boot.scr ]]; then
rm -f $DEST/cache/mount/boot/boot.scr
sed -i 's/mmcblk0p1/mmcblk0p2/' $DEST/cache/mount/boot/boot.cmd
# rely on rootfs type autodetect
sed -i 's/rootfstype=ext4//' $DEST/cache/mount/boot/boot.cmd
mkimage -C none -A arm -T script -d $DEST/cache/mount/boot/boot.cmd $DEST/cache/mount/boot/boot.scr > /dev/null
mkimage -C none -A arm -T script -d $DEST/cache/mount/boot/boot.cmd $DEST/cache/mount/boot/boot.scr > /dev/null 2>&1
fi
# DEBUG: print free space