summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/bootimg-efi.py
diff options
context:
space:
mode:
authorKareem Zarka <zarkakareem@gmail.com>2023-12-01 15:03:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-04 11:23:37 +0000
commit0a39f1aa09108edc919b82ba47417616052b530e (patch)
tree9db380356a52383bcb9d0331a94435e362176ac0 /scripts/lib/wic/plugins/source/bootimg-efi.py
parente7a87eb762fd2d86e2d54fe4e02d4253507a0525 (diff)
downloadpoky-0a39f1aa09108edc919b82ba47417616052b530e.tar.gz
wic: bootimg-efi: Make kernel image installation configurable
The issue with installing the kernel image to both rootfs and boot partition is that some systems rely on the kernel image in rootfs and not in the boot partition. This leads to duplication of the kernel image, which can cause unnecessary storage usage. This patch provides a solution to the problem by adding a new parameter "install-kernel-into-boot-dir" to the wic kickstart file. If this parameter is set to 'true', the plugin will install the kernel image to the boot partition. If the parameter is set to 'false', the plugin will skip installing the kernel image, avoiding duplication. (From OE-Core rev: d3599afe5f604ea5afd9411e114934dcb52b2d48) Signed-off-by: Kareem Zarka <kareem.zarka@huawei.com> Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 4f30926f1a..13a9cddf4e 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -400,9 +400,10 @@ class BootimgEFIPlugin(SourcePlugin):
400 400
401 exec_native_cmd(objcopy_cmd, native_sysroot) 401 exec_native_cmd(objcopy_cmd, native_sysroot)
402 else: 402 else:
403 install_cmd = "install -m 0644 %s/%s %s/%s" % \ 403 if source_params.get('install-kernel-into-boot-dir') != 'false':
404 (staging_kernel_dir, kernel, hdddir, kernel) 404 install_cmd = "install -m 0644 %s/%s %s/%s" % \
405 exec_cmd(install_cmd) 405 (staging_kernel_dir, kernel, hdddir, kernel)
406 exec_cmd(install_cmd)
406 407
407 if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): 408 if get_bitbake_var("IMAGE_EFI_BOOT_FILES"):
408 for src_path, dst_path in cls.install_task: 409 for src_path, dst_path in cls.install_task: