summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/isoimage-isohybrid.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:55 +0100
commit97feebdf99024489113634d1cada36eb9b84e9c6 (patch)
treea43c06d315206df23b33e4dc18d1f87c21525aae /scripts/lib/wic/plugins/source/isoimage-isohybrid.py
parentef8080c804d160da5e7683f28c0c5924bc98bba4 (diff)
downloadpoky-97feebdf99024489113634d1cada36eb9b84e9c6.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. (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>
Diffstat (limited to 'scripts/lib/wic/plugins/source/isoimage-isohybrid.py')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 96d07ff629..74d6f14519 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -70,8 +70,10 @@ class IsoImagePlugin(SourcePlugin):
70 syslinux_conf += "DEFAULT boot\n" 70 syslinux_conf += "DEFAULT boot\n"
71 syslinux_conf += "LABEL boot\n" 71 syslinux_conf += "LABEL boot\n"
72 72
73 kernel = "/bzImage" 73 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
74 syslinux_conf += "KERNEL " + kernel + "\n" 74 if not kernel:
75 kernel = "bzImage"
76 syslinux_conf += "KERNEL /" + kernel + "\n"
75 syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \ 77 syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
76 % bootloader.append 78 % bootloader.append
77 79
@@ -114,9 +116,11 @@ class IsoImagePlugin(SourcePlugin):
114 grubefi_conf += "\n" 116 grubefi_conf += "\n"
115 grubefi_conf += "menuentry 'boot'{\n" 117 grubefi_conf += "menuentry 'boot'{\n"
116 118
117 kernel = "/bzImage" 119 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
120 if not kernel:
121 kernel = "bzImage"
118 122
119 grubefi_conf += "linux %s rootwait %s\n" \ 123 grubefi_conf += "linux /%s rootwait %s\n" \
120 % (kernel, bootloader.append) 124 % (kernel, bootloader.append)
121 grubefi_conf += "initrd /initrd \n" 125 grubefi_conf += "initrd /initrd \n"
122 grubefi_conf += "}\n" 126 grubefi_conf += "}\n"
@@ -268,9 +272,12 @@ class IsoImagePlugin(SourcePlugin):
268 if os.path.isfile("%s/initrd.cpio.gz" % cr_workdir): 272 if os.path.isfile("%s/initrd.cpio.gz" % cr_workdir):
269 os.remove("%s/initrd.cpio.gz" % cr_workdir) 273 os.remove("%s/initrd.cpio.gz" % cr_workdir)
270 274
271 # Install bzImage 275 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
272 install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ 276 if not kernel:
273 (kernel_dir, isodir) 277 kernel = "bzImage"
278
279 install_cmd = "install -m 0644 %s/%s %s/%s" % \
280 (kernel_dir, kernel, isodir, kernel)
274 exec_cmd(install_cmd) 281 exec_cmd(install_cmd)
275 282
276 #Create bootloader for efi boot 283 #Create bootloader for efi boot