summaryrefslogtreecommitdiffstats
path: root/images/enea-nfv-access-host-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'images/enea-nfv-access-host-common.inc')
-rw-r--r--images/enea-nfv-access-host-common.inc69
1 files changed, 0 insertions, 69 deletions
diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc
deleted file mode 100644
index 1cde827..0000000
--- a/images/enea-nfv-access-host-common.inc
+++ /dev/null
@@ -1,69 +0,0 @@
1REQUIRE_FILES = " \
2 images/enea-nfv-access-common.inc \
3 classes/override_grub-efi.inc \
4 "
5REQUIRE_FILES_append_df-efi-secure-boot = " \
6 classes/override_image_types_ostree.inc \
7 classes/override_image_types_ota.inc \
8 classes/override_grub-efi_secureboot.inc \
9 images/secure-boot.inc \
10 "
11
12require ${REQUIRE_FILES}
13
14IMAGE_INSTALL += " \
15 packagegroup-enea-virtualization-host \
16 packagegroup-enea-virtualization-4gusb-modems \
17 "
18
19# Set labels for GRUB and SYSLINUX
20LABELS_LIVE = "installer live-boot"
21
22GRUB_GFXSERIAL_x86-64 = "1"
23# Append default parameters for x86-64 targets
24APPEND_x86-64 = "quiet"
25SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200"
26
27# Skip menu and boot installer immediately
28GRUB_TIMEOUT_x86-64 = "0"
29AUTO_SYSLINUXMENU_x86-64 = "0"
30
31# grub-efi-native is needed in recipe-sysroot-native to generate the initial
32# configuration file for grub
33DEPENDS_append += " grub-efi-native"
34
35# If building with sota enabled, build the otaimg before the hddimg, because
36# the hddimg needs it as a base image
37python __anonymous() {
38 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
39 d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True))
40}
41
42# Append OSTree specific parameters to the kernel command line before creating the live image
43python do_bootimg_prepend () {
44 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
45 ostree_osname = d.getVar('OSTREE_OSNAME')
46 checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL'))
47
48 # The boot tree is identified through a sha256 checksum over the kernel binary
49 ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0"
50
51 d.setVar("APPEND", d.getVar("APPEND") + ostree_params)
52}
53
54# Get rid of GRUB dependencies added by ostree. See:
55# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45
56python __anonymous () {
57 d.delVarFlag("do_image_otaimg", "depends")
58 d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot")
59}
60
61# Before building the OSTree image, move DPKG data to /usr/dpkg, because
62# OSTree does not preserve the contents of /var
63IMAGE_CMD_ostree_prepend () {
64
65 install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg
66 if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then
67 mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/
68 fi
69}