[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] bootimg-efi.py: Skip installing kernel-image into boot partition for rootfs-re
From:       "Richard Purdie" <richard.purdie () linuxfoundation ! org>
Date:       2023-01-31 12:16:21
Message-ID: 6113ca281120b581edd4c594813f6f9717b2f9ba.camel () linuxfoundation ! org
[Download RAW message or body]

On Tue, 2023-01-31 at 13:04 +0100, Kareem Zarka wrote:
> From: Kareem Zarka <kareem.zarka@huawei.com>
> 
> 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 and potential compatibility issues.
> 
> This patch provides a solution to this problem by adding a new
> parameter "skip-kernel-install" to the wic kickstart file, which can
> be passed to the plugin.
> If the parameter is provided, the plugin will skip installing the
> kernel-image to the boot partition, avoiding duplication and potential
> issues.
> 
> By adding this new parameter, we give the users the option to install
> the kernel-image only in rootfs, or to install it in both rootfs and
> boot partition, depending on their needs and preferences.
> This will help to improve the system's storage usage and compatibility.
> 
> Signed-off-by: Kareem Zarka <kareem.zarka@huawei.com>
> ---
> scripts/lib/wic/plugins/source/bootimg-efi.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py \
> b/scripts/lib/wic/plugins/source/bootimg-efi.py index 4b00913a70..e04d49abe6 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-efi.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
> @@ -363,9 +363,13 @@ class BootimgEFIPlugin(SourcePlugin):
> objcopy_cmd += " %s %s/EFI/Linux/linux.efi" % (efi_stub, hdddir)
> 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)
> +            # skip_kernal_install was added to source_params to conifgure \
> installing the kernel-image. +            # set skip_kernal_install in the \
> kickstart file to skip installing it into hdddir. +            # if not set then \
> the kernel-image will be installed. +            if not  \
> source_params.get('skip_kernal_install'): +                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:

I'm fine with adding such an option but could you also add a test for
it please? wic has good test coverage and I'd like to keep that. You
can run the tests with:

oe-selftest -r wic

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176518): https://lists.openembedded.org/g/openembedded-core/message/176518
Mute This Topic: https://lists.openembedded.org/mt/96650530/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic