mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
kbuild: Optionally enable schema checks for %.dtb targets
While not documented, schema checks for single dtb targets mostly work already by setting 'CHECK_DTBS=1'. However, the dependencies are not handled and it only works if 'make dt_bindings_check' was run first and generated processed-schema.json. In addition, changing a binding file doesn't cause the schema to be rebuilt and dtb to be revalidated. Making this work turns out to be simple. Whenever CHECK_DTBS is set, make 'dt_binding_check' a 'dtbs_prepare' dependency. I reimplemented here what Masahiro had originally come up with a while back. Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20221220013233.2890335-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
9e699b8985
commit
ec201955a5
9
Makefile
9
Makefile
@ -1481,7 +1481,10 @@ dtbs_prepare: include/config/kernel.release scripts_dtc
|
||||
|
||||
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
|
||||
export CHECK_DTBS=y
|
||||
dtbs: dt_binding_check
|
||||
endif
|
||||
|
||||
ifneq ($(CHECK_DTBS),)
|
||||
dtbs_prepare: dt_binding_check
|
||||
endif
|
||||
|
||||
dtbs_check: dtbs
|
||||
@ -1779,6 +1782,10 @@ help:
|
||||
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||
@echo ' e: warnings are being treated as errors'
|
||||
@echo ' Multiple levels can be combined with W=12 or W=123'
|
||||
@$(if $(dtstree), \
|
||||
echo ' make CHECK_DTBS=1 [targets] Check all generated dtb files against schema'; \
|
||||
echo ' This can be applied both to "dtbs" and to individual "foo.dtb" targets' ; \
|
||||
)
|
||||
@echo ''
|
||||
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
|
||||
@echo 'For further info see the ./README file'
|
||||
|
Loading…
Reference in New Issue
Block a user