From 811a74c0199f84e5aa7478c2c7e9ba9073aa4466 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 11 Mar 2024 00:08:38 +0000 Subject: [PATCH] boards/Kconfig: $BOARD_REVISION -> $(BOARD_REVISION) Add parentheses missing around $BOARD_REVISION. The syntax without parentheses has been deprecated for at least 5 years: https://github.com/ulfalizer/Kconfiglib/commit/374f48873424f9 That same documentation states "Using the old syntax with an undefined environment variable keeps the string as is." This what actually happens on Windows where `build/zephyr/.config` looks like this: CONFIG_BOARD_REVISION="$BOARD_REVISION" I found this because the behavior differs on Linux where the same, "old" syntax produces this instead: CONFIG_BOARD_REVISION="" This could be because environment variables work differently? (BOARD_REVISION is passed from kconfig.cmake to kconfiglib.py thanks to cmake -E env) Let's not try to debug this and just drop the deprecated syntax. It aligns both Windows and Linux on the same, expected, empty string behavior. Note these are the only two `def_string` found across all Kconfig files right now. Fixes commit c11b7852d15c ("Kconfig: add CONFIG_BOARD_REVISION") Fixes commit e2ff2a88ba76 ("sysbuild: include HWMv2 Kconfig in sysbuild") Signed-off-by: Marc Herbert --- boards/Kconfig | 2 +- share/sysbuild/Kconfig.v2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/Kconfig b/boards/Kconfig index 9268b7c0c9d..45ca2f84d6f 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -12,7 +12,7 @@ config BOARD soc/// config BOARD_REVISION - def_string "$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 diff --git a/share/sysbuild/Kconfig.v2 b/share/sysbuild/Kconfig.v2 index aa3a656e13f..c8261b08616 100644 --- a/share/sysbuild/Kconfig.v2 +++ b/share/sysbuild/Kconfig.v2 @@ -13,7 +13,7 @@ config BOARD soc/// config BOARD_REVISION - def_string "$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