It is useful to be able to recheck dtbs files against a limited set of DT schema files. This can be accomplished by using differnt DT_SCHEMA_FILES argument values while rerunning make dtbs_check. However for some reason if_changed_rule doesn't pick up the rule_dtc changes (and doesn't retrigger the build). Fix this by changing if_changed_rule to if_changed_dep and squashing DTC and dt-validate into a single new command. Then if_changed_dep triggers on DT_SCHEMA_FILES changes and reruns the build/check.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -371,17 +371,15 @@ DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) · 370 unmodified lines | |||
| 371 | DT_BINDING_DIR := Documentation/devicetree/bindings | 371 | DT_BINDING_DIR := Documentation/devicetree/bindings |
| 372 | DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json | 372 | DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json |
| 373 | 373 | ||
| 374 | quiet_cmd_dtb_check = CHECK $@ | 374 | quiet_cmd_dtb = DTC_CHK $@ |
| 375 | cmd_dtb_check = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true | 375 | cmd_dtb = $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true |
| 376 | else | ||
| 377 | quiet_cmd_dtb = $(quiet_cmd_dtc) | ||
| 378 | cmd_dtb = $(cmd_dtc) | ||
| 376 | endif | 379 | endif |
| 377 | 380 | ||
| 378 | define rule_dtc | ||
| 379 | $(call cmd_and_fixdep,dtc) | ||
| 380 | $(call cmd,dtb_check) | ||
| 381 | endef | ||
| 382 | |||
| 383 | $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE | 381 | $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE |
| 384 | $(call if_changed_rule,dtc) | 382 | $(call if_changed_dep,dtb) |
| 385 | 383 | ||
| 386 | $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE | 384 | $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE |
| 387 | $(call if_changed_dep,dtc) | 385 | $(call if_changed_dep,dtc) |