summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/bootimg-efi.py
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2019-05-30 15:30:49 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-30 12:37:03 +0100
commit01543538d1139ab4244760f254b4c5289a50a4ea (patch)
tree9f07da9f48a0d26477e762c9cec2fbed28cf41ac /scripts/lib/wic/plugins/source/bootimg-efi.py
parent70db12c8522840ddcb8c6dcbc08251f095c75c65 (diff)
downloadpoky-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/lib/wic/plugins/source/bootimg-efi.py')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py19
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):
73 73
74 kernel = "/bzImage" 74 kernel = "/bzImage"
75 75
76 grubefi_conf += "linux %s root=%s rootwait %s\n" \ 76 label = source_params.get('label')
77 % (kernel, creator.rootdev, bootloader.append) 77 label_conf = "root=%s" % creator.rootdev
78 if label:
79 label_conf = "LABEL=%s" % label
80
81 grubefi_conf += "linux %s %s rootwait %s\n" \
82 % (kernel, label_conf, bootloader.append)
78 83
79 if initrd: 84 if initrd:
80 grubefi_conf += "initrd /%s\n" % initrd 85 grubefi_conf += "initrd /%s\n" % initrd
@@ -144,8 +149,14 @@ class BootimgEFIPlugin(SourcePlugin):
144 boot_conf = "" 149 boot_conf = ""
145 boot_conf += "title %s\n" % (title if title else "boot") 150 boot_conf += "title %s\n" % (title if title else "boot")
146 boot_conf += "linux %s\n" % kernel 151 boot_conf += "linux %s\n" % kernel
147 boot_conf += "options LABEL=Boot root=%s %s\n" % \ 152
148 (creator.rootdev, bootloader.append) 153 label = source_params.get('label')
154 label_conf = "LABEL=Boot root=%s" % creator.rootdev
155 if label:
156 label_conf = "LABEL=%s" % label
157
158 boot_conf += "options %s %s\n" % \
159 (label_conf, bootloader.append)
149 160
150 if initrd: 161 if initrd:
151 boot_conf += "initrd /%s\n" % initrd 162 boot_conf += "initrd /%s\n" % initrd