mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(tools): generate kconfig.in files for components not included in the build
To generate a complete configuration for all discovered components, we need to ensure that even kconfig files for the excluded components are seen by Kconfig. Modify the prepare_kconfig_files.py script to generate files that list the Kconfig files for excluded components. These files are sourced in the root Kconfig using the COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE and COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE environment variables. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -19,14 +19,14 @@ def _prepare_source_files(env_dict: dict[str, str], list_separator: str) -> None
|
|||||||
- COMPONENT_KCONFIGS_SOURCE_FILE,
|
- COMPONENT_KCONFIGS_SOURCE_FILE,
|
||||||
- COMPONENT_KCONFIGS_PROJBUILD,
|
- COMPONENT_KCONFIGS_PROJBUILD,
|
||||||
- COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE,
|
- COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE,
|
||||||
- COMPONENT_KCONFIGS_EXCLUDED, (TODO: Currently disabled)
|
- COMPONENT_KCONFIGS_EXCLUDED,
|
||||||
- COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED. (TODO: Currently disabled)
|
- COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED,
|
||||||
|
|
||||||
The outputs are written into files pointed by the value of
|
The outputs are written into files pointed by the value of
|
||||||
- COMPONENT_KCONFIGS_SOURCE_FILE,
|
- COMPONENT_KCONFIGS_SOURCE_FILE,
|
||||||
- COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE,
|
- COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE,
|
||||||
- COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE, (TODO: Currently disabled)
|
- COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE,
|
||||||
- COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE, (TODO: Currently disabled)
|
- COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE,
|
||||||
|
|
||||||
After running this function, all source files will contain a list of source statements based on the
|
After running this function, all source files will contain a list of source statements based on the
|
||||||
content of their corresponding environment variables. For example, if COMPONENT_KCONFIGS="var1;var2;var3" and
|
content of their corresponding environment variables. For example, if COMPONENT_KCONFIGS="var1;var2;var3" and
|
||||||
@@ -68,16 +68,15 @@ def _prepare_source_files(env_dict: dict[str, str], list_separator: str) -> None
|
|||||||
_write_source_file(
|
_write_source_file(
|
||||||
env_dict['COMPONENT_KCONFIGS_PROJBUILD'], env_dict['COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE']
|
env_dict['COMPONENT_KCONFIGS_PROJBUILD'], env_dict['COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE']
|
||||||
)
|
)
|
||||||
# TODO: Enable excluded Kconfig processing once integration is complete
|
if env_dict.get('COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE'):
|
||||||
# Currently commented out due to FileNotFoundError when paths are empty during CI tests
|
_write_source_file(
|
||||||
# _write_source_file(
|
env_dict['COMPONENT_KCONFIGS_EXCLUDED'], env_dict['COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE']
|
||||||
# env_dict['COMPONENT_KCONFIGS_EXCLUDED'],
|
)
|
||||||
# env_dict['COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE']
|
if env_dict.get('COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE'):
|
||||||
# )
|
_write_source_file(
|
||||||
# _write_source_file(
|
env_dict['COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED'],
|
||||||
# env_dict['COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED'],
|
env_dict['COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE'],
|
||||||
# env_dict['COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE'],
|
)
|
||||||
# )
|
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
print('Error:', e, 'is not defined!')
|
print('Error:', e, 'is not defined!')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user