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>
This commit is contained in:
Rich Persaud 2020-03-09 18:44:57 -04:00 committed by Richard Purdie
parent 59e64ae58c
commit b3ee2f9fc5

View File

@ -88,6 +88,12 @@ python build_efi_cfg() {
for label in labels.split():
localdata = d.createCopy()
overrides = localdata.getVar('OVERRIDES')
if not overrides:
bb.fatal('OVERRIDES not defined')
localdata.setVar('OVERRIDES', 'grub_' + label + ':' + overrides)
for btype in btypes:
cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
lb = label