What is the best way, or is there a way, to set a value in a parent Kconfig menu and have it available in a subordinate component Kconfig? In other words, how can I set a variable in the parent Kconfig and have it available in the component Kconfig?
For example, I want the WIFI_HOSTNAME "Foo" to be set in "some_component" as well as the parent. One approach would be:
Code: Select all
config WIFI_HOSTNAME
string "WiFi Hostname"
default "Foo"
help
Set the WiFi hostname for the project.
# Source the "some_component" Kconfig
source "${COMPONENT_KCONFIGS_DIR}/some_component/Kconfig"
Code: Select all
config GECL_OTA_MANAGER_WIFI_HOSTNAME
string "WiFi Hostname this component"
default "${WIFI_HOSTNAME}" # <---- DOES NOT WORK
help
Set the WiFi hostname in the component.
endif
TIA,
-T