From: Kareem Zarka Date: Fri, 1 Dec 2023 14:03:31 +0000 (+0100) Subject: wic: bootimg-efi: Make kernel image installation configurable X-Git-Tag: yocto-5.2~4424 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3599afe5f604ea5afd9411e114934dcb52b2d48;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Kareem Zarka Signed-off-by: Christian Taedcke Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 4f30926f1ad..13a9cddf4e1 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): exec_native_cmd(objcopy_cmd, native_sysroot) else: - install_cmd = "install -m 0644 %s/%s %s/%s" % \ - (staging_kernel_dir, kernel, hdddir, kernel) - exec_cmd(install_cmd) + if source_params.get('install-kernel-into-boot-dir') != 'false': + install_cmd = "install -m 0644 %s/%s %s/%s" % \ + (staging_kernel_dir, kernel, hdddir, kernel) + exec_cmd(install_cmd) if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): for src_path, dst_path in cls.install_task: