diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-efi.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 21 |
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): | |||
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 | ||