zephyr/scripts/kconfig
Jordan Yates 79e467c92a scripts: kconfig: kconfiglib: introduce configdefault
Introduce the `configdefault` keyword as a Kconfig extension. This new
keyword allows `default` values to be applied to externally defined
symbols without needing to respecify dependencies, or weakening the
existing dependencies.

This is primarily useful in downstream repositories that wish to define
default configurations such as:
```
config MY_COMPANY_APPS
    bool "Apply defaults for internal applications"

configdefault BT
    default y if MY_COMPANY_APPS
configdefault MCUMGR
    default y if MY_COMPANY_APPS && BT
```

Obtaining the same functionality with `config` (without weakening the
symbol dependencies) requires finding the original definition and
duplicating any `depends on` and surrounding `if` statements. This is a
non-trivial exercise that needs to be manually rechecked on each Zephyr
update.

`configdefault` simplifies this process by acting as if the `default`
statement was present at any one of the original definitions of the
symbol.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-26 09:47:06 +02:00
..
diffconfig license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
guiconfig.py kconfig: wrap description in guiconfig 2022-10-31 23:23:46 +09:00
hardenconfig.py hardening: Deal with empty lines in csv file 2020-08-12 16:43:18 -04:00
hardened.csv net: ppp: Mark the PPP L2 as non-experimental 2023-09-29 10:33:50 +02:00
kconfig.py scripts: kconfig: Make DEPRECATED/EXPERIMENTAL symbols optional 2023-10-11 18:25:57 +03:00
kconfigfunctions.py scripts: kconfig: size/addr by nodelabel 2023-08-02 10:38:23 +02:00
kconfiglib.py scripts: kconfig: kconfiglib: introduce configdefault 2023-10-26 09:47:06 +02:00
lint.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
menuconfig.py scripts: menuconfig: proper handling of NULL character as input 2021-04-07 10:19:14 +02:00