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

List:       openembedded-core
Subject:    [OE-Core][PATCH 2/2] wic: bootimg-partition: allow empty partition
From:       "Vivien Didelot" <vivien.didelot () gmail ! com>
Date:       2022-01-30 14:25:27
Message-ID: 20220130142527.2960188-2-vdidelot () pbsc ! com
[Download RAW message or body]

Content-Transfer-Encoding: 8bit

It is possible to use the bootimg-partition source plugin to fill an
optional boot partition, e.g. for data files or for kernel artifacts,
in case they aren't embedded in the root filesystem. In these scenarios
such partition may be empty, which is correct.

Instead of erroring out, just warn the user. While at it, make
it clearer how to populate such partition, by mentioning the
IMAGE_BOOT_FILES{,_uuid-<uuid>,_label-<label>} variables, as well as
their presence in WICVARS, which isn't obvious for a new user.

Signed-off-by: Vivien Didelot <vdidelot@pbsc.com>
---
 scripts/lib/wic/plugins/source/bootimg-partition.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py \
b/scripts/lib/wic/plugins/source/bootimg-partition.py index f22364766a..d7d9842b8c \
                100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -55,7 +55,8 @@ class BootimgPartitionPlugin(SourcePlugin):
                 break
 
         if boot_files is None:
-            raise WicError('No boot files defined, IMAGE_BOOT_FILES unset for entry \
#%d' % part.lineno) +            logger.warn('No boot files defined for entry #%d, %s \
unset or not in WICVARS.' % (part.lineno, ', '.join(vars))) +            return
 
         logger.debug('Boot files: %s', boot_files)
 
-- 
2.35.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#161115): https://lists.openembedded.org/g/openembedded-core/message/161115
Mute This Topic: https://lists.openembedded.org/mt/88792279/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