From 9136d01782341841796e3bb2b335dea752dc1863 Mon Sep 17 00:00:00 2001 From: Andrei Cherechesu Date: Wed, 27 Jul 2022 13:14:06 -0700 Subject: If the "BOOT_CMD" variable is set to "none" inside the config file, the boot command (i.e. "booti") will not by added to the generated script, to allow the user to customize the u-boot env or the device-tree after executing the script commands and before actually booting. Added commands to store the addresses where the Xen image and device-tree file are loaded, in 'host_kernel_addr' and 'host_fdt_addr' variables, if BOOTCMD = "none". The `booti` command can then be executed as part of the 'bootcmd' variable in u-boot, which should contain: 1. fetching the generated u-boot script 2. executing the script 3. running `booti ${host_kernel_addr} - ${host_fdt_addr}` command Signed-off-by: Andrei Cherechesu Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini --- scripts/uboot-script-gen | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index a4ddd1e..995798d 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -888,7 +888,7 @@ function check_depends() function check_boot_cmd() { - if ! [[ " bootm booti bootefi " =~ " ${BOOT_CMD}" ]] + if ! [[ " bootm booti bootefi none " =~ " ${BOOT_CMD}" ]] then echo "\"BOOT_CMD=$BOOT_CMD\" is not valid" exit 1 @@ -1167,7 +1167,14 @@ then cat $APPEND_EXTRA_CMDS >> $UBOOT_SOURCE fi -echo "$BOOT_CMD $kernel_addr - $device_tree_addr" >> $UBOOT_SOURCE +if [ "$BOOT_CMD" != "none" ] +then + echo "$BOOT_CMD $kernel_addr - $device_tree_addr" >> $UBOOT_SOURCE +else + # skip boot command but store load addresses to be used later + echo "setenv host_kernel_addr $kernel_addr" >> $UBOOT_SOURCE + echo "setenv host_fdt_addr $device_tree_addr" >> $UBOOT_SOURCE +fi if test "$FIT" then -- cgit v1.2.3