With a single board now covering what used to be several boards, and
with the ability to omit SoC when building for a single SoC board, then
<board>_defconfig and <board>.dts lookup is improved.
A single SoC board may prefer to keep its defconfig entry point as
<board>_defconfig instead of <board>_<soc>_defconfig.
Also, a multi-SoC board / multi-core SoC board, which used to be
implemented as n-boards may wish to have common _defconfig settings in
a common <board>_defconfig file, and the SoC / cpuset specifics in
<board>_<soc>_defconfig / <board>_<soc>_<core>_defconfig.
Such defconfig support allows also to place build variant specifics in
its own <board>_<soc>_<variant>_defconfig file.
This commit allows multiple _defconfigs for a board and its identifiers.
Similar is implemented for a board's dts file.
If a <board>_<soc>_<core>.dts file is not found, the build system will
instead use <board>_<soc>.dts, and finally fallback to <board>.dts.
This allows a board to have a shared dts file for all board identifiers
which are identical while still support specific dts where required.
A dts file is a devicetree starting point and thus two dts files cannot
be used in together. For such cases, an ordinary board overlay file must
be used.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
pull/69687/head
Torsten Rasmussen2 years agocommitted byJamie McCrae
@ -2490,7 +2531,7 @@ Please provide one of following: APPLICATION_ROOT, CONF_FILES")
@@ -2490,7 +2531,7 @@ Please provide one of following: APPLICATION_ROOT, CONF_FILES")
@ -2548,24 +2589,23 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
@@ -2548,24 +2589,23 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
if(DEFINEDBOARD_REVISION)
set(FILE_BOARD_REVISION${BOARD_REVISION})
endif()
if(DEFINEDBOARD_IDENTIFIER)
set(FILE_BOARD_IDENTIFIER${BOARD_IDENTIFIER})
endif()
endif()
if(FILE_NAMES)
set(dts_filename_list${FILE_NAMES})
set(kconf_filename_list${FILE_NAMES})
else()
zephyr_build_string(filename
BOARD${FILE_BOARD}
BUILD${FILE_BUILD}
)
set(filename_list${filename})
zephyr_build_string(filename
zephyr_build_string(filename_list
BOARD${FILE_BOARD}
BOARD_REVISION${FILE_BOARD_REVISION}
BOARD_IDENTIFIER${FILE_BOARD_IDENTIFIER}
BUILD${FILE_BUILD}
MERGEREVERSE
)
list(APPENDfilename_list${filename})
list(REMOVE_DUPLICATESfilename_list)
set(dts_filename_list${filename_list})
list(TRANSFORMdts_filename_listAPPEND".overlay")
@ -2649,6 +2689,19 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
@@ -2649,6 +2689,19 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
message(DEPRECATION"prj_<build>.conf was deprecated after Zephyr 3.5,"