diff options
author | Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> | 2020-09-14 18:10:27 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-15 11:53:28 +0100 |
commit | 85574ce0cf84eaf828334dd2fafadc18909e73b5 (patch) | |
tree | adac34bc3f5bf96805b276ead6bc46dd75230698 /scripts/lib | |
parent | a91c7901d097da424431d66d5a5100bb1020b374 (diff) | |
download | poky-85574ce0cf84eaf828334dd2fafadc18909e73b5.tar.gz |
wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi and bootimg-partition
Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES,
when both bootimg-partition and bootimg-efi occur in a single .wks
and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES
will be duplicated in both partition.
Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but
optional for bootimg-efi, hence allowing bootimg-efi to have the option
to ignore it.
The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this
issue. Its basic usage is the same as IMAGE_BOOT_FILES.
Usage example:
${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \
This commit is also squashed with the updated testcase to cover for
this change.
[YOCTO #14011]
(From OE-Core rev: 945339e06b273df1935cfd784f548ef57e0b7f4c)
Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 14c1723577..cdc72543c2 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -212,8 +212,8 @@ class BootimgEFIPlugin(SourcePlugin): | |||
212 | except KeyError: | 212 | except KeyError: |
213 | raise WicError("bootimg-efi requires a loader, none specified") | 213 | raise WicError("bootimg-efi requires a loader, none specified") |
214 | 214 | ||
215 | if get_bitbake_var("IMAGE_BOOT_FILES") is None: | 215 | if get_bitbake_var("IMAGE_EFI_BOOT_FILES") is None: |
216 | logger.debug('No boot files defined in IMAGE_BOOT_FILES') | 216 | logger.debug('No boot files defined in IMAGE_EFI_BOOT_FILES') |
217 | else: | 217 | else: |
218 | boot_files = None | 218 | boot_files = None |
219 | for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)): | 219 | for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)): |
@@ -222,7 +222,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
222 | else: | 222 | else: |
223 | var = "" | 223 | var = "" |
224 | 224 | ||
225 | boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var) | 225 | boot_files = get_bitbake_var("IMAGE_EFI_BOOT_FILES" + var) |
226 | if boot_files: | 226 | if boot_files: |
227 | break | 227 | break |
228 | 228 | ||
@@ -292,7 +292,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
292 | (staging_kernel_dir, kernel, hdddir, kernel) | 292 | (staging_kernel_dir, kernel, hdddir, kernel) |
293 | exec_cmd(install_cmd) | 293 | exec_cmd(install_cmd) |
294 | 294 | ||
295 | if get_bitbake_var("IMAGE_BOOT_FILES"): | 295 | if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): |
296 | for src_path, dst_path in cls.install_task: | 296 | for src_path, dst_path in cls.install_task: |
297 | install_cmd = "install -m 0644 -D %s %s" \ | 297 | install_cmd = "install -m 0644 -D %s %s" \ |
298 | % (os.path.join(kernel_dir, src_path), | 298 | % (os.path.join(kernel_dir, src_path), |