]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd-boot-cfg: add .conf suffix to default entry label
authorCharles-Antoine Couret <charles-antoine.couret@mind.be>
Sun, 24 Sep 2023 23:21:17 +0000 (01:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Sep 2023 09:35:07 +0000 (10:35 +0100)
Since systemd v245 (commit 6cd12ebcfe459466257ea63022a32515d756e719), systemd-boot
expects default entry to have the complete filename as value.

LABELS from poky are by default without any suffixes like "boot install", so default entry
does not have the .conf suffix as well and systemd-boot is not able to use this information
and it's starting in any case the first entry. To be able to start another entry by default,
.conf suffix is required.

With this change, LABELS variable can still be used by other bootloaders and being used as description
field.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@mind.be>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/systemd-boot-cfg.bbclass

index 366dd237388370d4dee887615abb2a2122c5f646..12da41ebad7ebf1a71099f35bc5082d7d2ca4c31 100644 (file)
@@ -35,7 +35,7 @@ python build_efi_cfg() {
         bb.fatal('Unable to open %s' % cfile)
 
     cfgfile.write('# Automatically created by OE\n')
-    cfgfile.write('default %s\n' % (labels.split()[0]))
+    cfgfile.write('default %s.conf\n' % (labels.split()[0]))
     timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
     if timeout:
         cfgfile.write('timeout %s\n' % timeout)