linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: Enable DT schema checks for %.dtb targets
@ 2021-09-03 15:52 Rob Herring
  2021-09-09 12:55 ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2021-09-03 15:52 UTC (permalink / raw)
  To: devicetree; +Cc: Dmitry Baryshkov, Tom Rini, Masahiro Yamada, linux-kbuild

It is possible to build a single dtb, but not with DT schema validation
enabled. Enable the schema validation to run for %.dtb targets. Anyone
building a dtb for a specific platform *should* pay attention to schema
warnings.

This could be supported with a separate %.dt.yaml target instead.
However, the .dt.yaml format is considered an intermediate format and
could possibly go away at some point if schema checking is integrated
into dtc. Also, the plan is to enable the schema checks by default once
platforms are free of warnings, and this is a move in that direction.

Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index ec9e8a0fe298..01b888cfe1dc 100644
--- a/Makefile
+++ b/Makefile
@@ -1399,8 +1399,8 @@ endif
 
 ifneq ($(dtstree),)
 
-%.dtb: include/config/kernel.release scripts_dtc
-	$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
+%.dtb: dt_binding_check include/config/kernel.release scripts_dtc
+	$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
 
 %.dtbo: include/config/kernel.release scripts_dtc
 	$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
@@ -1409,7 +1409,7 @@ PHONY += dtbs dtbs_install dtbs_check
 dtbs: include/config/kernel.release scripts_dtc
 	$(Q)$(MAKE) $(build)=$(dtstree)
 
-ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
+ifneq ($(filter dtbs_check %.dtb, $(MAKECMDGOALS)),)
 export CHECK_DTBS=y
 dtbs: dt_binding_check
 endif
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: Enable DT schema checks for %.dtb targets
  2021-09-03 15:52 [PATCH] kbuild: Enable DT schema checks for %.dtb targets Rob Herring
@ 2021-09-09 12:55 ` Masahiro Yamada
  2021-09-09 16:22   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2021-09-09 12:55 UTC (permalink / raw)
  To: Rob Herring; +Cc: DTML, Dmitry Baryshkov, Tom Rini, Linux Kbuild mailing list

On Sat, Sep 4, 2021 at 12:52 AM Rob Herring <robh@kernel.org> wrote:
>
> It is possible to build a single dtb, but not with DT schema validation
> enabled. Enable the schema validation to run for %.dtb targets. Anyone
> building a dtb for a specific platform *should* pay attention to schema
> warnings.
>
> This could be supported with a separate %.dt.yaml target instead.
> However, the .dt.yaml format is considered an intermediate format and
> could possibly go away at some point if schema checking is integrated
> into dtc. Also, the plan is to enable the schema checks by default once
> platforms are free of warnings, and this is a move in that direction.
>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: linux-kbuild@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index ec9e8a0fe298..01b888cfe1dc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1399,8 +1399,8 @@ endif
>
>  ifneq ($(dtstree),)
>
> -%.dtb: include/config/kernel.release scripts_dtc
> -       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> +%.dtb: dt_binding_check include/config/kernel.release scripts_dtc
> +       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
>
>  %.dtbo: include/config/kernel.release scripts_dtc
>         $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@


Why didn't you change the %.dtbo part?




> @@ -1409,7 +1409,7 @@ PHONY += dtbs dtbs_install dtbs_check
>  dtbs: include/config/kernel.release scripts_dtc
>         $(Q)$(MAKE) $(build)=$(dtstree)
>
> -ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
> +ifneq ($(filter dtbs_check %.dtb, $(MAKECMDGOALS)),)
>  export CHECK_DTBS=y
>  dtbs: dt_binding_check
>  endif
> --
> 2.30.2
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: Enable DT schema checks for %.dtb targets
  2021-09-09 12:55 ` Masahiro Yamada
@ 2021-09-09 16:22   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2021-09-09 16:22 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: DTML, Dmitry Baryshkov, Tom Rini, Linux Kbuild mailing list

On Thu, Sep 9, 2021 at 8:05 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sat, Sep 4, 2021 at 12:52 AM Rob Herring <robh@kernel.org> wrote:
> >
> > It is possible to build a single dtb, but not with DT schema validation
> > enabled. Enable the schema validation to run for %.dtb targets. Anyone
> > building a dtb for a specific platform *should* pay attention to schema
> > warnings.
> >
> > This could be supported with a separate %.dt.yaml target instead.
> > However, the .dt.yaml format is considered an intermediate format and
> > could possibly go away at some point if schema checking is integrated
> > into dtc. Also, the plan is to enable the schema checks by default once
> > platforms are free of warnings, and this is a move in that direction.
> >
> > Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: linux-kbuild@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  Makefile | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index ec9e8a0fe298..01b888cfe1dc 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1399,8 +1399,8 @@ endif
> >
> >  ifneq ($(dtstree),)
> >
> > -%.dtb: include/config/kernel.release scripts_dtc
> > -       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> > +%.dtb: dt_binding_check include/config/kernel.release scripts_dtc
> > +       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
> >
> >  %.dtbo: include/config/kernel.release scripts_dtc
> >         $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
>
>
> Why didn't you change the %.dtbo part?

Right, it should.

Rob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-09 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 15:52 [PATCH] kbuild: Enable DT schema checks for %.dtb targets Rob Herring
2021-09-09 12:55 ` Masahiro Yamada
2021-09-09 16:22   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).