Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
77
sources/poky/meta/classes-recipe/systemd-boot-cfg.bbclass
Normal file
77
sources/poky/meta/classes-recipe/systemd-boot-cfg.bbclass
Normal file
@@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright OpenEmbedded Contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
|
||||
SYSTEMD_BOOT_ENTRIES ?= ""
|
||||
SYSTEMD_BOOT_TIMEOUT ?= "10"
|
||||
|
||||
# Uses MACHINE specific KERNEL_IMAGETYPE
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
# Need UUID utility code.
|
||||
inherit fs-uuid
|
||||
|
||||
python build_efi_cfg() {
|
||||
s = d.getVar("S")
|
||||
labels = d.getVar('LABELS')
|
||||
if not labels:
|
||||
bb.debug(1, "LABELS not defined, nothing to do")
|
||||
return
|
||||
|
||||
if labels == []:
|
||||
bb.debug(1, "No labels, nothing to do")
|
||||
return
|
||||
|
||||
cfile = d.getVar('SYSTEMD_BOOT_CFG')
|
||||
cdir = os.path.dirname(cfile)
|
||||
if not os.path.exists(cdir):
|
||||
os.makedirs(cdir)
|
||||
try:
|
||||
cfgfile = open(cfile, 'w')
|
||||
except OSError:
|
||||
bb.fatal('Unable to open %s' % cfile)
|
||||
|
||||
cfgfile.write('# Automatically created by OE\n')
|
||||
cfgfile.write('default %s.conf\n' % (labels.split()[0]))
|
||||
timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
|
||||
if timeout:
|
||||
cfgfile.write('timeout %s\n' % timeout)
|
||||
else:
|
||||
cfgfile.write('timeout 10\n')
|
||||
cfgfile.close()
|
||||
|
||||
for label in labels.split():
|
||||
localdata = d.createCopy()
|
||||
|
||||
entryfile = "%s/%s.conf" % (s, label)
|
||||
if not os.path.exists(s):
|
||||
os.makedirs(s)
|
||||
d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
|
||||
try:
|
||||
entrycfg = open(entryfile, "w")
|
||||
except OSError:
|
||||
bb.fatal('Unable to open %s' % entryfile)
|
||||
|
||||
entrycfg.write('title %s\n' % label)
|
||||
|
||||
kernel = localdata.getVar("KERNEL_IMAGETYPE")
|
||||
entrycfg.write('linux /%s\n' % kernel)
|
||||
|
||||
append = localdata.getVar('APPEND')
|
||||
initrd = localdata.getVar('INITRD')
|
||||
|
||||
if initrd:
|
||||
entrycfg.write('initrd /initrd\n')
|
||||
lb = label
|
||||
if label == "install":
|
||||
lb = "install-efi"
|
||||
entrycfg.write('options LABEL=%s ' % lb)
|
||||
if append:
|
||||
append = replace_rootfs_uuid(d, append)
|
||||
entrycfg.write('%s' % append)
|
||||
entrycfg.write('\n')
|
||||
entrycfg.close()
|
||||
}
|
||||
Reference in New Issue
Block a user