summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRich Persaud <rp@stacktrust.org>2020-03-09 18:44:57 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-11 11:44:29 +0000
commitb3ee2f9fc5dce8f5cfc1a5f80075a1cd017043ba (patch)
tree0520390447c994767e58b5aeee529eea876de233 /meta
parent59e64ae58c3f2454b4fe2c12dcad0e7f730b181b (diff)
downloadpoky-b3ee2f9fc5dce8f5cfc1a5f80075a1cd017043ba.tar.gz
grub-efi-cfg: enable per-label APPEND override
For legacy bios boot configurations, syslinux supports multiple labels with per-label APPEND definitions. grub-efi-cfg supports multiple labels, but only a single APPEND definition. Enable optional per-label APPEND definitions for grub EFI, with variable names prefixed by "grub_" to isolate grub definitions from syslinux defintions. Example use from an ISO image recipe that inherits grub-efi-cfg: LABELS_LIVE="foo bar" APPEND_grub_foo = "linuxcmdline" No change in behavior for those using APPEND without overrides. (From OE-Core rev: 20ad7705d1060300d53304c259b1f07d04b86eba) Signed-off-by: Rich Persaud <rp@stacktrust.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/grub-efi-cfg.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass
index 8b5ff20c72..3a2cdd698b 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -88,6 +88,12 @@ python build_efi_cfg() {
88 for label in labels.split(): 88 for label in labels.split():
89 localdata = d.createCopy() 89 localdata = d.createCopy()
90 90
91 overrides = localdata.getVar('OVERRIDES')
92 if not overrides:
93 bb.fatal('OVERRIDES not defined')
94
95 localdata.setVar('OVERRIDES', 'grub_' + label + ':' + overrides)
96
91 for btype in btypes: 97 for btype in btypes:
92 cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0])) 98 cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
93 lb = label 99 lb = label