cmake: add new search locations for shield overlay and conf files

* Add support to search for a board specific shield in
  <SHIELD DIR>/boards/<SHIELD>/<BOARD>.{overlay,conf}.  So we can
  support something like:

  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.overlay
  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.conf

Fixes #19078

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-09-11 10:14:25 -05:00 committed by Kumar Gala
commit 2f1cd9bf0a

View file

@ -320,6 +320,15 @@ foreach(root ${BOARD_ROOT})
)
endif()
# search for shield/boards/shield/board.overlay file
if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay)
# add shield/board overlay to the shield overlays list
list(APPEND
shield_dts_files
${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay
)
endif()
# search for shield/shield.conf file
if(EXISTS ${shield_dir}/${s_dir}/${s}.conf)
# add shield.conf to the shield config list
@ -337,6 +346,15 @@ foreach(root ${BOARD_ROOT})
${shield_dir}/${s_dir}/boards/${BOARD}.conf
)
endif()
# search for shield/boards/shield/board.conf file
if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.conf)
# add HW specific board.conf to the shield config list
list(APPEND
shield_conf_files
${shield_dir}/${s_dir}/boards/${s}/${BOARD}.conf
)
endif()
else()
list(APPEND NOT_FOUND_SHIELD_LIST ${s})
endif()