scripts: kconfig: Always generate ZEPHYR_*_MODULE

Define the ZEPHYR_{MODULE_NAM}_MODULE option for all available modules.
Right now only modules defined as 'kconfig-ext' has this symbol defined
which may cause problem if the build wants to check if a module not
using this options is available.

This allow us to do something like:

comment "mbedTLS module not available."
	depends on !ZEPHYR_MBEDTLS_MODULE

or make a feature depends on the module be present.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2023-05-10 21:40:04 +00:00 committed by Carles Cufí
commit 2e5c37142c

View file

@ -350,7 +350,10 @@ def process_kconfig(module, meta):
return kconfig_snippet(meta, module_path, Path(kconfig_file),
blobs=taint_blobs)
else:
return ""
name_sanitized = meta['name-sanitized']
return (f'config ZEPHYR_{name_sanitized.upper()}_MODULE\n'
f' bool\n'
f' default y\n')
def process_sysbuildkconfig(module, meta):