dt_compatible_check: $(obj)/processed-schema.json
$(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $<
+PHONY += dt_binding_check_one
+dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked
+
PHONY += dt_binding_check
-dt_binding_check: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked $(CHK_DT_EXAMPLES)
+dt_binding_check: dt_binding_check_one $(CHK_DT_EXAMPLES)
make dt_binding_check
+Or to validate a single schema and its example::
+
+ make sram/sram.yaml
+
In order to perform validation of DT source files, use the ``dtbs_check`` target::
make dtbs_check
make dt_binding_check dtbs_check
-It is also possible to run checks with a subset of matching schema files by
-setting the ``DT_SCHEMA_FILES`` variable to 1 or more specific schema files or
-patterns (partial match of a fixed string). Each file or pattern should be
-separated by ':'.
+It is also possible to combine running the above commands with a subset of
+matching schema files by setting the ``DT_SCHEMA_FILES`` variable to 1 or more
+specific schema files or patterns (partial match of a fixed string). Each file
+or pattern should be separated by ':'.
::
dtstree := arch/$(SRCARCH)/boot/dts
endif
+dtbindingtree := Documentation/devicetree/bindings
+
+%.yaml: dtbs_prepare
+ $(Q)$(MAKE) $(build)=$(dtbindingtree) \
+ $(dtbindingtree)/$(patsubst %.yaml,%.example.dtb,$@) dt_binding_check_one
+
ifneq ($(dtstree),)
%.dtb: dtbs_prepare
# dtbs_install depend on it as dtbs_install may run as root.
dtbs_prepare: include/config/kernel.release scripts_dtc
-ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
+ifneq ($(filter dtbs_check %.yaml, $(MAKECMDGOALS)),)
export CHECK_DTBS=y
endif
PHONY += dt_binding_check dt_binding_schemas
dt_binding_check: dt_binding_schemas scripts_dtc
- $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@
+ $(Q)$(MAKE) $(build)=$(dtbindingtree) $@
dt_binding_schemas:
- $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
+ $(Q)$(MAKE) $(build)=$(dtbindingtree)
PHONY += dt_compatible_check
dt_compatible_check: dt_binding_schemas
- $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@
+ $(Q)$(MAKE) $(build)=$(dtbindingtree) $@
# ---------------------------------------------------------------------------
# Modules