summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc
index 6feee6c..88818ea 100644
--- a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc
+++ b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc
@@ -36,6 +36,7 @@ SRC_URI += "\
36# functions efi_call_foo and efi_shim_exit are not implemented for arm64 yet 36# functions efi_call_foo and efi_shim_exit are not implemented for arm64 yet
37COMPATIBLE_HOST_aarch64 = 'null' 37COMPATIBLE_HOST_aarch64 = 'null'
38 38
39GRUB_PREFIX_DIR ?= "/EFI/BOOT"
39EFI_BOOT_PATH ?= "/boot/efi/EFI/BOOT" 40EFI_BOOT_PATH ?= "/boot/efi/EFI/BOOT"
40 41
41GRUB_SECURE_BOOT_MODULES += "${@'efivar password_pbkdf2 ' if d.getVar('UEFI_SB', True) == '1' else ''}" 42GRUB_SECURE_BOOT_MODULES += "${@'efivar password_pbkdf2 ' if d.getVar('UEFI_SB', True) == '1' else ''}"
@@ -81,13 +82,13 @@ do_compile_append() {
81 cat<<EOF>${WORKDIR}/cfg 82 cat<<EOF>${WORKDIR}/cfg
82insmod verify 83insmod verify
83set strict_security=1 84set strict_security=1
84search.file (\$cmdpath)/EFI/BOOT/grub.cfg root 85search.file (\$cmdpath)${GRUB_PREFIX_DIR}/grub.cfg root
85set prefix=(\$root)/EFI/BOOT 86set prefix=(\$root)${GRUB_PREFIX_DIR}
86EOF 87EOF
87 else 88 else
88 cat<<EOF>${WORKDIR}/cfg 89 cat<<EOF>${WORKDIR}/cfg
89search.file (\$cmdpath)/EFI/BOOT/grub.cfg root 90search.file (\$cmdpath)${GRUB_PREFIX_DIR}/grub.cfg root
90set prefix=(\$root)/EFI/BOOT 91set prefix=(\$root)${GRUB_PREFIX_DIR}
91EOF 92EOF
92 fi 93 fi
93} 94}
@@ -130,7 +131,7 @@ do_install_append_class-target() {
130 grub-editenv "${D}${EFI_BOOT_PATH}/grubenv" create 131 grub-editenv "${D}${EFI_BOOT_PATH}/grubenv" create
131 132
132 install -d "${D}${EFI_BOOT_PATH}/${GRUB_TARGET}-efi" 133 install -d "${D}${EFI_BOOT_PATH}/${GRUB_TARGET}-efi"
133 grub-mkimage -c ../cfg -p /EFI/BOOT -d "./grub-core" \ 134 grub-mkimage -c ../cfg -p "${GRUB_PREFIX_DIR}" -d "./grub-core" \
134 -O "${GRUB_TARGET}-efi" -o "${B}/${GRUB_IMAGE}" \ 135 -O "${GRUB_TARGET}-efi" -o "${B}/${GRUB_IMAGE}" \
135 ${GRUB_BUILDIN} 136 ${GRUB_BUILDIN}
136 137