From 8ebb8350582b45f776614f2158f4c08343e0bb8e Mon Sep 17 00:00:00 2001 From: Catalin Iova Date: Wed, 28 Apr 2021 09:40:22 +0200 Subject: images: Change name to Enea Edge Change name into Enea Edge for build output files Change-Id: I760411db66617f6eabc2041db42be24fc3633c33 Signed-off-by: Catalin Iova --- images/enea-edge-host-common.inc | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 images/enea-edge-host-common.inc (limited to 'images/enea-edge-host-common.inc') diff --git a/images/enea-edge-host-common.inc b/images/enea-edge-host-common.inc new file mode 100644 index 0000000..6d446a0 --- /dev/null +++ b/images/enea-edge-host-common.inc @@ -0,0 +1,69 @@ +REQUIRE_FILES = " \ + images/enea-edge-common.inc \ + classes/override_grub-efi.inc \ + " +REQUIRE_FILES_append_df-efi-secure-boot = " \ + classes/override_image_types_ostree.inc \ + classes/override_image_types_ota.inc \ + classes/override_grub-efi_secureboot.inc \ + images/secure-boot.inc \ + " + +require ${REQUIRE_FILES} + +IMAGE_INSTALL += " \ + packagegroup-enea-virtualization-host \ + packagegroup-enea-virtualization-4gusb-modems \ + " + +# Set labels for GRUB and SYSLINUX +LABELS_LIVE = "installer live-boot" + +GRUB_GFXSERIAL_x86-64 = "1" +# Append default parameters for x86-64 targets +APPEND_x86-64 = "quiet" +SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" + +# Skip menu and boot installer immediately +GRUB_TIMEOUT_x86-64 = "0" +AUTO_SYSLINUXMENU_x86-64 = "0" + +# grub-efi-native is needed in recipe-sysroot-native to generate the initial +# configuration file for grub +DEPENDS_append += " grub-efi-native" + +# If building with sota enabled, build the otaimg before the hddimg, because +# the hddimg needs it as a base image +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): + d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True)) +} + +# Append OSTree specific parameters to the kernel command line before creating the live image +python do_bootimg_prepend () { + if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): + ostree_osname = d.getVar('OSTREE_OSNAME') + checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL')) + + # The boot tree is identified through a sha256 checksum over the kernel binary + ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0" + + d.setVar("APPEND", d.getVar("APPEND") + ostree_params) +} + +# Get rid of GRUB dependencies added by ostree. See: +# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45 +python __anonymous () { + d.delVarFlag("do_image_otaimg", "depends") + d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot") +} + +# Before building the OSTree image, move DPKG data to /usr/dpkg, because +# OSTree does not preserve the contents of /var +IMAGE_CMD_ostree_prepend () { + + install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg + if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then + mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/ + fi +} -- cgit v1.2.3-54-g00ecf