summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2018-11-14 19:05:31 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-16 11:46:07 (GMT)
commit20eb0733e5232b64ae2cdbe5800335cb47fda2d4 (patch)
tree685a843394d7b99e4ee0b6c95edd305189f82573 /scripts
parente5a43f63867d4d06af4f0bfbb23f953c88e6d1b3 (diff)
downloadpoky-20eb0733e5232b64ae2cdbe5800335cb47fda2d4.tar.gz
wic: bootimg-efi: add a title source parameter
Sometimes the users might want to change the title showing on UEFI booting screen, so far it's hard-coded to 'boot'. There is not a easy way to customize it in current design, I tried firstly with '--configfile', but that does not work with --use-uuid, since the later option will generate a UUID and write it to boot config, only when the former option is not enabled. So a new source parameter 'titile' is added in this patch, it defaults to 'boot' to be consistent with the original title. (From OE-Core rev: 37e16188ef3b1b328eb18b3e459c051c9c9f0332) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 0eb86a0..83a7e18 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -77,12 +77,13 @@ class BootimgEFIPlugin(SourcePlugin):
77 if not custom_cfg: 77 if not custom_cfg:
78 # Create grub configuration using parameters from wks file 78 # Create grub configuration using parameters from wks file
79 bootloader = creator.ks.bootloader 79 bootloader = creator.ks.bootloader
80 title = source_params.get('title')
80 81
81 grubefi_conf = "" 82 grubefi_conf = ""
82 grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" 83 grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
83 grubefi_conf += "default=boot\n" 84 grubefi_conf += "default=boot\n"
84 grubefi_conf += "timeout=%s\n" % bootloader.timeout 85 grubefi_conf += "timeout=%s\n" % bootloader.timeout
85 grubefi_conf += "menuentry 'boot'{\n" 86 grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot")
86 87
87 kernel = "/bzImage" 88 kernel = "/bzImage"
88 89
@@ -152,9 +153,10 @@ class BootimgEFIPlugin(SourcePlugin):
152 if not custom_cfg: 153 if not custom_cfg:
153 # Create systemd-boot configuration using parameters from wks file 154 # Create systemd-boot configuration using parameters from wks file
154 kernel = "/bzImage" 155 kernel = "/bzImage"
156 title = source_params.get('title')
155 157
156 boot_conf = "" 158 boot_conf = ""
157 boot_conf += "title boot\n" 159 boot_conf += "title %s\n" % (title if title else "boot")
158 boot_conf += "linux %s\n" % kernel 160 boot_conf += "linux %s\n" % kernel
159 boot_conf += "options LABEL=Boot root=%s %s\n" % \ 161 boot_conf += "options LABEL=Boot root=%s %s\n" % \
160 (creator.rootdev, bootloader.append) 162 (creator.rootdev, bootloader.append)