From 20e1f95b49cb2dfb321b770b260b0d82d49fe699 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 26 Apr 2021 14:03:43 +0200 Subject: grub: Fix duplicate/unused grubx64.efi, cleanup 1. EFI_PREFIX: Fix duplicate grubx64.efi binaries by aligning paths: * by default, upstream meta-oe and meta-secure-core both install grubx64.efi, but in different locations (/boot/EFI/BOOT vs /boot/efi/EFI/BOOT) unless we explicitely override some vars to align the 2 paths; use the old behavior (/boot/efi/EFI/BOOT), as meta-secure-core has multiple recipes that reference it, while meta-oe allows changing the path via a single var override; * note that in an OSTree deployment, these paths don't even exist on target, we explicity install grubx64.efi during Enea Edge installation by copying grubx64.efi from /EFI/BOOT in hddimg; 2. live-vm-common: use ${EFI_FILES_PATH} instead of hardcoding it; 3. core-image-minimal-initramfs, enea-nfv-access: Blacklist grub-common-extras package on x86-64 machines if OSTree is used; Depends-On: I703b53fd09c5ed75731375414f3e711ec3dadc3e Change-Id: I3735bc004ece62f94172108f2e7ed4596942deea Signed-off-by: Alexandru Avadanii --- classes/override_live-vm-common.inc | 2 +- conf/distro/eneanfvaccess.conf | 2 ++ images/core-image-minimal-initramfs.bbappend | 2 ++ images/enea-nfv-access-common.inc | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc index dc8e076..6fabbf0 100644 --- a/classes/override_live-vm-common.inc +++ b/classes/override_live-vm-common.inc @@ -15,7 +15,7 @@ efi_populate_common() { ## ENEA_start ## # Install EFI binaries - install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} + install -m 0644 ${IMAGE_ROOTFS}${EFI_FILES_PATH}/*.* ${DEST}${EFIDIR} # Install kernel and initramfs sig install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index c31363d..2c81393 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -15,6 +15,8 @@ PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" +# Override ESP mount path set by meta/conf/image-uefi.conf to align with meta-secure-core paths +EFI_PREFIX_df-efi-secure-boot = "/boot/efi" SBFOLDER = "bootloader" HOSTTOOLS_append = " scp" diff --git a/images/core-image-minimal-initramfs.bbappend b/images/core-image-minimal-initramfs.bbappend index 5512158..013463a 100644 --- a/images/core-image-minimal-initramfs.bbappend +++ b/images/core-image-minimal-initramfs.bbappend @@ -7,6 +7,8 @@ PACKAGE_INSTALL_append_sota = " ostree-switchroot" # run-postinsts does not belong in the minimal initramfs PACKAGE_INSTALL_remove = "run-postinsts" +PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras" + create_enea_symlink() { # enea image used in bare metal installation cd ${DEPLOY_DIR_IMAGE} diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc index df93026..2a7a8c6 100644 --- a/images/enea-nfv-access-common.inc +++ b/images/enea-nfv-access-common.inc @@ -10,6 +10,8 @@ IMAGE_INSTALL += " \ # run-postinsts duplicates dpkg-configure if package_deb is used PACKAGE_INSTALL_remove = "${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'run-postinsts', '', d)}" +PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras" + # After installing packages inside the rootfs, remove backup DPKG status file rootfs_postinstall_dpkg_cleanup () { if ${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'true', 'false', d)}; then -- cgit v1.2.3-54-g00ecf