mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
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. (From OE-Core rev: 88a9fef761c5e67b2964fedc85a7e8ad37067564) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ef8080c804
commit
97feebdf99
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -149,8 +149,12 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
|||
|
||||
hdddir = "%s/hdd/boot" % cr_workdir
|
||||
|
||||
cmds = ("install -m 0644 %s/bzImage %s/vmlinuz" %
|
||||
(staging_kernel_dir, hdddir),
|
||||
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
|
||||
if not kernel:
|
||||
kernel = "bzImage"
|
||||
|
||||
cmds = ("install -m 0644 %s/%s %s/vmlinuz" %
|
||||
(staging_kernel_dir, kernel, hdddir),
|
||||
"install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" %
|
||||
(bootimg_dir, hdddir),
|
||||
"install -m 0644 %s/syslinux/vesamenu.c32 %s/vesamenu.c32" %
|
||||
|
|
|
@ -70,8 +70,10 @@ class IsoImagePlugin(SourcePlugin):
|
|||
syslinux_conf += "DEFAULT boot\n"
|
||||
syslinux_conf += "LABEL boot\n"
|
||||
|
||||
kernel = "/bzImage"
|
||||
syslinux_conf += "KERNEL " + kernel + "\n"
|
||||
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
|
||||
if not kernel:
|
||||
kernel = "bzImage"
|
||||
syslinux_conf += "KERNEL /" + kernel + "\n"
|
||||
syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
|
||||
% bootloader.append
|
||||
|
||||
|
@ -114,9 +116,11 @@ class IsoImagePlugin(SourcePlugin):
|
|||
grubefi_conf += "\n"
|
||||
grubefi_conf += "menuentry 'boot'{\n"
|
||||
|
||||
kernel = "/bzImage"
|
||||
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
|
||||
if not kernel:
|
||||
kernel = "bzImage"
|
||||
|
||||
grubefi_conf += "linux %s rootwait %s\n" \
|
||||
grubefi_conf += "linux /%s rootwait %s\n" \
|
||||
% (kernel, bootloader.append)
|
||||
grubefi_conf += "initrd /initrd \n"
|
||||
grubefi_conf += "}\n"
|
||||
|
@ -268,9 +272,12 @@ class IsoImagePlugin(SourcePlugin):
|
|||
if os.path.isfile("%s/initrd.cpio.gz" % cr_workdir):
|
||||
os.remove("%s/initrd.cpio.gz" % cr_workdir)
|
||||
|
||||
# Install bzImage
|
||||
install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
|
||||
(kernel_dir, isodir)
|
||||
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
|
||||
if not kernel:
|
||||
kernel = "bzImage"
|
||||
|
||||
install_cmd = "install -m 0644 %s/%s %s/%s" % \
|
||||
(kernel_dir, kernel, isodir, kernel)
|
||||
exec_cmd(install_cmd)
|
||||
|
||||
#Create bootloader for efi boot
|
||||
|
|
Loading…
Reference in New Issue
Block a user