From bc47797fbb6c1f94476e57648ca228ce19c804ca Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Tue, 2 Feb 2021 10:55:55 +0100 Subject: [PATCH] cmake: Look for revision specific overlays also in /boards/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow-up to commit 77ecd6837d5040734b7d87c9cbfefc67bf736c55. Add missing check that looks for a revision specific overlay located in the `/boards/` directory similar to how overlays and Kconfig fragments are handled. Signed-off-by: Andrzej Głąbek Signed-off-by: Torsten Rasmussen --- cmake/app/boilerplate.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/app/boilerplate.cmake b/cmake/app/boilerplate.cmake index b76430e3d8..534c8dcc2a 100644 --- a/cmake/app/boilerplate.cmake +++ b/cmake/app/boilerplate.cmake @@ -480,17 +480,16 @@ The CACHED_CONF_FILE is internal Zephyr variable used between CMake runs. \ To change CONF_FILE, use the CONF_FILE variable.") unset(CONF_FILE CACHE) +zephyr_file(CONF_FILES ${APPLICATION_SOURCE_DIR}/boards DTS APP_BOARD_DTS) + if(DTC_OVERLAY_FILE) # DTC_OVERLAY_FILE has either been specified on the cmake CLI or is already # in the CMakeCache.txt. This has precedence over the environment # variable DTC_OVERLAY_FILE elseif(DEFINED ENV{DTC_OVERLAY_FILE}) set(DTC_OVERLAY_FILE $ENV{DTC_OVERLAY_FILE}) -elseif(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.overlay) - set(DTC_OVERLAY_FILE ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.overlay) -elseif((DEFINED BOARD_REVISION) AND - EXISTS ${APPLICATION_SOURCE_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay) - set(DTC_OVERLAY_FILE ${APPLICATION_SOURCE_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay) +elseif(APP_BOARD_DTS) + set(DTC_OVERLAY_FILE ${APP_BOARD_DTS}) elseif(EXISTS ${APPLICATION_SOURCE_DIR}/${BOARD}.overlay) set(DTC_OVERLAY_FILE ${APPLICATION_SOURCE_DIR}/${BOARD}.overlay) elseif(EXISTS ${APPLICATION_SOURCE_DIR}/app.overlay)