From 6ed5ac7111409196f0f31b81eb13fbcb748a2747 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 11 Apr 2024 09:15:41 +0100 Subject: [PATCH] cmake: modules: configuration_files: Add support for soc overlays Adds support for SoC overlay files which go in a ``socs`` folder in application folders and functions similar to the ``boards`` folder, but works for SoCs instead of boards Signed-off-by: Jamie McCrae --- cmake/modules/configuration_files.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/configuration_files.cmake b/cmake/modules/configuration_files.cmake index dda142441e..2bd843a0d8 100644 --- a/cmake/modules/configuration_files.cmake +++ b/cmake/modules/configuration_files.cmake @@ -76,9 +76,10 @@ zephyr_boilerplate_watch(CONF_FILE) zephyr_get(DTC_OVERLAY_FILE SYSBUILD LOCAL) -# If DTC_OVERLAY_FILE is not set by the user, look for board-specific overlays -# in the 'boards' configuration subdirectory. +# If DTC_OVERLAY_FILE is not set by the user, look for SoC and board-specific overlays +# in the 'boards' and `soc` configuration subdirectories. if(NOT DEFINED DTC_OVERLAY_FILE) + zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/socs DTS DTC_OVERLAY_FILE QUALIFIERS SUFFIX ${FILE_SUFFIX}) zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/boards DTS DTC_OVERLAY_FILE SUFFIX ${FILE_SUFFIX}) endif() @@ -91,7 +92,6 @@ if(NOT DEFINED DTC_OVERLAY_FILE) NAMES "app.overlay" SUFFIX ${FILE_SUFFIX} ) endif() - endif() set(DTC_OVERLAY_FILE ${DTC_OVERLAY_FILE} CACHE STRING "If desired, you can \