diff options
| author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2021-03-31 11:47:07 +0300 |
|---|---|---|
| committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2021-04-04 22:39:35 +0800 |
| commit | 596c6c76aefee40c99eecc3ab662ca88dc250729 (patch) | |
| tree | 958452dc29efeabc6450bb472b1de157752df778 | |
| parent | f7ae553e6c5d512e8730df2224d690a25fc5e7a5 (diff) | |
| download | meta-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.inc | 9 |
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 | ||
| 16 | SRC_URI += "\ | 16 | SRC_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 | ||
| 48 | GRUB_SELOADER_MODULES += "${@'mok2verify ' if d.getVar('UEFI_SELOADER', True) == '1' else ''}" | 48 | GRUB_SELOADER_MODULES += "${@'mok2verify ' if d.getVar('UEFI_SELOADER', True) == '1' else ''}" |
| 49 | 49 | ||
| 50 | GRUB_BUILDIN_append += "tftp reboot chain \ | 50 | GRUB_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 |
| 56 | CFLAGS_append = " -fno-toplevel-reorder" | 57 | CFLAGS_append_class-target = " -fno-toplevel-reorder" |
| 57 | 58 | ||
| 58 | # Set a default root specifier. | 59 | # Set a default root specifier. |
| 59 | inherit user-key-store | 60 | inherit 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 | ||
| 81 | do_compile_append() { | 82 | do_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 |
| 84 | set strict_security=1 | 85 | set strict_security=1 |
