summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2021-03-31 11:47:07 +0300
committerJia Zhang <zhang.jia@linux.alibaba.com>2021-04-04 22:39:35 +0800
commit596c6c76aefee40c99eecc3ab662ca88dc250729 (patch)
tree958452dc29efeabc6450bb472b1de157752df778
parentf7ae553e6c5d512e8730df2224d690a25fc5e7a5 (diff)
downloadmeta-secure-core-596c6c76aefee40c99eecc3ab662ca88dc250729.tar.gz
grub-efi: enable secure-boot support only for target builds
grub-efi-native does not benefit from the extra code/modules that get built for secure-boot support, it just increases the build time of the package. Therefore, mark all secure-boot related procedures in the recipe for class-target only. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
-rw-r--r--meta-efi-secure-boot/recipes-bsp/grub/grub-efi-efi-secure-boot.inc9
1 files changed, 5 insertions, 4 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 5cdaa1c..c3e7a9c 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
@@ -13,7 +13,7 @@ GRUB_MOKVERIFY_PATCH = " \
13 file://verify-all-buffiles.patch \ 13 file://verify-all-buffiles.patch \
14" 14"
15 15
16SRC_URI += "\ 16SRC_URI_append_class-target += "\
17 file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \ 17 file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \
18 file://0002-shim-add-needed-data-structures.patch \ 18 file://0002-shim-add-needed-data-structures.patch \
19 file://0003-efi-chainloader-implement-an-UEFI-Exit-service-for-s.patch \ 19 file://0003-efi-chainloader-implement-an-UEFI-Exit-service-for-s.patch \
@@ -47,13 +47,14 @@ GRUB_SIGNING_MODULES += "${@'pgp gcry_rsa gcry_sha256 gcry_sha512 --pubkey %s '
47 47
48GRUB_SELOADER_MODULES += "${@'mok2verify ' if d.getVar('UEFI_SELOADER', True) == '1' else ''}" 48GRUB_SELOADER_MODULES += "${@'mok2verify ' if d.getVar('UEFI_SELOADER', True) == '1' else ''}"
49 49
50GRUB_BUILDIN_append += "tftp reboot chain \ 50GRUB_BUILDIN_append_class-target += "\
51 tftp reboot chain \
51 ${GRUB_SECURE_BOOT_MODULES} \ 52 ${GRUB_SECURE_BOOT_MODULES} \
52 ${GRUB_SIGNING_MODULES} \ 53 ${GRUB_SIGNING_MODULES} \
53 ${GRUB_SELOADER_MODULES}" 54 ${GRUB_SELOADER_MODULES}"
54 55
55# For efi_call_foo and efi_shim_exit 56# For efi_call_foo and efi_shim_exit
56CFLAGS_append = " -fno-toplevel-reorder" 57CFLAGS_append_class-target = " -fno-toplevel-reorder"
57 58
58# Set a default root specifier. 59# Set a default root specifier.
59inherit user-key-store 60inherit user-key-store
@@ -78,7 +79,7 @@ python __anonymous () {
78 d.setVar("GRUB_IMAGE", grubimage) 79 d.setVar("GRUB_IMAGE", grubimage)
79} 80}
80 81
81do_compile_append() { 82do_compile_append_class-target() {
82 if [ "${GRUB_SIGN_VERIFY}" = "1" -a "${GRUB_SIGN_VERIFY_STRICT}" = "1" ] ; then 83 if [ "${GRUB_SIGN_VERIFY}" = "1" -a "${GRUB_SIGN_VERIFY_STRICT}" = "1" ] ; then
83 cat<<EOF>${WORKDIR}/cfg 84 cat<<EOF>${WORKDIR}/cfg
84set strict_security=1 85set strict_security=1