scripts: module: Fix sysbuild module listing

Fixes an issue with zephyr modules not being listed in sysbuild if
they did not have a Kconfig file set

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2024-04-29 09:40:24 +01:00 committed by Fabio Baltieri
parent 4d7fe771f1
commit acd14f8af2

View file

@ -370,14 +370,15 @@ def process_sysbuildkconfig(module, meta):
'not point to a valid Kconfig file.' 'not point to a valid Kconfig file.'
.format(module_yml, kconfig_setting)) .format(module_yml, kconfig_setting))
if kconfig_setting is None: if kconfig_setting is not None:
return "" kconfig_file = os.path.join(module, kconfig_setting)
if os.path.isfile(kconfig_file):
return kconfig_snippet(meta, module_path, Path(kconfig_file))
kconfig_file = os.path.join(module, kconfig_setting) name_sanitized = meta['name-sanitized']
if os.path.isfile(kconfig_file): return (f'config ZEPHYR_{name_sanitized.upper()}_MODULE\n'
return kconfig_snippet(meta, module_path, Path(kconfig_file)) f' bool\n'
else: f' default y\n')
return ""
def process_twister(module, meta): def process_twister(module, meta):