diff options
author | Chee Yang Lee <chee.yang.lee@intel.com> | 2019-05-30 15:30:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-30 12:37:03 +0100 |
commit | 01543538d1139ab4244760f254b4c5289a50a4ea (patch) | |
tree | 9f07da9f48a0d26477e762c9cec2fbed28cf41ac /scripts | |
parent | 70db12c8522840ddcb8c6dcbc08251f095c75c65 (diff) | |
download | openembedded-core-contrib-01543538d1139ab4244760f254b4c5289a50a4ea.tar.gz |
wic: bootimg-efi: add label source parameter
Add new source parameter label to allow custom boot.conf/grub.cfg label,
so far it's hardcoded to "Boot".
Default label to "Boot" for systemd-boot and blank for grub-efi when source
parameter label are not set.
(From OE-Core rev: 7a0aab1aa31e66e6bc94c04c2f6c1043b64a8967)
Signed-off-by: Chee Yang Lee <chee.yang.lee at intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 652323fa77..70cc1b01bc 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -73,8 +73,13 @@ class BootimgEFIPlugin(SourcePlugin): kernel = "/bzImage" - grubefi_conf += "linux %s root=%s rootwait %s\n" \ - % (kernel, creator.rootdev, bootloader.append) + label = source_params.get('label') + label_conf = "root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + grubefi_conf += "linux %s %s rootwait %s\n" \ + % (kernel, label_conf, bootloader.append) if initrd: grubefi_conf += "initrd /%s\n" % initrd @@ -144,8 +149,14 @@ class BootimgEFIPlugin(SourcePlugin): boot_conf = "" boot_conf += "title %s\n" % (title if title else "boot") boot_conf += "linux %s\n" % kernel - boot_conf += "options LABEL=Boot root=%s %s\n" % \ - (creator.rootdev, bootloader.append) + + label = source_params.get('label') + label_conf = "LABEL=Boot root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + boot_conf += "options %s %s\n" % \ + (label_conf, bootloader.append) if initrd: boot_conf += "initrd /%s\n" % initrd |