diff options
| author | Chee Yang Lee <chee.yang.lee@intel.com> | 2019-06-11 14:31:37 +0800 | 
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-11 13:26:55 +0100 | 
| commit | 97feebdf99024489113634d1cada36eb9b84e9c6 (patch) | |
| tree | a43c06d315206df23b33e4dc18d1f87c21525aae /scripts/lib/wic/plugins/source/bootimg-efi.py | |
| parent | ef8080c804d160da5e7683f28c0c5924bc98bba4 (diff) | |
| download | poky-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/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 | ||
