diff options
| author | Anuj Mittal <anuj.mittal@intel.com> | 2024-05-28 11:51:26 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2024-05-30 10:27:20 +0800 |
| commit | f222ac31c595c2c85e2b3de7ecd22fac5e02cc3c (patch) | |
| tree | 5c3ec830fc3f900540358d848050208af2bed5df | |
| parent | b47467609da1a955ed63b8ada893fe0fb9312d3c (diff) | |
| download | meta-intel-f222ac31c595c2c85e2b3de7ecd22fac5e02cc3c.tar.gz | |
recipes: remove secureboot selftest and images
This no longer works and is not maintained and tested.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
| -rw-r--r-- | classes/uefi-comboapp.bbclass | 151 | ||||
| -rw-r--r-- | classes/uefi-sign.bbclass | 50 | ||||
| -rw-r--r-- | conf/include/maintainers.inc | 4 | ||||
| -rw-r--r-- | lib/oeqa/selftest/cases/secureboot.py | 176 | ||||
| -rw-r--r-- | recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch | 129 | ||||
| -rw-r--r-- | recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb | 13 | ||||
| -rw-r--r-- | recipes-core/ovmf/ovmf_%.bbappend | 6 | ||||
| -rw-r--r-- | recipes-selftest/images/files/incorrect.crt | 19 | ||||
| -rw-r--r-- | recipes-selftest/images/files/incorrect.key | 27 | ||||
| -rw-r--r-- | recipes-selftest/images/files/refkit-db.crt | 18 | ||||
| -rw-r--r-- | recipes-selftest/images/files/refkit-db.key | 28 | ||||
| -rw-r--r-- | recipes-selftest/images/secureboot-selftest-image-signed.bb | 6 | ||||
| -rw-r--r-- | recipes-selftest/images/secureboot-selftest-image-unsigned.bb | 20 | ||||
| -rw-r--r-- | recipes-support/sbsigntool/sbsigntool-native_git.bb | 83 | ||||
| -rw-r--r-- | recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch | 54 |
15 files changed, 0 insertions, 784 deletions
diff --git a/classes/uefi-comboapp.bbclass b/classes/uefi-comboapp.bbclass deleted file mode 100644 index a05e0ca0..00000000 --- a/classes/uefi-comboapp.bbclass +++ /dev/null | |||
| @@ -1,151 +0,0 @@ | |||
| 1 | # This class brings a more generic version of the UEFI combo app from refkit to meta-intel. | ||
| 2 | # It uses a combo file, containing kernel, initramfs and | ||
| 3 | # command line, presented to the BIOS as UEFI application, by prepending | ||
| 4 | # it with the efi stub obtained from systemd-boot. | ||
| 5 | |||
| 6 | # Don't add syslinux or build an ISO | ||
| 7 | PCBIOS:forcevariable = "0" | ||
| 8 | NOISO:forcevariable = "1" | ||
| 9 | |||
| 10 | # image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. | ||
| 11 | # We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so | ||
| 12 | # we default INITRD_LIVE to the INITRD_IMAGE as well. | ||
| 13 | INITRD_IMAGE ?= "core-image-minimal-initramfs" | ||
| 14 | INITRD_LIVE ?= " ${@ ('${DEPLOY_DIR_IMAGE}/' + d.getVar('INITRD_IMAGE', expand=True) + '-${MACHINE}.cpio.gz') if d.getVar('INITRD_IMAGE', True) else ''}" | ||
| 15 | |||
| 16 | do_uefiapp[depends] += " \ | ||
| 17 | intel-microcode:do_deploy \ | ||
| 18 | systemd-boot:do_deploy \ | ||
| 19 | virtual/kernel:do_deploy \ | ||
| 20 | " | ||
| 21 | |||
| 22 | # INITRD_IMAGE is added to INITRD_LIVE, which we use to create our initrd, so depend on it if it is set | ||
| 23 | do_uefiapp[depends] += "${@ '${INITRD_IMAGE}:do_image_complete' if d.getVar('INITRD_IMAGE') else ''}" | ||
| 24 | |||
| 25 | # The image does without traditional bootloader. | ||
| 26 | # In its place, instead, it uses a single UEFI executable binary, which is | ||
| 27 | # composed by: | ||
| 28 | # - an UEFI stub | ||
| 29 | # The linux kernel can generate a UEFI stub, however the one from systemd-boot can fetch | ||
| 30 | # the command line from a separate section of the EFI application, avoiding the need to | ||
| 31 | # rebuild the kernel. | ||
| 32 | # - the kernel | ||
| 33 | # - an initramfs (optional) | ||
| 34 | |||
| 35 | def create_uefiapp(d, uuid=None, app_suffix=''): | ||
| 36 | import glob, re | ||
| 37 | from subprocess import check_call | ||
| 38 | |||
| 39 | build_dir = d.getVar('B') | ||
| 40 | deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') | ||
| 41 | image_link_name = d.getVar('IMAGE_LINK_NAME') | ||
| 42 | |||
| 43 | cmdline = '%s/cmdline.txt' % build_dir | ||
| 44 | linux = '%s/%s' % (deploy_dir_image, d.getVar('KERNEL_IMAGETYPE')) | ||
| 45 | initrd = '%s/initrd' % build_dir | ||
| 46 | |||
| 47 | stub_path = '%s/linux*.efi.stub' % deploy_dir_image | ||
| 48 | stub = glob.glob(stub_path)[0] | ||
| 49 | m = re.match(r"\S*(ia32|x64)(.efi)\S*", os.path.basename(stub)) | ||
| 50 | app = "boot%s%s%s" % (m.group(1), app_suffix, m.group(2)) | ||
| 51 | executable = '%s/%s.%s' % (deploy_dir_image, image_link_name, app) | ||
| 52 | |||
| 53 | if d.getVar('INITRD_LIVE'): | ||
| 54 | with open(initrd, 'wb') as dst: | ||
| 55 | for cpio in d.getVar('INITRD_LIVE').split(): | ||
| 56 | with open(cpio, 'rb') as src: | ||
| 57 | dst.write(src.read()) | ||
| 58 | initrd_cmd = "--add-section .initrd=%s --change-section-vma .initrd=0x3000000 " % initrd | ||
| 59 | else: | ||
| 60 | initrd_cmd = "" | ||
| 61 | |||
| 62 | root = 'root=PARTUUID=%s' % uuid if uuid else '' | ||
| 63 | |||
| 64 | with open(cmdline, 'w') as f: | ||
| 65 | f.write('%s %s' % (d.getVar('APPEND'), root)) | ||
| 66 | |||
| 67 | objcopy_cmd = ("objcopy " | ||
| 68 | "--add-section .cmdline=%s --change-section-vma .cmdline=0x30000 " | ||
| 69 | "--add-section .linux=%s --change-section-vma .linux=0x40000 " | ||
| 70 | "%s %s %s") % \ | ||
| 71 | (cmdline, linux, initrd_cmd, stub, executable) | ||
| 72 | |||
| 73 | check_call(objcopy_cmd, shell=True) | ||
| 74 | |||
| 75 | python create_uefiapps () { | ||
| 76 | # We must clean up anything that matches the expected output pattern, to ensure that | ||
| 77 | # the next steps do not accidentally use old files. | ||
| 78 | import glob | ||
| 79 | pattern = d.expand('${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi') | ||
| 80 | for old_efi in glob.glob(pattern): | ||
| 81 | os.unlink(old_efi) | ||
| 82 | uuid = d.getVar('DISK_SIGNATURE_UUID') | ||
| 83 | create_uefiapp(d, uuid=uuid) | ||
| 84 | } | ||
| 85 | |||
| 86 | # This is intentionally split into different parts. This way, derived | ||
| 87 | # classes or images can extend the individual parts. We can also use | ||
| 88 | # whatever language (shell script or Python) is more suitable. | ||
| 89 | python do_uefiapp() { | ||
| 90 | bb.build.exec_func('create_uefiapps', d) | ||
| 91 | } | ||
| 92 | |||
| 93 | do_uefiapp[vardeps] += "APPEND DISK_SIGNATURE_UUID INITRD_LIVE KERNEL_IMAGETYPE IMAGE_LINK_NAME" | ||
| 94 | |||
| 95 | uefiapp_deploy_at() { | ||
| 96 | dest=$1 | ||
| 97 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
| 98 | target=`basename $i` | ||
| 99 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
| 100 | cp --preserve=timestamps -r $i $dest/$target | ||
| 101 | done | ||
| 102 | } | ||
| 103 | |||
| 104 | fakeroot do_uefiapp_deploy() { | ||
| 105 | rm -rf ${IMAGE_ROOTFS}/boot/* | ||
| 106 | dest=${IMAGE_ROOTFS}/boot/EFI/BOOT | ||
| 107 | mkdir -p $dest | ||
| 108 | uefiapp_deploy_at $dest | ||
| 109 | } | ||
| 110 | |||
| 111 | do_uefiapp_deploy[depends] += "${PN}:do_uefiapp virtual/fakeroot-native:do_populate_sysroot" | ||
| 112 | |||
| 113 | |||
| 114 | # This decides when/how we add our tasks to the image | ||
| 115 | python () { | ||
| 116 | image_fstypes = d.getVar('IMAGE_FSTYPES', True) | ||
| 117 | initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) | ||
| 118 | |||
| 119 | # Don't add any of these tasks to initramfs images | ||
| 120 | if initramfs_fstypes not in image_fstypes: | ||
| 121 | bb.build.addtask('uefiapp', 'do_image', 'do_rootfs', d) | ||
| 122 | bb.build.addtask('uefiapp_deploy', 'do_image', 'do_rootfs', d) | ||
| 123 | } | ||
| 124 | |||
| 125 | SIGN_AFTER ?= "do_uefiapp" | ||
| 126 | SIGN_BEFORE ?= "do_uefiapp_deploy" | ||
| 127 | SIGNING_DIR ?= "${DEPLOY_DIR_IMAGE}" | ||
| 128 | SIGNING_BINARIES ?= "${IMAGE_LINK_NAME}.boot*.efi" | ||
| 129 | inherit uefi-sign | ||
| 130 | |||
| 131 | # Legacy hddimg support below this line | ||
| 132 | efi_hddimg_populate() { | ||
| 133 | uefiapp_deploy_at "$1" | ||
| 134 | } | ||
| 135 | |||
| 136 | build_efi_cfg() { | ||
| 137 | # The command line is built into the combo app, so this is a null op | ||
| 138 | : | ||
| 139 | } | ||
| 140 | |||
| 141 | populate_kernel:append() { | ||
| 142 | # The kernel and initrd are built into the app, so we don't need these | ||
| 143 | if [ -f $dest/initrd ]; then | ||
| 144 | rm $dest/initrd | ||
| 145 | fi | ||
| 146 | if [ -f $dest/vmlinuz ]; then | ||
| 147 | rm $dest/vmlinuz | ||
| 148 | fi | ||
| 149 | } | ||
| 150 | |||
| 151 | IMAGE_FEATURES[validitems] += "secureboot" | ||
diff --git a/classes/uefi-sign.bbclass b/classes/uefi-sign.bbclass deleted file mode 100644 index e8f203b9..00000000 --- a/classes/uefi-sign.bbclass +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | # By default, sign all .efi binaries in ${B} after compiling and before deploying | ||
| 2 | SIGNING_DIR ?= "${B}" | ||
| 3 | SIGNING_BINARIES ?= "*.efi" | ||
| 4 | SIGN_AFTER ?= "do_compile" | ||
| 5 | SIGN_BEFORE ?= "do_deploy" | ||
| 6 | |||
| 7 | python () { | ||
| 8 | import os | ||
| 9 | import hashlib | ||
| 10 | |||
| 11 | # Ensure that if the signing key or cert change, we rerun the uefiapp process | ||
| 12 | if bb.utils.contains('IMAGE_FEATURES', 'secureboot', True, False, d): | ||
| 13 | for varname in ('SECURE_BOOT_SIGNING_CERT', 'SECURE_BOOT_SIGNING_KEY'): | ||
| 14 | filename = d.getVar(varname) | ||
| 15 | if filename is None: | ||
| 16 | bb.fatal('%s is not set.' % varname) | ||
| 17 | if not os.path.isfile(filename): | ||
| 18 | bb.fatal('%s=%s is not a file.' % (varname, filename)) | ||
| 19 | with open(filename, 'rb') as f: | ||
| 20 | data = f.read() | ||
| 21 | hash = hashlib.sha256(data).hexdigest() | ||
| 22 | d.setVar('%s_HASH' % varname, hash) | ||
| 23 | |||
| 24 | # Must reparse and thus rehash on file changes. | ||
| 25 | bb.parse.mark_dependency(d, filename) | ||
| 26 | |||
| 27 | bb.build.addtask('uefi_sign', d.getVar('SIGN_BEFORE'), d.getVar('SIGN_AFTER'), d) | ||
| 28 | |||
| 29 | # Original binary needs to be regenerated if the hash changes since we overwrite it | ||
| 30 | # SIGN_AFTER isn't necessarily when it gets generated, but its our best guess | ||
| 31 | d.appendVarFlag(d.getVar('SIGN_AFTER'), 'vardeps', 'SECURE_BOOT_SIGNING_CERT_HASH SECURE_BOOT_SIGNING_KEY_HASH') | ||
| 32 | } | ||
| 33 | |||
| 34 | do_uefi_sign() { | ||
| 35 | if [ -f ${SECURE_BOOT_SIGNING_KEY} ] && [ -f ${SECURE_BOOT_SIGNING_CERT} ]; then | ||
| 36 | for i in `find ${SIGNING_DIR}/ -name '${SIGNING_BINARIES}'`; do | ||
| 37 | sbsign --key ${SECURE_BOOT_SIGNING_KEY} --cert ${SECURE_BOOT_SIGNING_CERT} $i | ||
| 38 | sbverify --cert ${SECURE_BOOT_SIGNING_CERT} $i.signed | ||
| 39 | mv $i.signed $i | ||
| 40 | done | ||
| 41 | fi | ||
| 42 | } | ||
| 43 | |||
| 44 | do_uefi_sign[depends] += "sbsigntool-native:do_populate_sysroot" | ||
| 45 | |||
| 46 | do_uefi_sign[vardeps] += "SECURE_BOOT_SIGNING_CERT_HASH \ | ||
| 47 | SECURE_BOOT_SIGNING_KEY_HASH \ | ||
| 48 | SIGNING_BINARIES SIGNING_DIR \ | ||
| 49 | SIGN_BEFORE SIGN_AFTER \ | ||
| 50 | " | ||
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc index 990fbb08..3403b6b6 100644 --- a/conf/include/maintainers.inc +++ b/conf/include/maintainers.inc | |||
| @@ -46,10 +46,6 @@ RECIPE_MAINTAINER:pn-openvino-inference-engine = "Anuj Mittal <anuj.mittal@intel | |||
| 46 | RECIPE_MAINTAINER:pn-openvino-model-optimizer = "Anuj Mittal <anuj.mittal@intel.com>" | 46 | RECIPE_MAINTAINER:pn-openvino-model-optimizer = "Anuj Mittal <anuj.mittal@intel.com>" |
| 47 | RECIPE_MAINTAINER:pn-openvkl = "Naveen Saini <naveen.kumar.saini@intel.com>" | 47 | RECIPE_MAINTAINER:pn-openvkl = "Naveen Saini <naveen.kumar.saini@intel.com>" |
| 48 | RECIPE_MAINTAINER:pn-ospray = "Naveen Saini <naveen.kumar.saini@intel.com>" | 48 | RECIPE_MAINTAINER:pn-ospray = "Naveen Saini <naveen.kumar.saini@intel.com>" |
| 49 | RECIPE_MAINTAINER:pn-ovmf-shell-image-enrollkeys = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
| 50 | RECIPE_MAINTAINER:pn-rkcommon = "Naveen Saini <naveen.kumar.saini@intel.com>" | 49 | RECIPE_MAINTAINER:pn-rkcommon = "Naveen Saini <naveen.kumar.saini@intel.com>" |
| 51 | RECIPE_MAINTAINER:pn-sbsigntool-native = "Anuj Mittal <anuj.mittal@intel.com>" | ||
| 52 | RECIPE_MAINTAINER:pn-secureboot-selftest-image-signed = "Anuj Mittal <anuj.mittal@intel.com>" | ||
| 53 | RECIPE_MAINTAINER:pn-secureboot-selftest-image-unsigned = "Anuj Mittal <anuj.mittal@intel.com>" | ||
| 54 | RECIPE_MAINTAINER:pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>" | 50 | RECIPE_MAINTAINER:pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>" |
| 55 | RECIPE_MAINTAINER:pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" | 51 | RECIPE_MAINTAINER:pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" |
diff --git a/lib/oeqa/selftest/cases/secureboot.py b/lib/oeqa/selftest/cases/secureboot.py deleted file mode 100644 index 4c059e25..00000000 --- a/lib/oeqa/selftest/cases/secureboot.py +++ /dev/null | |||
| @@ -1,176 +0,0 @@ | |||
| 1 | #!/usr/bin/env python | ||
| 2 | # ex:ts=4:sw=4:sts=4:et | ||
| 3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
| 4 | # | ||
| 5 | # Copyright (c) 2017, Intel Corporation. | ||
| 6 | # All rights reserved. | ||
| 7 | # | ||
| 8 | # This program is free software; you can redistribute it and/or modify | ||
| 9 | # it under the terms of the GNU General Public License version 2 as | ||
| 10 | # published by the Free Software Foundation. | ||
| 11 | # | ||
| 12 | # This program is distributed in the hope that it will be useful, | ||
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | # GNU General Public License for more details. | ||
| 16 | # | ||
| 17 | # You should have received a copy of the GNU General Public License along | ||
| 18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | # | ||
| 21 | # AUTHORS | ||
| 22 | # Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
| 23 | # | ||
| 24 | # Based on meta/lib/oeqa/selftest/* and meta-refkit/lib/oeqa/selftest/* | ||
| 25 | |||
| 26 | """Test cases for secure boot with QEMU running OVMF.""" | ||
| 27 | |||
| 28 | import os | ||
| 29 | import unittest | ||
| 30 | import re | ||
| 31 | import glob | ||
| 32 | from shutil import rmtree, copy | ||
| 33 | |||
| 34 | from oeqa.core.decorator.depends import OETestDepends | ||
| 35 | from oeqa.selftest.case import OESelftestTestCase | ||
| 36 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu | ||
| 37 | |||
| 38 | class SecureBootTests(OESelftestTestCase): | ||
| 39 | """Secure Boot test class.""" | ||
| 40 | |||
| 41 | ovmf_keys_enrolled = False | ||
| 42 | ovmf_qemuparams = '' | ||
| 43 | ovmf_dir = '' | ||
| 44 | test_image_unsigned = 'secureboot-selftest-image-unsigned' | ||
| 45 | test_image_signed = 'secureboot-selftest-image-signed' | ||
| 46 | correct_key = 'refkit-db' | ||
| 47 | incorrect_key = 'incorrect' | ||
| 48 | |||
| 49 | @classmethod | ||
| 50 | def setUpLocal(self): | ||
| 51 | |||
| 52 | if not SecureBootTests.ovmf_keys_enrolled: | ||
| 53 | bitbake('ovmf ovmf-shell-image-enrollkeys', output_log=self.logger) | ||
| 54 | |||
| 55 | bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_IMAGE']) | ||
| 56 | |||
| 57 | SecureBootTests.ovmf_dir = os.path.join(bb_vars['TMPDIR'], 'oeselftest', 'secureboot', 'ovmf') | ||
| 58 | bb.utils.mkdirhier(SecureBootTests.ovmf_dir) | ||
| 59 | |||
| 60 | # Copy (all) OVMF in a temporary location | ||
| 61 | for src in glob.glob('%s/ovmf.*' % bb_vars['DEPLOY_DIR_IMAGE']): | ||
| 62 | copy(src, SecureBootTests.ovmf_dir) | ||
| 63 | |||
| 64 | SecureBootTests.ovmf_qemuparams = '-drive if=pflash,format=qcow2,file=%s/ovmf.secboot.qcow2' % SecureBootTests.ovmf_dir | ||
| 65 | |||
| 66 | cmd = ("runqemu " | ||
| 67 | "qemuparams='%s' " | ||
| 68 | "ovmf-shell-image-enrollkeys wic intel-corei7-64 " | ||
| 69 | "nographic slirp") % SecureBootTests.ovmf_qemuparams | ||
| 70 | print('Running "%s"' % cmd) | ||
| 71 | status = runCmd(cmd) | ||
| 72 | |||
| 73 | if not re.search('info: success', status.output, re.M): | ||
| 74 | self.fail('Failed to enroll keys. EFI shell log:\n%s' % status.output) | ||
| 75 | else: | ||
| 76 | # keys enrolled in ovmf.secboot.vars | ||
| 77 | SecureBootTests.ovmf_keys_enrolled = True | ||
| 78 | |||
| 79 | @classmethod | ||
| 80 | def tearDownLocal(self): | ||
| 81 | # Seems this is mandatory between the tests (a signed image is booted | ||
| 82 | # when running test_boot_unsigned_image after test_boot_signed_image). | ||
| 83 | # bitbake('-c clean %s' % test_image, output_log=self.logger) | ||
| 84 | # | ||
| 85 | # Whatever the problem was, it no longer seems to be necessary, so | ||
| 86 | # we can skip the time-consuming clean + full rebuild (5:04 min instead | ||
| 87 | # of 6:55min here). | ||
| 88 | pass | ||
| 89 | |||
| 90 | @classmethod | ||
| 91 | def tearDownClass(self): | ||
| 92 | bitbake('ovmf-shell-image-enrollkeys:do_cleanall', output_log=self.logger) | ||
| 93 | rmtree(self.ovmf_dir, ignore_errors=True) | ||
| 94 | |||
| 95 | def secureboot_with_image(self, boot_timeout=300, signing_key=None): | ||
| 96 | """Boot the image with UEFI SecureBoot enabled and see the result. """ | ||
| 97 | |||
| 98 | config = "" | ||
| 99 | |||
| 100 | if signing_key: | ||
| 101 | test_image = self.test_image_signed | ||
| 102 | config += 'SECURE_BOOT_SIGNING_KEY = "${THISDIR}/files/%s.key"\n' % signing_key | ||
| 103 | config += 'SECURE_BOOT_SIGNING_CERT = "${THISDIR}/files/%s.crt"\n' % signing_key | ||
| 104 | else: | ||
| 105 | test_image = self.test_image_unsigned | ||
| 106 | |||
| 107 | self.write_config(config) | ||
| 108 | bitbake(test_image, output_log=self.logger) | ||
| 109 | self.remove_config(config) | ||
| 110 | |||
| 111 | # Some of the cases depend on the timeout to expire. Allow overrides | ||
| 112 | # so that we don't have to wait 1000s which is the default. | ||
| 113 | overrides = { | ||
| 114 | 'TEST_QEMUBOOT_TIMEOUT': boot_timeout, | ||
| 115 | } | ||
| 116 | |||
| 117 | print('Booting %s' % test_image) | ||
| 118 | |||
| 119 | try: | ||
| 120 | with runqemu(test_image, ssh=False, | ||
| 121 | runqemuparams='nographic slirp', | ||
| 122 | qemuparams=self.ovmf_qemuparams, | ||
| 123 | overrides=overrides, | ||
| 124 | image_fstype='wic') as qemu: | ||
| 125 | |||
| 126 | cmd = 'uname -a' | ||
| 127 | |||
| 128 | status, output = qemu.run_serial(cmd) | ||
| 129 | |||
| 130 | self.assertTrue(status, 'Could not run \'uname -a\' (status=%s):\n%s' % (status, output)) | ||
| 131 | |||
| 132 | # if we got this far without a correctly signed image, something went wrong | ||
| 133 | if signing_key != self.correct_key: | ||
| 134 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
| 135 | |||
| 136 | |||
| 137 | except Exception: | ||
| 138 | |||
| 139 | # Currently runqemu() fails if 'login:' prompt is not seen and it's | ||
| 140 | # not possible to login as 'root'. Those conditions aren't met when | ||
| 141 | # booting to EFI shell (See [YOCTO #11438]). We catch the failure | ||
| 142 | # and parse the boot log to determine the success. Note: the | ||
| 143 | # timeout triggers verbose bb.error() but that's normal with some | ||
| 144 | # of the test cases. | ||
| 145 | |||
| 146 | workdir = get_bb_var('WORKDIR', test_image) | ||
| 147 | bootlog = "%s/testimage/qemu_boot_log" % workdir | ||
| 148 | |||
| 149 | with open(bootlog, "r") as log: | ||
| 150 | |||
| 151 | # This isn't right but all we can do at this point. The right | ||
| 152 | # approach would run commands in the EFI shell to determine | ||
| 153 | # the BIOS rejects unsigned and/or images signed with keys in | ||
| 154 | # dbx key store but that needs changes in oeqa framework. | ||
| 155 | |||
| 156 | output = log.read() | ||
| 157 | |||
| 158 | # PASS if we see a security violation on unsigned or incorrectly signed images, otherwise fail | ||
| 159 | if signing_key == self.correct_key: | ||
| 160 | self.fail('Correctly signed image failed to boot. Boot log:\n%s' % output) | ||
| 161 | elif not re.search('Security Violation', output): | ||
| 162 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
| 163 | |||
| 164 | def test_boot_unsigned_image(self): | ||
| 165 | """ Boot unsigned image with secureboot enabled in UEFI.""" | ||
| 166 | self.secureboot_with_image(boot_timeout=120, signing_key=None) | ||
| 167 | |||
| 168 | @OETestDepends(['secureboot.SecureBootTests.test_boot_unsigned_image']) | ||
| 169 | def test_boot_incorrectly_signed_image(self): | ||
| 170 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
| 171 | self.secureboot_with_image(boot_timeout=120, signing_key=self.incorrect_key) | ||
| 172 | |||
| 173 | @OETestDepends(['secureboot.SecureBootTests.test_boot_incorrectly_signed_image']) | ||
| 174 | def test_boot_correctly_signed_image(self): | ||
| 175 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
| 176 | self.secureboot_with_image(boot_timeout=150, signing_key=self.correct_key) | ||
diff --git a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch deleted file mode 100644 index 7eb3bc69..00000000 --- a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | From b2099e7184d48a6d05c8713b6fd5dac0e2e70963 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
| 3 | Date: Wed, 2 Mar 2022 10:55:35 +0800 | ||
| 4 | Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot | ||
| 5 | |||
| 6 | This patch adds refkit-db.cer (via xxd -i) in OVMF's db | ||
| 7 | signature database when used with EnrollDefaultKeys EFI | ||
| 8 | application. It's used for testing purposes only. | ||
| 9 | |||
| 10 | Images signed with refkit-db keys are allowed to boot. | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate | ||
| 13 | |||
| 14 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
| 15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 16 | --- | ||
| 17 | OvmfPkg/EnrollDefaultKeys/AuthData.c | 69 +++++++++++++++++++ | ||
| 18 | OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 3 + | ||
| 19 | OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | 2 + | ||
| 20 | 3 files changed, 74 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/OvmfPkg/EnrollDefaultKeys/AuthData.c b/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
| 23 | index 53ee7f7003..127131cd05 100644 | ||
| 24 | --- a/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
| 25 | +++ b/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
| 26 | @@ -395,6 +395,75 @@ CONST UINT8 mMicrosoftUefiCa[] = { | ||
| 27 | |||
| 28 | CONST UINTN mSizeOfMicrosoftUefiCa = sizeof mMicrosoftUefiCa; | ||
| 29 | |||
| 30 | +CONST UINT8 mRefkitTestCA[] = { | ||
| 31 | + 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, | ||
| 32 | + 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, | ||
| 33 | + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, | ||
| 34 | + 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, | ||
| 35 | + 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, | ||
| 36 | + 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, | ||
| 37 | + 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, | ||
| 38 | + 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, | ||
| 39 | + 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, | ||
| 40 | + 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, | ||
| 41 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, | ||
| 42 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, | ||
| 43 | + 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, | ||
| 44 | + 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, | ||
| 45 | + 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, | ||
| 46 | + 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, | ||
| 47 | + 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f, | ||
| 48 | + 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c, | ||
| 49 | + 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9, | ||
| 50 | + 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95, | ||
| 51 | + 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd, | ||
| 52 | + 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96, | ||
| 53 | + 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51, | ||
| 54 | + 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8, | ||
| 55 | + 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86, | ||
| 56 | + 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2, | ||
| 57 | + 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81, | ||
| 58 | + 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb, | ||
| 59 | + 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d, | ||
| 60 | + 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1, | ||
| 61 | + 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c, | ||
| 62 | + 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47, | ||
| 63 | + 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39, | ||
| 64 | + 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00, | ||
| 65 | + 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, | ||
| 66 | + 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, | ||
| 67 | + 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, | ||
| 68 | + 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, | ||
| 69 | + 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46, | ||
| 70 | + 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06, | ||
| 71 | + 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, | ||
| 72 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, | ||
| 73 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43, | ||
| 74 | + 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52, | ||
| 75 | + 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68, | ||
| 76 | + 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9, | ||
| 77 | + 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33, | ||
| 78 | + 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85, | ||
| 79 | + 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71, | ||
| 80 | + 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd, | ||
| 81 | + 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba, | ||
| 82 | + 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35, | ||
| 83 | + 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37, | ||
| 84 | + 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38, | ||
| 85 | + 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d, | ||
| 86 | + 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c, | ||
| 87 | + 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14, | ||
| 88 | + 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25, | ||
| 89 | + 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10, | ||
| 90 | + 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b, | ||
| 91 | + 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92, | ||
| 92 | + 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba, | ||
| 93 | + 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d, | ||
| 94 | + 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3 | ||
| 95 | +}; | ||
| 96 | + | ||
| 97 | +CONST UINTN mSizeOfRefkitTestCA = sizeof mRefkitTestCA; | ||
| 98 | + | ||
| 99 | // | ||
| 100 | // The Microsoft.UefiSecureBootLogo.Tests.OutOfBoxConfirmDBXisPresent test case | ||
| 101 | // of the Secure Boot Logo Test in the Microsoft Hardware Certification Kit | ||
| 102 | diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
| 103 | index 094e4c821b..0a7eef54dc 100644 | ||
| 104 | --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
| 105 | +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
| 106 | @@ -702,6 +702,9 @@ ShellAppMain ( | ||
| 107 | mMicrosoftUefiCa, | ||
| 108 | mSizeOfMicrosoftUefiCa, | ||
| 109 | &gMicrosoftVendorGuid, | ||
| 110 | + mRefkitTestCA, | ||
| 111 | + mSizeOfRefkitTestCA, | ||
| 112 | + &gEfiCallerIdGuid, | ||
| 113 | NULL | ||
| 114 | ); | ||
| 115 | } | ||
| 116 | diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
| 117 | index 56da9c71d6..8de1dfe4e0 100644 | ||
| 118 | --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
| 119 | +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
| 120 | @@ -133,4 +133,6 @@ extern CONST UINTN mSizeOfMicrosoftUefiCa; | ||
| 121 | extern CONST UINT8 mSha256OfDevNull[]; | ||
| 122 | extern CONST UINTN mSizeOfSha256OfDevNull; | ||
| 123 | |||
| 124 | +extern CONST UINT8 mRefkitTestCA[]; | ||
| 125 | +extern CONST UINTN mSizeOfRefkitTestCA; | ||
| 126 | #endif /* ENROLL_DEFAULT_KEYS_H_ */ | ||
| 127 | -- | ||
| 128 | 2.17.1 | ||
| 129 | |||
diff --git a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb deleted file mode 100644 index ca3cfc15..00000000 --- a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | require recipes-core/ovmf/ovmf-shell-image.bb | ||
| 2 | |||
| 3 | WKS_SEARCH_PATH:append = ":${COREBASE}/meta/recipes-core/ovmf" | ||
| 4 | |||
| 5 | QB_DRIVE_TYPE = "/dev/vd" | ||
| 6 | |||
| 7 | do_image:append() { | ||
| 8 | cat > ${IMAGE_ROOTFS}/startup.nsh << EOF | ||
| 9 | EnrollDefaultKeys | ||
| 10 | reset | ||
| 11 | EOF | ||
| 12 | |||
| 13 | } | ||
diff --git a/recipes-core/ovmf/ovmf_%.bbappend b/recipes-core/ovmf/ovmf_%.bbappend deleted file mode 100644 index 34a9dd1b..00000000 --- a/recipes-core/ovmf/ovmf_%.bbappend +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/files:" | ||
| 2 | |||
| 3 | SRC_URI:append:intel-x86-common = " \ | ||
| 4 | file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ | ||
| 5 | " | ||
| 6 | PACKAGECONFIG:append:intel-x86-common = " secureboot" | ||
diff --git a/recipes-selftest/images/files/incorrect.crt b/recipes-selftest/images/files/incorrect.crt deleted file mode 100644 index 3a2411ab..00000000 --- a/recipes-selftest/images/files/incorrect.crt +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | -----BEGIN CERTIFICATE----- | ||
| 2 | MIIDCTCCAfGgAwIBAgIJAIYXAHv3cQNjMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV | ||
| 3 | BAMMEFRlc3QgWW9jdG8gdGhpbmcwHhcNMTcwMTI1MjI1MjI3WhcNMTgwMTI1MjI1 | ||
| 4 | MjI3WjAbMRkwFwYDVQQDDBBUZXN0IFlvY3RvIHRoaW5nMIIBIjANBgkqhkiG9w0B | ||
| 5 | AQEFAAOCAQ8AMIIBCgKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXD | ||
| 6 | SwDVXNWfiKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoeh | ||
| 7 | T51gkuTfv7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE | ||
| 8 | 31hLOkCFb+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk | ||
| 9 | /6q5kqNhyrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4 | ||
| 10 | GqpqeFOPqxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABo1AwTjAdBgNV | ||
| 11 | HQ4EFgQURA8KbgpiGfS2+7MT0H5AvpxeYLowHwYDVR0jBBgwFoAURA8KbgpiGfS2 | ||
| 12 | +7MT0H5AvpxeYLowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAK9n+ | ||
| 13 | 9T+hlM2kEpsUgtyihEJbGHzbw+Pj11b0ICntCVuPKewtBMveYp8lejrQwMFNGRMt | ||
| 14 | ZQe1LFb9HcLeM3MLUz9Lm4BJIjkey3Jfq1AskROYk/bJnFIJIx6P3U9gBa20P46X | ||
| 15 | LH3g6yub1HR7KZC9nfBsak3FPoJR/SYTJs0HsMeL4878+2IbETA4BL0kbKW48FFW | ||
| 16 | jF4f6don0eiaF8b4KkfbWKrCaEm+LMxbyBEQ6fIb1cmGY8A9A5houjmgi6YWSkoi | ||
| 17 | SLpOC9TZ2R51fO9rRsv7XwLK0V9o9YaEYPBg6V/TeJl5nxAZBeVTKVTQbBGZY+l2 | ||
| 18 | nzN0pKsl7RXLf3SRYA== | ||
| 19 | -----END CERTIFICATE----- | ||
diff --git a/recipes-selftest/images/files/incorrect.key b/recipes-selftest/images/files/incorrect.key deleted file mode 100644 index d05475b6..00000000 --- a/recipes-selftest/images/files/incorrect.key +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | -----BEGIN RSA PRIVATE KEY----- | ||
| 2 | MIIEowIBAAKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXDSwDVXNWf | ||
| 3 | iKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoehT51gkuTf | ||
| 4 | v7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE31hLOkCF | ||
| 5 | b+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk/6q5kqNh | ||
| 6 | yrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4GqpqeFOP | ||
| 7 | qxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABAoIBAQCEtAox86s9N6d2 | ||
| 8 | 164z3998Zmj3UyL+7K9x6JI2YvMabBSYGOeaLOLRj6fjQxdC63H8brBM958p4di7 | ||
| 9 | Z82XMco4Dok6yoOeJ+hMLYv+gfGvTJxy7DhyVXsSwok99axg9vUsV3TYw3wSdpNF | ||
| 10 | EKLkcUldpu0W2ADBHUr4sLI85xctHH3Kt0sNDzhgADFa5rDYACXTKHtFOhEqBIwN | ||
| 11 | FmbuRQirnErUkI3Pczgl2Xy1MlaozH9CB+bLAb5q2FYu4DKgjl4UorC+w2HV41KH | ||
| 12 | XoL7L36XXqLRHBfEAwOWb8yro+TK8T7gW7aagTI1wgsbbQkjQmOHxclmJACdMOiJ | ||
| 13 | DjPeR0GBAoGBAO7i2eaEoKa9QlKokN+93uOJD/F6DBi6jF0vGOqWlF8AVTj3kGL3 | ||
| 14 | X8fY/avrSlg7hKZWdei+Q5PyZViKxqmHjq781ZisKck52Tqz4s7ylqRXSgStinZr | ||
| 15 | UqrkShCqZ3g1W91gIeVPQz0/b+gBskoHzQ5WQHfV5v9S1PaxjzcYtCrRAoGBAMea | ||
| 16 | LcA2jjuEjqxa5v5fh8ygcHasJMRKJxW1OCKiQ94DjjzPsdVqZ1sJZChLW/N3nxe7 | ||
| 17 | wHlNJmsGbJ2w1zD5+qkkPjLq5Q4B5KAd62NNrWaEHFdEc/PPkn4xP7Zkfuu5K+m2 | ||
| 18 | 7z/MF4ibvVh9PvD3HY8FWKEtkqB4rfD8AoUOVd4ZAoGAXxXAsfa8k2Hl0kzyTXyg | ||
| 19 | CWV3CSERS46FbFngyw9gw2e4hFJWEG5ym3ONlS60iuY16JelmxyQfYUQPewPI0+n | ||
| 20 | xZMx2fE9OLFj+++6KbF5sLRl6/K/mF8jqo3vxS5uvPRQOo+XLlUcaHalrm1ub/Um | ||
| 21 | 87v1MT3dEmgACKmoXb/hhuECgYAZluiapePiOYJZEmZe4jx0vXTtofAswhz0qYEC | ||
| 22 | 3663vdj0buQrqjKJ91BB4jdtpT5eOpHYe02blv1B0jQkcUfze1QGDxtCineXF37g | ||
| 23 | Aktiwzkm7v22mjv7tbCnX4buDZVVp0BQ+4dg2iaSO6xgFC5T8amFMGSF8jLKnGRu | ||
| 24 | ToIvsQKBgADBTse2vnI85NRsYq48ztQuIU2zlGXIAcoPSvGb8Vhty/joc0jWcI5P | ||
| 25 | raGXBARbuVlcEapK3mDRfO0CQjDaTPK4EYYJwGp8k33Hkkcbgs4kfm308jRsclMr | ||
| 26 | YeMwQsYyOv45x4iPCwrqZEhpPDvACBi7DB6QvZ0++vJbobTt1jyi | ||
| 27 | -----END RSA PRIVATE KEY----- | ||
diff --git a/recipes-selftest/images/files/refkit-db.crt b/recipes-selftest/images/files/refkit-db.crt deleted file mode 100644 index 22ad6a89..00000000 --- a/recipes-selftest/images/files/refkit-db.crt +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | -----BEGIN CERTIFICATE----- | ||
| 2 | MIIC+zCCAeOgAwIBAgIJANT2SMJoGZGsMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV | ||
| 3 | BAMMCXJlZmtpdC1kYjAeFw0xNzA0MjAxMjA2MzJaFw0xODA0MjAxMjA2MzJaMBQx | ||
| 4 | EjAQBgNVBAMMCXJlZmtpdC1kYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC | ||
| 5 | ggEBALQcIqYiAVfN8U+vcuPZAYBQVe8CXuuZNct/Knn/tT7sXZIGMCDnla2khC4/ | ||
| 6 | +tdG3Umo6ON5SfaPCx3+Y6jRY6PWDU5sZlzWZibRJpjUT3bJZUhYEwgxvOVHJWWV | ||
| 7 | OYlfAvHFBhdYygn99h7Fl9qjThpIvs+WJwRLt21ntlAYBHNR0mot3zur8i2V16i4 | ||
| 8 | qDChq4uSK2A+OuWGQHHBPy0ukOfW7MzCC3mDcW32o6lMzUaB3O/sUb6BKvF4c0Hb | ||
| 9 | VM58zqLjkE9FGvk9iPwO7dNpIkz6CmnRSMCqqTqzjxA6dqgMej3Yec4clmL0Bu5H | ||
| 10 | 6OBpka7qNM/aqLQ5XvN60IhIR2kCAwEAAaNQME4wHQYDVR0OBBYEFGhgESWFFHgb | ||
| 11 | Gp9GEuYh5O/7O6rdMB8GA1UdIwQYMBaAFGhgESWFFHgbGp9GEuYh5O/7O6rdMAwG | ||
| 12 | A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI/ShHxDR8pr/YeD0O910yBS | ||
| 13 | cxiqMnH7pfTJEaNoTbed5tlGJNzHwjv5sJj87jRuEJs9RG4zCRG4KdYtBs9nj5aF | ||
| 14 | nWNyv2RfDePJYxlx1H1MnHdG2iCXbbzdwh/zQDge58xVBXK6JE+zipMMMGDan281 | ||
| 15 | 9vuwH7MA3cSmvOI3waPv2aGG+eukpUU4/06HSkHPbml+l74tIryNoBohj0tykAFc | ||
| 16 | uqWcLdclJPz/XFgURjAJfFVkgwu5388l7uz3y9vRW5OTyIoQRriwNRxsDY8Dao8b | ||
| 17 | NmjzU4k2WyGA3uOSUpSXnUmJfT7eKVG6Efe6Afer6sGnLqNNZf1AcfHiP2woy9M= | ||
| 18 | -----END CERTIFICATE----- | ||
diff --git a/recipes-selftest/images/files/refkit-db.key b/recipes-selftest/images/files/refkit-db.key deleted file mode 100644 index 4b54587e..00000000 --- a/recipes-selftest/images/files/refkit-db.key +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | -----BEGIN PRIVATE KEY----- | ||
| 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0HCKmIgFXzfFP | ||
| 3 | r3Lj2QGAUFXvAl7rmTXLfyp5/7U+7F2SBjAg55WtpIQuP/rXRt1JqOjjeUn2jwsd | ||
| 4 | /mOo0WOj1g1ObGZc1mYm0SaY1E92yWVIWBMIMbzlRyVllTmJXwLxxQYXWMoJ/fYe | ||
| 5 | xZfao04aSL7PlicES7dtZ7ZQGARzUdJqLd87q/ItldeouKgwoauLkitgPjrlhkBx | ||
| 6 | wT8tLpDn1uzMwgt5g3Ft9qOpTM1Ggdzv7FG+gSrxeHNB21TOfM6i45BPRRr5PYj8 | ||
| 7 | Du3TaSJM+gpp0UjAqqk6s48QOnaoDHo92HnOHJZi9AbuR+jgaZGu6jTP2qi0OV7z | ||
| 8 | etCISEdpAgMBAAECggEAbtXplKbUgL4hQ9JKN2Cxhc7qMv0YgI92BVaqQw1S8ffu | ||
| 9 | 1Q+tynH5MDRPi06gBJ59SvkA6AsZsvrv8nM7zQWd9ZKh+aLHk1X04upOgDoW9JiX | ||
| 10 | FV/txlslTUrs/ohIMfsgCrweNXvUSTXZobIi8s8QHyipE4HpXMFjjZYHIV7GTlgA | ||
| 11 | PRgGu3NygbWfR8hcx5JtzVz/jka7FFFSbk/pMr0TeJHXP55VfqWLeeSBQmWwooj2 | ||
| 12 | QcRfqMXgLKgu6uEggaP5HMcfTuWgWNhbke/596CgsUtQ5Gg64Q6v7cKcPy0/lgn1 | ||
| 13 | PnvfT9uhgEFDLNFkSBxV3ImrNYo73Nqmbp3w5tK9SQKBgQDs/HW7pNnB0LD51qok | ||
| 14 | pkX0SBvyKxDT1QuU4z0FY9GT7OKOg8Xa0ZGyErt+ZbyFiyUGF5Axc3rJ3DyGslgu | ||
| 15 | 5O+AqcpCQOlOyovGQ6ST9x/gEeVcRnZn1MV4vMxwaOSXtY7u0IGyaDlFn1QWHWCN | ||
| 16 | imv8OR6YuhivwBIXGzJ16oEqDwKBgQDCj3ls7tlPrLvUQIh8gfjCoInU8fRAqtAe | ||
| 17 | Ab/OximLsKQPKLDma6xd+X2Fk8Dowdb88GNT99x3VZjHqVJM9URDkiOGKAXA/rBp | ||
| 18 | jAXhnQwahT8YCzOUHqDYNMMQrXHvbiHqLodGrrO2WjYNmH69prQAk8WYAIwl+hdx | ||
| 19 | BS70LGLPBwKBgQDU9RinAkBcFjiyieBjBreeCJ50Q5bfhHbf2EOhcE2IbDo6bteB | ||
| 20 | Bwmxx3uM3cdHCf6/NrVweqFAfBQ3xlPP8BH4wJrsZoBBOWnZRDfEbzHJnMtK3FbS | ||
| 21 | fzTkhmQAL4Ibgh9rIxspQtcUZVSees+k4VqgUIPaIoDEjgizktEJfS2MqQKBgQDA | ||
| 22 | rOFtVaRz2PYyHq6LzxMRe3bEIdDn8cEk1kqjdW9TXV07feqiZmNOtXLvRAG4/63u | ||
| 23 | 1Akp8L6ul2Az6qUMfaBa4nC3vQ7lr9P40qhIZATGhsqS/xTXTPWw55999qZsnL6N | ||
| 24 | cgKZpw1mOzRohmqNWnfMUotOGsywF1n7nUyAlyxLJQKBgElTaNTFYF3MbGfhl1He | ||
| 25 | fnDXlf8OCOK1i5oIzMLqverb2UN/qp6p0b3SAtcw5cUXcaPlajHrfYgacF/0Qyua | ||
| 26 | Cerey9GLEdJ7saDWhz0GyJ8yyEXy8CVs0svVaLPWI0s2B7/obzP9+gTb/WE9qZqu | ||
| 27 | bNoVEpJ/wZhk+IL4+KPmqphu | ||
| 28 | -----END PRIVATE KEY----- | ||
diff --git a/recipes-selftest/images/secureboot-selftest-image-signed.bb b/recipes-selftest/images/secureboot-selftest-image-signed.bb deleted file mode 100644 index 3ce11f32..00000000 --- a/recipes-selftest/images/secureboot-selftest-image-signed.bb +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | require secureboot-selftest-image-unsigned.bb | ||
| 2 | |||
| 3 | IMAGE_FEATURES += "secureboot" | ||
| 4 | |||
| 5 | SECURE_BOOT_SIGNING_KEY ?= "${THISDIR}/files/refkit-db.key" | ||
| 6 | SECURE_BOOT_SIGNING_CERT ?= "${THISDIR}/files/refkit-db.crt" | ||
diff --git a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/recipes-selftest/images/secureboot-selftest-image-unsigned.bb deleted file mode 100644 index d0fa6405..00000000 --- a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | require recipes-core/images/core-image-minimal.bb | ||
| 2 | |||
| 3 | DEPENDS:remove = "grub-efi" | ||
| 4 | |||
| 5 | inherit uefi-comboapp | ||
| 6 | |||
| 7 | WKS_FILE = "generic-bootdisk.wks.in" | ||
| 8 | |||
| 9 | do_uefiapp_deploy:append() { | ||
| 10 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
| 11 | target=`basename $i` | ||
| 12 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
| 13 | |||
| 14 | cat > ${IMAGE_ROOTFS}/boot/startup.nsh << EOF | ||
| 15 | $target | ||
| 16 | reset | ||
| 17 | EOF | ||
| 18 | break | ||
| 19 | done | ||
| 20 | } | ||
diff --git a/recipes-support/sbsigntool/sbsigntool-native_git.bb b/recipes-support/sbsigntool/sbsigntool-native_git.bb deleted file mode 100644 index 5a9f5b4d..00000000 --- a/recipes-support/sbsigntool/sbsigntool-native_git.bb +++ /dev/null | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" | ||
| 2 | LICENSE = "GPL-3.0-only & LGPL-2.1-only & LGPL-3.0-only & MIT" | ||
| 3 | |||
| 4 | # sbsigntool statically links to libccan.a which is built with modules | ||
| 5 | # passed to "create-ccan-tree" (and their dependencies). Therefore, | ||
| 6 | # we also keep track of all the ccan module licenses. | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ | ||
| 8 | file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ | ||
| 9 | file://lib/ccan.git/ccan/endian/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 10 | file://lib/ccan.git/ccan/htable/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 11 | file://lib/ccan.git/ccan/list/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 12 | file://lib/ccan.git/ccan/read_write_all/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 13 | file://lib/ccan.git/ccan/talloc/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 14 | file://lib/ccan.git/ccan/typesafe_cb/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 15 | file://lib/ccan.git/ccan/failtest/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
| 16 | file://lib/ccan.git/ccan/tlist/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
| 17 | file://lib/ccan.git/ccan/time/LICENSE;md5=838c366f69b72c5df05c96dff79b35f2 \ | ||
| 18 | " | ||
| 19 | |||
| 20 | # The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has | ||
| 21 | # not been maintained and many patches have been backported in this repo. | ||
| 22 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools;branch=master \ | ||
| 23 | git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan;branch=master \ | ||
| 24 | file://0001-configure-Fixup-build-dependencies-for-cross-compili.patch \ | ||
| 25 | " | ||
| 26 | |||
| 27 | SRCREV_sbsigntools ?= "9cfca9fe7aa7a8e29b92fe33ce8433e212c9a8ba" | ||
| 28 | SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" | ||
| 29 | SRCREV_FORMAT = "sbsigntools_ccan" | ||
| 30 | |||
| 31 | DEPENDS = "binutils-native gnu-efi-native help2man-native openssl-native util-linux-native" | ||
| 32 | |||
| 33 | PV = "0.9.5" | ||
| 34 | |||
| 35 | S = "${WORKDIR}/git" | ||
| 36 | |||
| 37 | inherit autotools pkgconfig | ||
| 38 | inherit native | ||
| 39 | |||
| 40 | do_configure:prepend() { | ||
| 41 | cd ${S} | ||
| 42 | |||
| 43 | sed -i s#RECIPE_SYSROOT#${RECIPE_SYSROOT_NATIVE}#g configure.ac | ||
| 44 | |||
| 45 | if [ ! -e lib/ccan ]; then | ||
| 46 | |||
| 47 | # Use empty SCOREDIR because 'make scores' is not run. | ||
| 48 | # The default setting depends on (non-whitelisted) host tools. | ||
| 49 | sed -i -e 's#^\(SCOREDIR=\).*#\1#' lib/ccan.git/Makefile | ||
| 50 | |||
| 51 | lib/ccan.git/tools/create-ccan-tree \ | ||
| 52 | --build-type=automake lib/ccan \ | ||
| 53 | talloc read_write_all build_assert array_size endian | ||
| 54 | fi | ||
| 55 | |||
| 56 | # Create generatable docs from git | ||
| 57 | ( | ||
| 58 | echo "Authors of sbsigntool:" | ||
| 59 | echo | ||
| 60 | git log --format='%an' | sort -u | sed 's,^,\t,' | ||
| 61 | ) > AUTHORS | ||
| 62 | |||
| 63 | # Generate simple ChangeLog | ||
| 64 | git log --date=short --format='%ad %t %an <%ae>%n%n * %s%n' > ChangeLog | ||
| 65 | |||
| 66 | cd ${B} | ||
| 67 | } | ||
| 68 | |||
| 69 | def efi_arch(d): | ||
| 70 | import re | ||
| 71 | harch = d.getVar("HOST_ARCH") | ||
| 72 | if re.match("i[3456789]86", harch): | ||
| 73 | return "ia32" | ||
| 74 | return harch | ||
| 75 | |||
| 76 | EXTRA_OEMAKE = "\ | ||
| 77 | INCLUDES+='-I${S}/lib/ccan.git/ \ | ||
| 78 | -I${STAGING_INCDIR_NATIVE}/efi \ | ||
| 79 | -I${STAGING_INCDIR_NATIVE} \ | ||
| 80 | -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ | ||
| 81 | " | ||
| 82 | |||
| 83 | CFLAGS:append = " -Wno-error" | ||
diff --git a/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch b/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch deleted file mode 100644 index ea7bee29..00000000 --- a/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | From c3533b8da1e1425801d2fc0bcd231e13d593f16b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | ||
| 3 | Date: Tue, 19 Feb 2019 20:07:45 +0800 | ||
| 4 | Subject: [PATCH] configure: Fixup build dependencies for cross-compiling | ||
| 5 | |||
| 6 | When cross-compiling, custom header files and libraries need to be | ||
| 7 | specified. sbsign assumes that all the dependencies are located | ||
| 8 | under /usr/include and /usr/lib. | ||
| 9 | |||
| 10 | Prepend these paths with a placeholder that can be replaced with the | ||
| 11 | actual paths once they are resolved. | ||
| 12 | |||
| 13 | Upstream-Status: Inappropriate [OE specific] | ||
| 14 | |||
| 15 | Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | ||
| 16 | |||
| 17 | Taken from : | ||
| 18 | https://github.com/intel/luv-yocto/tree/master/meta-luv/recipes-devtools/sbsigntool/sbsigntool | ||
| 19 | |||
| 20 | Corrected typo error and ported to version 0.9.2 | ||
| 21 | |||
| 22 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 23 | --- | ||
| 24 | configure.ac | 7 +++++-- | ||
| 25 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/configure.ac b/configure.ac | ||
| 28 | index 1459e91..3e34c8d 100644 | ||
| 29 | --- a/configure.ac | ||
| 30 | +++ b/configure.ac | ||
| 31 | @@ -70,7 +70,10 @@ AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = " | ||
| 32 | ## | ||
| 33 | # no consistent view of where gnu-efi should dump the efi stuff, so find it | ||
| 34 | ## | ||
| 35 | -for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do | ||
| 36 | +for path in RECIPE_SYSROOT/lib RECIPE_SYSROOT/lib64 RECIPE_SYSROOT/usr/lib \ | ||
| 37 | + RECIPE_SYSROOT/usr/lib64 RECIPE_SYSROOT/usr/lib32 \ | ||
| 38 | + RECIPE_SYSROOT/lib/efi RECIPE_SYSROOT/lib64/efi \ | ||
| 39 | + RECIPE_SYSROOT/usr/lib/efi RECIPE_SYSROOT/usr/lib64/efi; do | ||
| 40 | if test -e $path/crt0-efi-$EFI_ARCH.o; then | ||
| 41 | CRTPATH=$path | ||
| 42 | fi | ||
| 43 | @@ -79,7 +82,7 @@ if test -z "$CRTPATH"; then | ||
| 44 | AC_MSG_ERROR([cannot find the gnu-efi crt path]) | ||
| 45 | fi | ||
| 46 | |||
| 47 | -EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \ | ||
| 48 | +EFI_CPPFLAGS="-IRECIPE_SYSROOT/usr/include/efi -IRECIPE_SYSROOT/usr/include/efi/$EFI_ARCH \ | ||
| 49 | -DEFI_FUNCTION_WRAPPER" | ||
| 50 | CPPFLAGS_save="$CPPFLAGS" | ||
| 51 | CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS" | ||
| 52 | -- | ||
| 53 | 2.7.4 | ||
| 54 | |||
