* [PATCH] kbuild: allow checking single device tree file @ 2021-05-13 15:18 Dmitry Baryshkov 2021-05-19 13:43 ` Rob Herring 0 siblings, 1 reply; 6+ messages in thread From: Dmitry Baryshkov @ 2021-05-13 15:18 UTC (permalink / raw) To: linux-kernel, linux-kbuild Cc: Masahiro Yamada, Michal Marek, Bjorn Andersson, Rob Herring Add support for testing single device tree file by running 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. This looks useful for checking idividual changes to dts files. Cc: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 53d09c414635..b36a3d48eb68 100644 --- a/Makefile +++ b/Makefile @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) %.dtbo: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ +%.dt.yaml: include/config/kernel.release scripts_dtc + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y + PHONY += dtbs dtbs_install dtbs_check dtbs: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) -- 2.30.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: allow checking single device tree file 2021-05-13 15:18 [PATCH] kbuild: allow checking single device tree file Dmitry Baryshkov @ 2021-05-19 13:43 ` Rob Herring 2021-05-22 6:43 ` Masahiro Yamada 2021-06-28 22:06 ` Dmitry Baryshkov 0 siblings, 2 replies; 6+ messages in thread From: Rob Herring @ 2021-05-19 13:43 UTC (permalink / raw) To: Dmitry Baryshkov Cc: linux-kernel, Linux Kbuild mailing list, Masahiro Yamada, Michal Marek, Bjorn Andersson On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > Add support for testing single device tree file by running > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. > This looks useful for checking idividual changes to dts files. typo I'd rather not expose .*.dt.yaml as I want to make checking not optional and I have some plans of integrating the schema checks into dtc which would eliminate .dt.yaml files. Instead, I think %.dtb targets should run the checks always. > > Cc: Rob Herring <robh@kernel.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Makefile b/Makefile > index 53d09c414635..b36a3d48eb68 100644 > --- a/Makefile > +++ b/Makefile > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) > %.dtbo: include/config/kernel.release scripts_dtc > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > +%.dt.yaml: include/config/kernel.release scripts_dtc > + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json I don't think we should expose this detail (processed-schema.json) to the top-level makefile. This will be built if 'dt_binding_check' is a dependency with CHECK_DTBS=y set. > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y CHECK_DTBS here doesn't work. It has to be exported. So here's my modified patch (%.dtbo should probably be included too, but I'm not yet sure how well the schema checks will work on them): 8<--------------------------------------------------------- diff --git a/Makefile b/Makefile index 53d09c414635..a1e246956d65 100644 --- a/Makefile +++ b/Makefile @@ -1377,12 +1377,18 @@ endif ifneq ($(dtstree),) -%.dtb: include/config/kernel.release scripts_dtc +%.dtb: %.dt.yaml $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ %.dtbo: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),) +export CHECK_DTBS=y +endif +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: allow checking single device tree file 2021-05-19 13:43 ` Rob Herring @ 2021-05-22 6:43 ` Masahiro Yamada 2021-05-24 17:07 ` Rob Herring 2021-06-28 22:06 ` Dmitry Baryshkov 1 sibling, 1 reply; 6+ messages in thread From: Masahiro Yamada @ 2021-05-22 6:43 UTC (permalink / raw) To: Rob Herring Cc: Dmitry Baryshkov, linux-kernel, Linux Kbuild mailing list, Michal Marek, Bjorn Andersson On Wed, May 19, 2021 at 10:43 PM Rob Herring <robh@kernel.org> wrote: > > On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov > <dmitry.baryshkov@linaro.org> wrote: > > > > Add support for testing single device tree file by running > > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. > > This looks useful for checking idividual changes to dts files. > > typo > > I'd rather not expose .*.dt.yaml as I want to make checking not > optional and I have some plans of integrating the schema checks into > dtc which would eliminate .dt.yaml files. Instead, I think %.dtb > targets should run the checks always. > > > > > Cc: Rob Herring <robh@kernel.org> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > Makefile | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/Makefile b/Makefile > > index 53d09c414635..b36a3d48eb68 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) > > %.dtbo: include/config/kernel.release scripts_dtc > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > +%.dt.yaml: include/config/kernel.release scripts_dtc > > + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json > > I don't think we should expose this detail (processed-schema.json) to > the top-level makefile. This will be built if 'dt_binding_check' is a > dependency with CHECK_DTBS=y set. > > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y > > CHECK_DTBS here doesn't work. It has to be exported. > > So here's my modified patch (%.dtbo should probably be included too, > but I'm not yet sure how well the schema checks will work on them): > > 8<--------------------------------------------------------- > diff --git a/Makefile b/Makefile > index 53d09c414635..a1e246956d65 100644 > --- a/Makefile > +++ b/Makefile > @@ -1377,12 +1377,18 @@ endif > > ifneq ($(dtstree),) > > -%.dtb: include/config/kernel.release scripts_dtc > +%.dtb: %.dt.yaml > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > %.dtbo: include/config/kernel.release scripts_dtc > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),) > +export CHECK_DTBS=y > +endif > +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > + I do not understand how this will work. 'make foo.dtb' will also create foo.dt.yaml (that is, schema check is always run) ? -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: allow checking single device tree file 2021-05-22 6:43 ` Masahiro Yamada @ 2021-05-24 17:07 ` Rob Herring 2021-05-25 4:28 ` Masahiro Yamada 0 siblings, 1 reply; 6+ messages in thread From: Rob Herring @ 2021-05-24 17:07 UTC (permalink / raw) To: Masahiro Yamada Cc: Dmitry Baryshkov, linux-kernel, Linux Kbuild mailing list, Michal Marek, Bjorn Andersson On Sat, May 22, 2021 at 1:48 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > On Wed, May 19, 2021 at 10:43 PM Rob Herring <robh@kernel.org> wrote: > > > > On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov > > <dmitry.baryshkov@linaro.org> wrote: > > > > > > Add support for testing single device tree file by running > > > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. > > > This looks useful for checking idividual changes to dts files. > > > > typo > > > > I'd rather not expose .*.dt.yaml as I want to make checking not > > optional and I have some plans of integrating the schema checks into > > dtc which would eliminate .dt.yaml files. Instead, I think %.dtb > > targets should run the checks always. > > > > > > > > Cc: Rob Herring <robh@kernel.org> > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > --- > > > Makefile | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/Makefile b/Makefile > > > index 53d09c414635..b36a3d48eb68 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) > > > %.dtbo: include/config/kernel.release scripts_dtc > > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > > > +%.dt.yaml: include/config/kernel.release scripts_dtc > > > + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json > > > > I don't think we should expose this detail (processed-schema.json) to > > the top-level makefile. This will be built if 'dt_binding_check' is a > > dependency with CHECK_DTBS=y set. > > > > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y > > > > CHECK_DTBS here doesn't work. It has to be exported. > > > > So here's my modified patch (%.dtbo should probably be included too, > > but I'm not yet sure how well the schema checks will work on them): > > > > 8<--------------------------------------------------------- > > diff --git a/Makefile b/Makefile > > index 53d09c414635..a1e246956d65 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1377,12 +1377,18 @@ endif > > > > ifneq ($(dtstree),) > > > > -%.dtb: include/config/kernel.release scripts_dtc > > +%.dtb: %.dt.yaml > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > %.dtbo: include/config/kernel.release scripts_dtc > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),) > > +export CHECK_DTBS=y > > +endif > > +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > + > > I do not understand how this will work. > > 'make foo.dtb' will also create foo.dt.yaml > (that is, schema check is always run) ? Yes, that is my intent. As I mentioned above, I have some plans to integrate the schema checks into dtc which would eliminate .dt.yaml files. So I don't really want to add them as a user make target if we might remove it. Also, at some point, running the schema checks shouldn't be optional. We can't do that yet for 'dtbs' as there's a bunch of warnings. But for %.dtb targets, I don't think getting the warnings is a problem. Rob ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: allow checking single device tree file 2021-05-24 17:07 ` Rob Herring @ 2021-05-25 4:28 ` Masahiro Yamada 0 siblings, 0 replies; 6+ messages in thread From: Masahiro Yamada @ 2021-05-25 4:28 UTC (permalink / raw) To: Rob Herring Cc: Dmitry Baryshkov, linux-kernel, Linux Kbuild mailing list, Michal Marek, Bjorn Andersson On Tue, May 25, 2021 at 2:07 AM Rob Herring <robh@kernel.org> wrote: > > On Sat, May 22, 2021 at 1:48 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > On Wed, May 19, 2021 at 10:43 PM Rob Herring <robh@kernel.org> wrote: > > > > > > On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov > > > <dmitry.baryshkov@linaro.org> wrote: > > > > > > > > Add support for testing single device tree file by running > > > > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. > > > > This looks useful for checking idividual changes to dts files. > > > > > > typo > > > > > > I'd rather not expose .*.dt.yaml as I want to make checking not > > > optional and I have some plans of integrating the schema checks into > > > dtc which would eliminate .dt.yaml files. Instead, I think %.dtb > > > targets should run the checks always. > > > > > > > > > > > Cc: Rob Herring <robh@kernel.org> > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > > --- > > > > Makefile | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/Makefile b/Makefile > > > > index 53d09c414635..b36a3d48eb68 100644 > > > > --- a/Makefile > > > > +++ b/Makefile > > > > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) > > > > %.dtbo: include/config/kernel.release scripts_dtc > > > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > > > > > +%.dt.yaml: include/config/kernel.release scripts_dtc > > > > + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json > > > > > > I don't think we should expose this detail (processed-schema.json) to > > > the top-level makefile. This will be built if 'dt_binding_check' is a > > > dependency with CHECK_DTBS=y set. > > > > > > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y > > > > > > CHECK_DTBS here doesn't work. It has to be exported. > > > > > > So here's my modified patch (%.dtbo should probably be included too, > > > but I'm not yet sure how well the schema checks will work on them): > > > > > > 8<--------------------------------------------------------- > > > diff --git a/Makefile b/Makefile > > > index 53d09c414635..a1e246956d65 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -1377,12 +1377,18 @@ endif > > > > > > ifneq ($(dtstree),) > > > > > > -%.dtb: include/config/kernel.release scripts_dtc > > > +%.dtb: %.dt.yaml > > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > > > %.dtbo: include/config/kernel.release scripts_dtc > > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > > > +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),) > > > +export CHECK_DTBS=y > > > +endif > > > +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc > > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > + > > > > I do not understand how this will work. > > > > 'make foo.dtb' will also create foo.dt.yaml > > (that is, schema check is always run) ? > > Yes, that is my intent. As I mentioned above, I have some plans to > integrate the schema checks into dtc which would eliminate .dt.yaml > files. So I don't really want to add them as a user make target if we > might remove it. Also, at some point, running the schema checks > shouldn't be optional. We can't do that yet for 'dtbs' as there's a > bunch of warnings. But for %.dtb targets, I don't think getting the > warnings is a problem. > > Rob OK, your plan is to perform schema-check as a side-effect of dtb compilation. The current dt-schema tool only works against yaml files. Once it is integrated into DTC, will it be able to directly handle .dts files? -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: allow checking single device tree file 2021-05-19 13:43 ` Rob Herring 2021-05-22 6:43 ` Masahiro Yamada @ 2021-06-28 22:06 ` Dmitry Baryshkov 1 sibling, 0 replies; 6+ messages in thread From: Dmitry Baryshkov @ 2021-06-28 22:06 UTC (permalink / raw) To: Rob Herring Cc: linux-kernel, Linux Kbuild mailing list, Masahiro Yamada, Michal Marek, Bjorn Andersson Hi Rob, On Wed, 19 May 2021 at 16:43, Rob Herring <robh@kernel.org> wrote: > > On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov > <dmitry.baryshkov@linaro.org> wrote: > > > > Add support for testing single device tree file by running > > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'. > > This looks useful for checking idividual changes to dts files. > > typo > > I'd rather not expose .*.dt.yaml as I want to make checking not > optional and I have some plans of integrating the schema checks into > dtc which would eliminate .dt.yaml files. Instead, I think %.dtb > targets should run the checks always. > > > > > Cc: Rob Herring <robh@kernel.org> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > Makefile | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/Makefile b/Makefile > > index 53d09c414635..b36a3d48eb68 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),) > > %.dtbo: include/config/kernel.release scripts_dtc > > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > > > +%.dt.yaml: include/config/kernel.release scripts_dtc > > + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json > > I don't think we should expose this detail (processed-schema.json) to > the top-level makefile. This will be built if 'dt_binding_check' is a > dependency with CHECK_DTBS=y set. > > > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y > > CHECK_DTBS here doesn't work. It has to be exported. > > So here's my modified patch (%.dtbo should probably be included too, > but I'm not yet sure how well the schema checks will work on them): Please excuse me for letting this float for some time. Do you plan to submit your patch? Would you like me to do it instead? > 8<--------------------------------------------------------- > diff --git a/Makefile b/Makefile > index 53d09c414635..a1e246956d65 100644 > --- a/Makefile > +++ b/Makefile > @@ -1377,12 +1377,18 @@ endif > > ifneq ($(dtstree),) > > -%.dtb: include/config/kernel.release scripts_dtc > +%.dtb: %.dt.yaml > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > %.dtbo: include/config/kernel.release scripts_dtc > $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > > +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),) > +export CHECK_DTBS=y > +endif > +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > + -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-28 22:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-13 15:18 [PATCH] kbuild: allow checking single device tree file Dmitry Baryshkov 2021-05-19 13:43 ` Rob Herring 2021-05-22 6:43 ` Masahiro Yamada 2021-05-24 17:07 ` Rob Herring 2021-05-25 4:28 ` Masahiro Yamada 2021-06-28 22:06 ` Dmitry Baryshkov
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.