summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
diff options
context:
space:
mode:
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