aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xscripts/uboot-script-gen19
2 files changed, 16 insertions, 5 deletions
diff --git a/README.md b/README.md
index 6f577b8..d8bfc32 100644
--- a/README.md
+++ b/README.md
@@ -134,6 +134,8 @@ Where:\
can only be used in combination with the -k option. This adds the
public key into the dtb. Then one can add this dtb back into the
u-boot bin or elf.\
+-e specifies if bootefi should be used in the uboot script (instead of \
+ booti). This is an optional argument.
### Signed FIT images
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index de7f00f..51451da 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -126,13 +126,13 @@ function device_tree_editing()
dt_set "/chosen" "\#size-cells" "hex" "0x2"
dt_set "/chosen" "xen,xen-bootargs" "str" "\"$XEN_CMD\""
dt_mknode "/chosen" "dom0"
- dt_set "/chosen/dom0" "compatible" "str" "\"xen,linux-zimage\" \"xen,multiboot-module\""
+ dt_set "/chosen/dom0" "compatible" "str" "\"xen,linux-zimage\" \"xen,multiboot-module\" \"multiboot,module\""
dt_set "/chosen/dom0" "reg" "hex" "0x0 $dom0_kernel_addr 0x0 $(printf "0x%x" $dom0_kernel_size)"
dt_set "/chosen" "xen,dom0-bootargs" "str" "\"$DOM0_CMD\""
if test "$DOM0_RAMDISK" && test $dom0_ramdisk_addr != "-"
then
dt_mknode "/chosen" "dom0-ramdisk"
- dt_set "/chosen/dom0-ramdisk" "compatible" "str" "\"xen,linux-initrd\" \"xen,multiboot-module\""
+ dt_set "/chosen/dom0-ramdisk" "compatible" "str" "\"xen,linux-initrd\" \"xen,multiboot-module\" \"multiboot,module\""
dt_set "/chosen/dom0-ramdisk" "reg" "hex" "0x0 $dom0_ramdisk_addr 0x0 $(printf "0x%x" $dom0_ramdisk_size)"
fi
@@ -259,7 +259,7 @@ function print_help
{
script=`basename "$0"`
echo "usage:"
- echo " $script -c CONFIG_FILE -t UBOOT_TYPE -d DIRECTORY [-o FILE] [-k KEY_DIR/HINT [-u U-BOOT_DTB]]"
+ echo " $script -c CONFIG_FILE -t UBOOT_TYPE -d DIRECTORY [-o FILE] [-k KEY_DIR/HINT [-u U-BOOT_DTB]] [-e]"
echo " $script -h"
echo "where:"
echo " CONFIG_FILE - configuration file"
@@ -275,6 +275,7 @@ function print_help
echo " KEY_DIR - key directory used for signing a fit image"
echo " HINT - the file name of the crt and key file minus the suffix (ex, hint.crt and hint.key)"
echo " U-BOOT_DTB - u-boot control dtb so that the public key gets added to it"
+ echo " -e - uses efiboot rather than booti"
echo " -h - prints out the help message and exits "
echo "Defaults:"
echo " CONFIG_FILE=$cfg_file, UBOOT_TYPE=\"LOAD_CMD\" env var, DIRECTORY=$uboot_dir"
@@ -282,7 +283,7 @@ function print_help
echo " $script -c ../config -d ./build42 -t \"scsi load 1:1\""
}
-while getopts ":c:t:d:ho:k:u:" opt; do
+while getopts ":c:t:d:ho:k:u:e" opt; do
case ${opt} in
t )
case $OPTARG in
@@ -321,6 +322,9 @@ while getopts ":c:t:d:ho:k:u:" opt; do
u )
FIT_ENC_UB_DTB=$OPTARG
;;
+ e )
+ efi=y
+ ;;
h )
print_help
exit 0
@@ -549,7 +553,12 @@ device_tree_editing $device_tree_addr
# disable device tree reloation
echo "setenv fdt_high 0xffffffffffffffff" >> $UBOOT_SOURCE
-echo "booti $xen_addr - $device_tree_addr" >> $UBOOT_SOURCE
+if test "$efi" && test "$efi" = "y"
+then
+ echo "bootefi $xen_addr $device_tree_addr" >> $UBOOT_SOURCE
+else
+ echo "booti $xen_addr - $device_tree_addr" >> $UBOOT_SOURCE
+fi
if test "$fit"
then