From 2e5c37142c3b5fb8782a7a736adc09771f14eae0 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 10 May 2023 21:40:04 +0000 Subject: [PATCH] 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 --- scripts/zephyr_module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/zephyr_module.py b/scripts/zephyr_module.py index db58bcea23c..ab27eaa5706 100755 --- a/scripts/zephyr_module.py +++ b/scripts/zephyr_module.py @@ -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):