cmake: modules: dts: Fix board revision 0 overlay

Fixes an issue whereby a board revision is 0 and the overlay file
exists but would not be included

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2023-11-22 10:12:11 +00:00 committed by Carles Cufí
commit 46889819e6

View file

@ -125,7 +125,7 @@ set(VENDOR_PREFIXES dts/bindings/vendor-prefixes.txt)
set_ifndef(DTS_SOURCE ${BOARD_DIR}/${BOARD}.dts) set_ifndef(DTS_SOURCE ${BOARD_DIR}/${BOARD}.dts)
if(EXISTS ${DTS_SOURCE}) if(EXISTS ${DTS_SOURCE})
# We found a devicetree. Check for a board revision overlay. # We found a devicetree. Check for a board revision overlay.
if(BOARD_REVISION AND EXISTS ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay) if(DEFINED BOARD_REVISION AND EXISTS ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay)
list(APPEND DTS_SOURCE ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay) list(APPEND DTS_SOURCE ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.overlay)
endif() endif()
else() else()