* [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES
@ 2020-08-24 6:39 khairul.rohaizzat.jamaluddin
2020-08-24 22:26 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: khairul.rohaizzat.jamaluddin @ 2020-08-24 6:39 UTC (permalink / raw)
To: openembedded-core
From: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
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 allow bootimg-efi to have the option
to ignore it.
The new variable, excludeibf, in bootimg-efi.py need to be set in
the .wks file to make use of this feature. Simply remove the
variable from the the .wks file if not needed.
Example:
part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,
excludeibf=y" --ondisk sda --label msdos --active --align 1024 --use-uuid
[YOCTO #14011]
Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
---
scripts/lib/wic/plugins/source/bootimg-efi.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 14c1723..b3c76e2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -214,6 +214,8 @@ class BootimgEFIPlugin(SourcePlugin):
if get_bitbake_var("IMAGE_BOOT_FILES") is None:
logger.debug('No boot files defined in IMAGE_BOOT_FILES')
+ elif source_params.get('excludeibf') == 'y':
+ logger.debug('Skipping IMAGE_BOOT_FILES values')
else:
boot_files = None
for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)):
@@ -292,7 +294,9 @@ class BootimgEFIPlugin(SourcePlugin):
(staging_kernel_dir, kernel, hdddir, kernel)
exec_cmd(install_cmd)
- if get_bitbake_var("IMAGE_BOOT_FILES"):
+ if source_params.get('excludeibf') == 'y':
+ logger.debug('Skipping IMAGE_BOOT_FILES values')
+ elif get_bitbake_var("IMAGE_BOOT_FILES"):
for src_path, dst_path in cls.install_task:
install_cmd = "install -m 0644 -D %s %s" \
% (os.path.join(kernel_dir, src_path),
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES
2020-08-24 6:39 [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES khairul.rohaizzat.jamaluddin
@ 2020-08-24 22:26 ` Richard Purdie
2020-08-25 1:15 ` khairul.rohaizzat.jamaluddin
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2020-08-24 22:26 UTC (permalink / raw)
To: khairul.rohaizzat.jamaluddin, openembedded-core
On Mon, 2020-08-24 at 14:39 +0800, khairul.rohaizzat.jamaluddin@intel.com wrote:
> From: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
>
> 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 allow bootimg-efi to have the option
> to ignore it.
>
> The new variable, excludeibf, in bootimg-efi.py need to be set in
> the .wks file to make use of this feature. Simply remove the
> variable from the the .wks file if not needed.
> Example:
> part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,
> excludeibf=y" --ondisk sda --label msdos --active --align 1024 --use-uuid
>
> [YOCTO #14011]
>
> Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
> ---
> scripts/lib/wic/plugins/source/bootimg-efi.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
I'm torn between this and instead changing efi to use
IMAGE_EFI_BOOT_FILES instead. Changing the variable would mean more
flexibility in how the image is constructed...
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES
2020-08-24 22:26 ` [OE-core] " Richard Purdie
@ 2020-08-25 1:15 ` khairul.rohaizzat.jamaluddin
0 siblings, 0 replies; 3+ messages in thread
From: khairul.rohaizzat.jamaluddin @ 2020-08-25 1:15 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
I suppose either way is fine, as long as the issue could be resolved.
And I agree, adding a new variable in the local.conf would give more flexibility in the built image than the method I applied.
It’s a better solution.
Thank you & Kind regards,
Khairul
-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Sent: Tuesday, August 25, 2020 6:26 AM
To: Jamaluddin, Khairul Rohaizzat <khairul.rohaizzat.jamaluddin@intel.com>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES
On Mon, 2020-08-24 at 14:39 +0800, khairul.rohaizzat.jamaluddin@intel.com wrote:
> From: Khairul Rohaizzat Jamaluddin
> <khairul.rohaizzat.jamaluddin@intel.com>
>
> 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 allow bootimg-efi to have the option to ignore
> it.
>
> The new variable, excludeibf, in bootimg-efi.py need to be set in the
> .wks file to make use of this feature. Simply remove the variable from
> the the .wks file if not needed.
> Example:
> part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,
> excludeibf=y" --ondisk sda --label msdos --active --align 1024
> --use-uuid
>
> [YOCTO #14011]
>
> Signed-off-by: Khairul Rohaizzat Jamaluddin
> <khairul.rohaizzat.jamaluddin@intel.com>
> ---
> scripts/lib/wic/plugins/source/bootimg-efi.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
I'm torn between this and instead changing efi to use IMAGE_EFI_BOOT_FILES instead. Changing the variable would mean more flexibility in how the image is constructed...
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-25 1:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 6:39 [PATCH] wic/bootimg-efi: Added feature to exclude IMAGE_BOOT_FILES khairul.rohaizzat.jamaluddin
2020-08-24 22:26 ` [OE-core] " Richard Purdie
2020-08-25 1:15 ` khairul.rohaizzat.jamaluddin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.