1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
require images/enea-nfv-access-common.inc
require classes/override_grub-efi.inc
IMAGE_INSTALL += " \
packagegroup-enea-virtualization-host \
packagegroup-enea-virtualization-4gusb-modems \
grub-efi-utils \
"
# Set labels for GRUB and SYSLINUX
LABELS_LIVE = "live-boot installer"
GRUB_GFXSERIAL_x86-64 = "1"
# Append default parameters for x86-64 targets
APPEND_x86-64 = "quiet"
SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=tty0"
# Set timeout values
GRUB_TIMEOUT_x86-64 = "10"
# 10 - 1sec
SYSLINUX_TIMEOUT_x86-64 = "50"
# 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")
}
|