summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2021-04-26 14:04:04 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2021-05-27 09:45:38 +0200
commit580595398d36da3cde87046b3b03b9c2c3831249 (patch)
tree50789a0a7fed47f812b53f8717650770aed6fa79 /classes
parent10dfa22f6f20453dc15f801d098b693dac38265e (diff)
downloadmeta-el-nfv-access-580595398d36da3cde87046b3b03b9c2c3831249.tar.gz
OSTree /boot dir: Remove unused artifacts
OSTree handles the contents of /boot separately from the rest of the filesystem, see [1]. By default, upstream yocto rootfs generation stores the following artifacts in /boot: - kernel-image (bzImage) as /boot/bzImage-...; - multiple packages that deploy grub.cfg, grubenv and EFI binaries: * dpkg -S /boot/efi/EFI/BOOT shim, seloader, ovmf-pkcs7-efi, grub-efi, grub-bootconf, efitools However, none of these are ever used in Enea Edge, due to the way our initial installation and subsequent upgrade work: * live image building copies the kernel image from yocto deploy dir, EFI binaries from rootfs /boot (this patch changes this to also copy from the yocto deploy dir "bootloader" dir for uniformity) to the root of the hddimg image; * Enea Edge Installer (via utils.sh) creates the ESP partition and copies all artifacts from hddimg to ESP under /EFI/BOOT [2]; * (currently) subsequent upgrades do _not_ update the contents of the ESP /EFI/BOOT directory after initial installation; * subsequent upgrades copy the kernel and ostree-initramfs from OSTree rootfs (from /usr/lib/modules where ostree-kernel package resides) to the ESP for SELoader validation; This flow leaves unused (duplicate) artifacts in the following path: /ostree/boot.x/poky/<poky hash>/0/boot/ While the kernel-image package can be omitted from installation, since ostree-kernel package already installs the same binaries in /usr/lib/modules (where OSTree will look for it), the rest of the packages (shim, seloader etc.) also install other files to the rootfs (e.g. CLI tools) and/or are used by the live image (hddimg) build process as sources when copying said artifacts to the hddimg image; so we can't simply skip installing them inside the rootfs. Also, we want non-SOTA artifacts (e.g. rootfs.ext4) to still contain these artifacts. So the only sensible solution to avoiding confusion and removing unused artifacts from OSTree images is to remove them right before creating the OSTree image. While at it, add some ENEA-specific comment markers to our prepend/ append fragments to make them stand out. [1] https://github.com/ostreedev/ostree/blob/v2020.8/docs/\ atomic-upgrades.md#the-ostreeboot-directory [2] http://sestogerrit02/cgit/linux/meta-enea-virtualization.git/tree/ recipes-enea/nfv-installer/nfv-installer/utils.sh?h=rocko#n230 Change-Id: I470c1c3d19f301cae4b8fbe184aa2906d4a25ddf Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/override_live-vm-common.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc
index 6fabbf0..3ac92b9 100644
--- a/classes/override_live-vm-common.inc
+++ b/classes/override_live-vm-common.inc
@@ -15,7 +15,7 @@ efi_populate_common() {
15 15
16 ## ENEA_start ## 16 ## ENEA_start ##
17 # Install EFI binaries 17 # Install EFI binaries
18 install -m 0644 ${IMAGE_ROOTFS}${EFI_FILES_PATH}/*.* ${DEST}${EFIDIR} 18 install -m 0644 ${DEPLOY_DIR_IMAGE}/${SBFOLDER}/*.efi ${DEST}${EFIDIR}
19 19
20 # Install kernel and initramfs sig 20 # Install kernel and initramfs sig
21 install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} 21 install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT}