From 5c1faa5b84d22aea0995da9b53503b213528afd5 Mon Sep 17 00:00:00 2001 From: Brian Woods Date: Thu, 2 Sep 2021 16:52:16 -0700 Subject: Add support for EFI in config Make it so that EFI enablement can be configured in the config file for uboot-script gen. Signed-off-by: Brian Woods Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- README.md | 5 +++++ scripts/uboot-script-gen | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06e12cb..f8f8022 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ To use it, first write a config file like `config`: ``` MEMORY_START="0x0" MEMORY_END="0x80000000" +EFI=y DEVICE_TREE="mpsoc.dtb" XEN="xen" @@ -61,6 +62,10 @@ FIT="boot.fit" Where: - MEMORY_START and MEMORY_END specify the start and end of RAM. +- EFI specifies if the bootefi boot command should be used over booti. + If set to anything other than "n", "no", or "false" it will enable + bootefi. + - DEVICE_TREE specifies the DTB file to load. - XEN specifies the Xen hypervisor binary to load. Note that it has to diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 14bf988..a911238 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -329,7 +329,7 @@ while getopts ":c:t:d:ho:k:u:ef" opt; do FIT_ENC_UB_DTB=$OPTARG ;; e ) - efi=y + efi_opt=y ;; f ) fit_opt=y @@ -424,6 +424,11 @@ do i=$(( $i + 1 )) done +if test "$efi_opt" +then + EFI="y" +fi + if test "$fit_opt" && ! test "$FIT" then FIT="${UBOOT_SOURCE%.source}.fit" @@ -585,7 +590,7 @@ device_tree_editing $device_tree_addr # disable device tree reloation echo "setenv fdt_high 0xffffffffffffffff" >> $UBOOT_SOURCE -if test "$efi" && test "$efi" = "y" +if test "$EFI" && test "$EFI" != "n" && test "$EFI" != "no" && test "$EFI" != "false" then echo "bootefi $xen_addr $device_tree_addr" >> $UBOOT_SOURCE else -- cgit v1.2.3