From: Chee Yang Lee <chee.yang....@intel.com> Add new source parameter label to allow boot.conf/grub.cfg label option to set as "install-efi", so far it's hardcoded to "Boot".
The label remain to "Boot" for systemd-boot or blank for grub-efi whenever label are not "install-efi". when label set to "install-efi" the image can boot into image installation. Signed-off-by: Chee Yang Lee <chee.yang....@intel.com> --- scripts/lib/wic/plugins/source/bootimg-efi.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 83a7e18..0a0c5bd 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -86,9 +86,14 @@ class BootimgEFIPlugin(SourcePlugin): grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot") kernel = "/bzImage" + label = source_params.get('label') - grubefi_conf += "linux %s root=%s rootwait %s\n" \ - % (kernel, creator.rootdev, bootloader.append) + if label == "install-efi": + grubefi_conf += "linux %s LABEL=%s rootwait %s\n" \ + % (kernel, label, bootloader.append) + else: + grubefi_conf += "linux %s root=%s rootwait %s\n" \ + % (kernel, creator.rootdev, bootloader.append) if initrd: grubefi_conf += "initrd /%s\n" % initrd @@ -154,12 +159,17 @@ class BootimgEFIPlugin(SourcePlugin): # Create systemd-boot configuration using parameters from wks file kernel = "/bzImage" title = source_params.get('title') - + label = source_params.get('label') 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) + + if label == "install-efi": + boot_conf += "options LABEL=%s %s\n" % \ + (label, bootloader.append) + else: + boot_conf += "options LABEL=Boot root=%s %s\n" % \ + (creator.rootdev, bootloader.append) if initrd: boot_conf += "initrd /%s\n" % initrd -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core