summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py21
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py8
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py21
3 files changed, 35 insertions, 15 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):
71 grubefi_conf += "timeout=%s\n" % bootloader.timeout 71 grubefi_conf += "timeout=%s\n" % bootloader.timeout
72 grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot") 72 grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot")
73 73
74 kernel = "/bzImage" 74 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
75 if not kernel:
76 kernel = "bzImage"
75 77
76 label = source_params.get('label') 78 label = source_params.get('label')
77 label_conf = "root=%s" % creator.rootdev 79 label_conf = "root=%s" % creator.rootdev
78 if label: 80 if label:
79 label_conf = "LABEL=%s" % label 81 label_conf = "LABEL=%s" % label
80 82
81 grubefi_conf += "linux %s %s rootwait %s\n" \ 83 grubefi_conf += "linux /%s %s rootwait %s\n" \
82 % (kernel, label_conf, bootloader.append) 84 % (kernel, label_conf, bootloader.append)
83 85
84 if initrd: 86 if initrd:
@@ -143,12 +145,15 @@ class BootimgEFIPlugin(SourcePlugin):
143 145
144 if not custom_cfg: 146 if not custom_cfg:
145 # Create systemd-boot configuration using parameters from wks file 147 # Create systemd-boot configuration using parameters from wks file
146 kernel = "/bzImage" 148 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
149 if not kernel:
150 kernel = "bzImage"
151
147 title = source_params.get('title') 152 title = source_params.get('title')
148 153
149 boot_conf = "" 154 boot_conf = ""
150 boot_conf += "title %s\n" % (title if title else "boot") 155 boot_conf += "title %s\n" % (title if title else "boot")
151 boot_conf += "linux %s\n" % kernel 156 boot_conf += "linux /%s\n" % kernel
152 157
153 label = source_params.get('label') 158 label = source_params.get('label')
154 label_conf = "LABEL=Boot root=%s" % creator.rootdev 159 label_conf = "LABEL=Boot root=%s" % creator.rootdev
@@ -209,8 +214,12 @@ class BootimgEFIPlugin(SourcePlugin):
209 214
210 hdddir = "%s/hdd/boot" % cr_workdir 215 hdddir = "%s/hdd/boot" % cr_workdir
211 216
212 install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ 217 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
213 (staging_kernel_dir, hdddir) 218 if not kernel:
219 kernel = "bzImage"
220
221 install_cmd = "install -m 0644 %s/%s %s/%s" % \
222 (staging_kernel_dir, kernel, hdddir, kernel)
214 exec_cmd(install_cmd) 223 exec_cmd(install_cmd)
215 224
216 225
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 6c9f54a897..670d347747 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -149,8 +149,12 @@ class BootimgPcbiosPlugin(SourcePlugin):
149 149
150 hdddir = "%s/hdd/boot" % cr_workdir 150 hdddir = "%s/hdd/boot" % cr_workdir
151 151
152 cmds = ("install -m 0644 %s/bzImage %s/vmlinuz" % 152 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
153 (staging_kernel_dir, hdddir), 153 if not kernel:
154 kernel = "bzImage"
155
156 cmds = ("install -m 0644 %s/%s %s/vmlinuz" %
157 (staging_kernel_dir, kernel, hdddir),
154 "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" % 158 "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" %
155 (bootimg_dir, hdddir), 159 (bootimg_dir, hdddir),
156 "install -m 0644 %s/syslinux/vesamenu.c32 %s/vesamenu.c32" % 160 "install -m 0644 %s/syslinux/vesamenu.c32 %s/vesamenu.c32" %
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