From 000195105d8d1e8f6103d2dd075da3283805e0ed Mon Sep 17 00:00:00 2001 From: Víctor Mayoral Vilches Date: Thu, 2 Sep 2021 16:52:14 -0700 Subject: Copy DT_OVERLAY to boot partition Copy the device tree overlays to the boot partition so that they can be located and applied directly while booting. Signed-off-by: Víctor Mayoral Vilches Signed-off-by: Brian Woods Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- scripts/disk_image | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/disk_image b/scripts/disk_image index 57309d5..fc64386 100755 --- a/scripts/disk_image +++ b/scripts/disk_image @@ -297,6 +297,15 @@ if test "${DOM0_RAMDISK}" then _part1_size=$(( $_part1_size + `stat -L --printf="%s" $UBOOT_OUT/${DOM0_RAMDISK}` )) fi +if test "$NUM_DT_OVERLAY" && test "$NUM_DT_OVERLAY" -gt 0 +then + i=0 + while test $i -lt "$NUM_DT_OVERLAY" + do + _part1_size=$(( $_part1_size + `stat -L --printf="%s" $UBOOT_OUT/${DT_OVERLAY[$i]}` )) + i=$(( $i + 1 )) + done +fi if test "${UBOOT_SOURCE}" then _part1_size=$(( $_part1_size + `stat -L --printf="%s" $UBOOT_OUT/$UBOOT_SOURCE` )) @@ -427,7 +436,15 @@ if test "${DOM0_RAMDISK}" then cp --parents "$DOM0_RAMDISK" "${DESTDIR_ABS}/part/disk1/" fi - +if test "$NUM_DT_OVERLAY" && test "$NUM_DT_OVERLAY" -gt 0 +then + i=0 + while test $i -lt "$NUM_DT_OVERLAY" + do + cp --parents "${DT_OVERLAY[$i]}" "${DESTDIR_ABS}/part/disk1/" + i=$(( $i + 1 )) + done +fi if test "${UBOOT_SOURCE}" then cp --parents "$UBOOT_SOURCE" "${DESTDIR_ABS}/part/disk1/" -- cgit v1.2.3