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-06-11 14:31:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-11 13:26:50 +0100
commit88a9fef761c5e67b2964fedc85a7e8ad37067564 (patch)
treecbe572987dfa3a0d35ce8324b94a6eba271032bd /scripts/lib/wic/plugins/source/bootimg-efi.py
parentc668b467415599cb95d93a231eb51d77137a57e4 (diff)
downloadopenembedded-core-contrib-88a9fef761c5e67b2964fedc85a7e8ad37067564.tar.gz
wic/plugins: kernel image refer to KERNEL_IMAGETYPE
replaced hardcoded kernel image with KERNEL_IMAGETYPE. set kernel image to "bzImage" incase KERNEL_IMAGETYPE not set. Signed-off-by: Chee Yang Lee <chee.yang.lee@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.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 70cc1b01bc..d87db1f1b0 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -71,14 +71,16 @@ class BootimgEFIPlugin(SourcePlugin):
grubefi_conf += "timeout=%s\n" % bootloader.timeout
grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot")
- kernel = "/bzImage"
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if not kernel:
+ kernel = "bzImage"
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" \
+ grubefi_conf += "linux /%s %s rootwait %s\n" \
% (kernel, label_conf, bootloader.append)
if initrd:
@@ -143,12 +145,15 @@ class BootimgEFIPlugin(SourcePlugin):
if not custom_cfg:
# Create systemd-boot configuration using parameters from wks file
- kernel = "/bzImage"
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if not kernel:
+ kernel = "bzImage"
+
title = source_params.get('title')
boot_conf = ""
boot_conf += "title %s\n" % (title if title else "boot")
- boot_conf += "linux %s\n" % kernel
+ boot_conf += "linux /%s\n" % kernel
label = source_params.get('label')
label_conf = "LABEL=Boot root=%s" % creator.rootdev
@@ -209,8 +214,12 @@ class BootimgEFIPlugin(SourcePlugin):
hdddir = "%s/hdd/boot" % cr_workdir
- install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
- (staging_kernel_dir, hdddir)
+ kernel = get_bitbake_var("KERNEL_IMAGETYPE")
+ if not kernel:
+ kernel = "bzImage"
+
+ install_cmd = "install -m 0644 %s/%s %s/%s" % \
+ (staging_kernel_dir, kernel, hdddir, kernel)
exec_cmd(install_cmd)