All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.