Skip to content

Commit c11b785

Browse files
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 <[email protected]>
1 parent f433001 commit c11b785

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

boards/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ config BOARD
99
if not found we look for the linker file in
1010
soc/<arch>/<family>/<series>
1111

12+
config BOARD_REVISION
13+
def_string "$BOARD_REVISION"
14+
help
15+
If the BOARD has a revision field set, this is the revision.
16+
Otherwise, it is the empty string. For example, if BOARD is
17+
"plank@foo", this option will be "foo". If BOARD is "plank",
18+
this option will be the empty string.
19+
1220
config BOARD_DEPRECATED_RELEASE
1321
string
1422
help

cmake/modules/kconfig.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
115115
ARCH=${ARCH}
116116
ARCH_DIR=${ARCH_DIR}
117117
BOARD_DIR=${BOARD_DIR}
118+
BOARD_REVISION=${BOARD_REVISION}
118119
KCONFIG_BINARY_DIR=${KCONFIG_BINARY_DIR}
119120
ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
120121
TOOLCHAIN_KCONFIG_DIR=${TOOLCHAIN_KCONFIG_DIR}

0 commit comments

Comments
 (0)