diff --git a/boards/Kconfig b/boards/Kconfig index 45ca2f84d6f66e..13599252b72528 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -19,6 +19,17 @@ config BOARD_REVISION "plank@foo", this option will be "foo". If BOARD is "plank", this option will be the empty string. +config BOARD_TARGET + string + default "$(BOARD)@$(BOARD_REVISION)$(BOARD_QUALIFIERS)" if "$(BOARD_REVISION)" != "" + default "$(BOARD)$(BOARD_QUALIFIERS)" + help + Contains the board target (full string including name, revision, soc, cluster and + variant) of the board being used. + + For example, if building for ``nrf5340dk/nrf5340/cpuapp`` then this will contain the + value ``nrf5340dk/nrf5340/cpuapp``. + config BOARD_DEPRECATED_RELEASE string help diff --git a/boards/Kconfig.v2 b/boards/Kconfig.v2 index 1da8c5487eafda..47bb3ae2240167 100644 --- a/boards/Kconfig.v2 +++ b/boards/Kconfig.v2 @@ -1,9 +1,10 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA +# Copyright (c) 2022-2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 BOARD_STRING := $(normalize_upper,$(BOARD)) BOARD_TARGET_STRING := $(normalize_upper,$(BOARD)$(BOARD_QUALIFIERS)) +BOARD_QUALIFIERS_NO_SEPARATOR := $(substring,$(BOARD_QUALIFIERS),1) config BOARD_$(BOARD_STRING) def_bool y @@ -15,4 +16,13 @@ config BOARD_$(BOARD_TARGET_STRING) help Kconfig symbol identifying the board target. +config BOARD_QUALIFIERS + string + default "$(BOARD_QUALIFIERS_NO_SEPARATOR)" + help + Contains the qualifiers of the board being used without the name of the board itself. + + For example, if building for ``nrf5340dk/nrf5340/cpuapp`` then this will contain the + value ``nrf5340/cpuapp``. + osource "$(BOARD_DIR)/Kconfig.$(BOARD)"