Skip to content

Commit

Permalink
boards/Kconfig: $BOARD_REVISION -> $(BOARD_REVISION)
Browse files Browse the repository at this point in the history
Add parentheses missing around $BOARD_REVISION.

The syntax without parentheses has been deprecated for at least 5 years:
ulfalizer/Kconfiglib@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 c11b785 ("Kconfig: add CONFIG_BOARD_REVISION")
Fixes commit e2ff2a8 ("sysbuild: include HWMv2 Kconfig in sysbuild")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb authored and henrikbrixandersen committed Mar 13, 2024
1 parent ba46cd0 commit 811a74c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boards/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config BOARD
soc/<arch>/<family>/<series>

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
Expand Down
2 changes: 1 addition & 1 deletion share/sysbuild/Kconfig.v2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config BOARD
soc/<arch>/<family>/<series>

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
Expand Down

0 comments on commit 811a74c

Please sign in to comment.