[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221101220304.65715-1-nfraprado@collabora.com>
Date: Tue, 1 Nov 2022 18:03:03 -0400
From: Nícolas F. R. A. Prado
<nfraprado@...labora.com>
To: Rob Herring <robh@...nel.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, kernel@...labora.com,
Nícolas F. R. A. Prado
<nfraprado@...labora.com>, Masahiro Yamada <masahiroy@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-arm-kernel@...ts.infradead.org, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: [PATCH] kbuild: Add DTB_FILES variable for dtbs_check
Currently running dtbs_check compiles and runs the DT checker on all
enabled devicetrees against all dt-bindings. This can take a long time,
and is an unnecessary burden when just validating a new devicetree or
changes in an existing one, with the dt-bindings unchanged.
Similarly to DT_SCHEMA_FILES for dt_binding_check, add a DTB_FILES
variable that can be passed to the dtbs_check make command to restrict
which devicetrees are validated.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
Usage example:
make dtbs_check DTB_FILES='arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dtb arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dtb'
scripts/Makefile.lib | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ec391c6a2641..f3ac6d3632a2 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -418,9 +418,16 @@ DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m)
DT_BINDING_DIR := Documentation/devicetree/bindings
DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
+ifeq ($(DTB_FILES),)
quiet_cmd_dtb = DTC_CHK $@
cmd_dtb = $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true
else
+SHOULD_CHECK_DTB = $(filter $@,$(DTB_FILES))
+
+quiet_cmd_dtb = $(if $(SHOULD_CHECK_DTB),DTC_CHK,DTC) $@
+ cmd_dtb = $(if $(SHOULD_CHECK_DTB), $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true , $(cmd_dtc))
+endif
+else
quiet_cmd_dtb = $(quiet_cmd_dtc)
cmd_dtb = $(cmd_dtc)
endif
--
2.38.1
Powered by blists - more mailing lists