From 372a4fe5be3e54ef6ca9559b351efaf018e37b5c Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sat, 14 Sep 2019 11:21:14 -0500 Subject: [PATCH] kconfig: support multiple DTS bindings directories Some confluence of recent changes resulted in builds with application-specific bindings being unable to find bindings present in the system directory. Add quotes and splits as necessary to propagate multiple directories through the system. Signed-off-by: Peter A. Bigot --- cmake/kconfig.cmake | 2 +- scripts/kconfig/kconfigfunctions.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/kconfig.cmake b/cmake/kconfig.cmake index 4543c34f5d3..e852eae360b 100644 --- a/cmake/kconfig.cmake +++ b/cmake/kconfig.cmake @@ -40,7 +40,7 @@ set(ENV{CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}) set(ENV{ARCH_DIR} ${ARCH_DIR}) set(ENV{GENERATED_DTS_BOARD_CONF} ${GENERATED_DTS_BOARD_CONF}) set(ENV{DTS_POST_CPP} ${DTS_POST_CPP}) -set(ENV{DTS_ROOT_BINDINGS} ${DTS_ROOT_BINDINGS}) +set(ENV{DTS_ROOT_BINDINGS} "${DTS_ROOT_BINDINGS}") # Allow out-of-tree users to add their own Kconfig python frontend # targets by appending targets to the CMake list diff --git a/scripts/kconfig/kconfigfunctions.py b/scripts/kconfig/kconfigfunctions.py index 399d4f517ff..100c8bcdfea 100644 --- a/scripts/kconfig/kconfigfunctions.py +++ b/scripts/kconfig/kconfigfunctions.py @@ -20,11 +20,11 @@ doc_mode = os.environ.get('KCONFIG_DOC_MODE') == "1" dt_defines = {} if not doc_mode: DTS_POST_CPP = os.environ["DTS_POST_CPP"] - BINDINGS_DIR = os.environ.get("DTS_ROOT_BINDINGS") + BINDINGS_DIRS = os.environ.get("DTS_ROOT_BINDINGS") # if a board port doesn't use DTS than these might not be set - if os.path.isfile(DTS_POST_CPP) and BINDINGS_DIR is not None: - edt = edtlib.EDT(DTS_POST_CPP, [BINDINGS_DIR]) + if os.path.isfile(DTS_POST_CPP) and BINDINGS_DIRS is not None: + edt = edtlib.EDT(DTS_POST_CPP, BINDINGS_DIRS.split(";")) else: edt = None