summaryrefslogtreecommitdiffstats
path: root/images/enea-nfv-access-host-common.inc
diff options
context:
space:
mode:
authorMatei Valeanu <Matei.Valeanu@enea.com>2021-09-09 14:22:56 +0200
committerMatei Valeanu <Matei.Valeanu@enea.com>2021-09-09 14:22:56 +0200
commit8f49f61ef6df2db30b2b124b7ee5893124c70180 (patch)
treede596077e8b7925f42fffd38d25486b47177c336 /images/enea-nfv-access-host-common.inc
parent1a0d008b62062b3bdfa97ec4761347c0d0c4e652 (diff)
parent06cb3727c2a013ff6927f85b9cdd708177e17609 (diff)
downloadmeta-el-nfv-access-8f49f61ef6df2db30b2b124b7ee5893124c70180.tar.gz
Merge branch 'develop'demo_CPDX-3644demo_CPDX-3634
Change-Id: I75bd22a68d9de4d96b65586be3c14fda7892b803
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}