sysbuild: Add support for FILE_SUFFIX

Adds supports for sysbuild loading project-specific Kconfiguration
fragments that are suffixed with the user-provided value

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2023-12-05 13:25:56 +00:00 committed by Carles Cufí
parent ef251048e4
commit f7f320c494
2 changed files with 6 additions and 11 deletions

View file

@ -90,9 +90,6 @@ DTC_OVERLAY_FILE=\"dts1.overlay dts2.overlay\"")
# The DTC_OVERLAY_FILE variable is now set to its final value.
zephyr_boilerplate_watch(DTC_OVERLAY_FILE)
# Watch the FILE_SUFFIX variable for changes too
zephyr_boilerplate_watch(FILE_SUFFIX)
zephyr_get(EXTRA_CONF_FILE SYSBUILD LOCAL VAR EXTRA_CONF_FILE OVERLAY_CONFIG MERGE REVERSE)
zephyr_get(EXTRA_DTC_OVERLAY_FILE SYSBUILD LOCAL MERGE REVERSE)
zephyr_get(DTS_EXTRA_CPPFLAGS SYSBUILD LOCAL MERGE REVERSE)

View file

@ -268,14 +268,12 @@ function(ExternalZephyrProject_Add)
)
endif()
# Check for sysbuild related configuration fragments.
# The contents of these are appended to the image existing configuration
# when user is not specifying custom fragments.
if(NOT "${CONF_FILE_BUILD_TYPE}" STREQUAL "")
set(sysbuild_image_conf_fragment ${sysbuild_image_conf_dir}/${ZBUILD_APPLICATION}_${CONF_FILE_BUILD_TYPE}.conf)
else()
set(sysbuild_image_conf_fragment ${sysbuild_image_conf_dir}/${ZBUILD_APPLICATION}.conf)
endif()
# Check for sysbuild related configuration fragments.
# The contents of these are appended to the image existing configuration
# when user is not specifying custom fragments.
zephyr_file(CONF_FILES ${sysbuild_image_conf_dir} KCONF sysbuild_image_conf_fragment
NAMES ${ZBUILD_APPLICATION}.conf SUFFIX ${FILE_SUFFIX}
)
if (NOT (${ZBUILD_APPLICATION}_OVERLAY_CONFIG OR ${ZBUILD_APPLICATION}_EXTRA_CONF_FILE)
AND EXISTS ${sysbuild_image_conf_fragment}