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>
diff --git a/scripts/zephyr_module.py b/scripts/zephyr_module.py
index db58bce..ab27eaa 100755
--- a/scripts/zephyr_module.py
+++ b/scripts/zephyr_module.py
@@ -350,7 +350,10 @@
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):