diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc index b47f772..19e10d4 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc @@ -2,8 +2,6 @@ # ============================================================================== MACHINE_FEATURES:append = " efi" -EFI_PROVIDER = "efibootguard" -EFIBOOTGUARD_TIMEOUT ?= "60" do_image_wic[depends] += "efibootguard-native:do_populate_sysroot efibootguard:do_deploy" diff --git a/layers/meta-belden-coreos/classes/coreos-image-ci.bbclass b/layers/meta-belden-coreos/classes/coreos-image-ci.bbclass index 82b5fc9..6138203 100644 --- a/layers/meta-belden-coreos/classes/coreos-image-ci.bbclass +++ b/layers/meta-belden-coreos/classes/coreos-image-ci.bbclass @@ -45,9 +45,10 @@ def get_coreos_ci_artifacts(d): # Bootloaders # ========================================================================== - if(d.getVar('EFI_PROVIDER') == 'efibootguard'): - efi_arch = d.getVar('EFI_ARCH') - artifacts.append('efibootguard' + efi_arch + '.efi') + if('efi' in d.getVar('MACHINE_FEATURES', ''): + if(d.getVar('EFI_PROVIDER', "") == 'efibootguard'): + efi_arch = d.getVar('EFI_ARCH') + artifacts.append('efibootguard' + efi_arch + '.efi') # Machine specific files # ========================================================================== diff --git a/layers/meta-belden-coreos/classes/coreos-image.bbclass b/layers/meta-belden-coreos/classes/coreos-image.bbclass index 589bbae..a1d097e 100644 --- a/layers/meta-belden-coreos/classes/coreos-image.bbclass +++ b/layers/meta-belden-coreos/classes/coreos-image.bbclass @@ -64,11 +64,16 @@ PACKAGE_EXCLUDE_COMPLEMENTARY:append = "${@bb.utils.contains_any('PACKAGE_INSTAL # IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2' # An error exception would be raised if both image features foo and bar1(or bar2) are included +# packagegroup-core-boot will install the EFI_PROVIDER package if EFI is in Machine +# feature. We use this variable to install more EFI related tools +COREOS_IMAGE_EFI_PROVIDER_EXTRA = " \ + ${@'efibootguard-tools' if d.getVar('EFI_PROVIDER') == 'efibootguard' else ''} \ +" COREOS_IMAGE_BASE_INSTALL = "\ packagegroup-core-boot \ packagegroup-base-extended \ - ${@'efibootguard-tools' if d.getVar('EFI_PROVIDER') == 'efibootguard' else ''} \ + ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${COREOS_IMAGE_EFI_PROVIDER_EXTRA}", "", d)} \ os-release \ " diff --git a/layers/meta-belden-coreos/conf/distro/belden-coreos.conf b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf index 000df90..c30465f 100644 --- a/layers/meta-belden-coreos/conf/distro/belden-coreos.conf +++ b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf @@ -58,9 +58,11 @@ SDK_VERSION[vardepvalue] = "${SDK_VERSION}" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" SDKPATHINSTALL = "/opt/${DISTRO}/${SDK_VERSION}" -# Secure boot +# EFI and Secure boot # ============================================================================== +EFI_PROVIDER = "efibootguard" +EFIBOOTGUARD_TIMEOUT ??= "60" INHERIT += "coreos-efi-secureboot" # Virtualization configuration