summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAnibal Limon <anibal@limonsoftware.com>2024-03-23 13:53:03 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-26 17:10:51 +0000
commit7c3f956a0a8dbbbbfdf443b55e5287ca8301fe70 (patch)
tree12db4d57d8159721c7d059473fa418b3930f108e /scripts
parent81567510fd9f876082204217f7a41782966eec18 (diff)
downloadpoky-7c3f956a0a8dbbbbfdf443b55e5287ca8301fe70.tar.gz
wic: bootimg-partition allow to set var to get boot files
This is a generic functionality that takes a set of files and create a boot parition based on IMAGE_BOOT_FILES var, allow to sepcify the variable name so a BSP plugin can extend this and re-use the functionality. (From OE-Core rev: 3a2339455be29a6ff65c8c5f6865a4cd35dd7f63) Signed-off-by: Anibal Limon <anibal@limonsoftware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-partition.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index 58f6da72c3..1071d1af3f 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -32,6 +32,7 @@ class BootimgPartitionPlugin(SourcePlugin):
32 """ 32 """
33 33
34 name = 'bootimg-partition' 34 name = 'bootimg-partition'
35 image_boot_files_var_name = 'IMAGE_BOOT_FILES'
35 36
36 @classmethod 37 @classmethod
37 def do_configure_partition(cls, part, source_params, cr, cr_workdir, 38 def do_configure_partition(cls, part, source_params, cr, cr_workdir,
@@ -56,12 +57,12 @@ class BootimgPartitionPlugin(SourcePlugin):
56 else: 57 else:
57 var = "" 58 var = ""
58 59
59 boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var) 60 boot_files = get_bitbake_var(cls.image_boot_files_var_name + var)
60 if boot_files is not None: 61 if boot_files is not None:
61 break 62 break
62 63
63 if boot_files is None: 64 if boot_files is None:
64 raise WicError('No boot files defined, IMAGE_BOOT_FILES unset for entry #%d' % part.lineno) 65 raise WicError('No boot files defined, %s unset for entry #%d' % (cls.image_boot_files_var_name, part.lineno))
65 66
66 logger.debug('Boot files: %s', boot_files) 67 logger.debug('Boot files: %s', boot_files)
67 68