Kconfig: add CONFIG_BOARD_REVISION

Propagate the board revision to Kconfig via the environment.

This is useful for application code to have access to for similar
reasons that CONFIG_BOARD is useful.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2022-04-07 11:21:18 -07:00 committed by Marti Bolivar
parent f433001185
commit c11b7852d1
2 changed files with 9 additions and 0 deletions

View file

@ -9,6 +9,14 @@ config BOARD
if not found we look for the linker file in
soc/<arch>/<family>/<series>
config BOARD_REVISION
def_string "$BOARD_REVISION"
help
If the BOARD has a revision field set, this is the revision.
Otherwise, it is the empty string. For example, if BOARD is
"plank@foo", this option will be "foo". If BOARD is "plank",
this option will be the empty string.
config BOARD_DEPRECATED_RELEASE
string
help

View file

@ -115,6 +115,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
ARCH=${ARCH}
ARCH_DIR=${ARCH_DIR}
BOARD_DIR=${BOARD_DIR}
BOARD_REVISION=${BOARD_REVISION}
KCONFIG_BINARY_DIR=${KCONFIG_BINARY_DIR}
ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
TOOLCHAIN_KCONFIG_DIR=${TOOLCHAIN_KCONFIG_DIR}