From d571ab545e096dbea41e1ad525a398a783a735f0 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Tue, 7 May 2019 23:17:55 +0700 Subject: [PATCH] tar2fs: implement u-boot support --- bin/tar2fs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/tar2fs b/bin/tar2fs index d0744289..f817e90f 100755 --- a/bin/tar2fs +++ b/bin/tar2fs @@ -271,6 +271,13 @@ echo "** end of boot.conf" popd +# for u-boot +if [ "$BOOTLOADER" = "uboot" ]; then + EXTLINUX_CONF="$ROOTFS/boot/extlinux/extlinux.conf" + sed -i "/LABEL=ROOT/d" "$ROOTFS/etc/fstab" + sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$EXTLINUX_CONF" +fi + if [ -x "$ROOTFS"/sbin/lilo ]; then # configure and install bootloader REGEXP='^.*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'