diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-partition.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-partition.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py index 5dbe2558d2..1071d1af3f 100644 --- a/scripts/lib/wic/plugins/source/bootimg-partition.py +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
2 | # SPDX-License-Identifier: GPL-2.0-only | 4 | # SPDX-License-Identifier: GPL-2.0-only |
3 | # | 5 | # |
4 | # DESCRIPTION | 6 | # DESCRIPTION |
@@ -30,6 +32,7 @@ class BootimgPartitionPlugin(SourcePlugin): | |||
30 | """ | 32 | """ |
31 | 33 | ||
32 | name = 'bootimg-partition' | 34 | name = 'bootimg-partition' |
35 | image_boot_files_var_name = 'IMAGE_BOOT_FILES' | ||
33 | 36 | ||
34 | @classmethod | 37 | @classmethod |
35 | def do_configure_partition(cls, part, source_params, cr, cr_workdir, | 38 | def do_configure_partition(cls, part, source_params, cr, cr_workdir, |
@@ -54,12 +57,12 @@ class BootimgPartitionPlugin(SourcePlugin): | |||
54 | else: | 57 | else: |
55 | var = "" | 58 | var = "" |
56 | 59 | ||
57 | boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var) | 60 | boot_files = get_bitbake_var(cls.image_boot_files_var_name + var) |
58 | if boot_files is not None: | 61 | if boot_files is not None: |
59 | break | 62 | break |
60 | 63 | ||
61 | if boot_files is None: | 64 | if boot_files is None: |
62 | 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)) |
63 | 66 | ||
64 | logger.debug('Boot files: %s', boot_files) | 67 | logger.debug('Boot files: %s', boot_files) |
65 | 68 | ||
@@ -110,7 +113,7 @@ class BootimgPartitionPlugin(SourcePlugin): | |||
110 | # Use a custom configuration for extlinux.conf | 113 | # Use a custom configuration for extlinux.conf |
111 | extlinux_conf = custom_cfg | 114 | extlinux_conf = custom_cfg |
112 | logger.debug("Using custom configuration file " | 115 | logger.debug("Using custom configuration file " |
113 | "%s for extlinux.cfg", configfile) | 116 | "%s for extlinux.conf", configfile) |
114 | else: | 117 | else: |
115 | raise WicError("configfile is specified but failed to " | 118 | raise WicError("configfile is specified but failed to " |
116 | "get it from %s." % configfile) | 119 | "get it from %s." % configfile) |