Commit 061d6782756f modified load_file() to take load command as
argument but did not change all the invocations (e.g. loading standalone
Linux, bitstream, etc.) which broke the output script (load command
empty). Fix it by defaulting to LOAD_CMD if not specified.

Fixes: 061d6782756f ("Add config option to use separate load commands for Xen, 
DOM0 and DOMU binaries")
Signed-off-by: Michal Orzel <michal.or...@amd.com>
---
 scripts/uboot-script-gen | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 849b8f939e81..4f9261035d73 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -736,6 +736,12 @@ function load_file()
     local base="$(realpath $PWD)"/
     local relative_path=${absolute_path#"$base"}
 
+    # Default to LOAD_CMD if not specified
+    if test -z "${load_cmd}"
+    then
+        load_cmd="${LOAD_CMD}"
+    fi
+
     if test "$FIT"
     then
         echo "imxtract \$fit_addr $fit_scr_name $memaddr" >> $UBOOT_SOURCE
-- 
2.43.0


Reply via email to