All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH] kbuild: allow checking single device tree file
Date: Mon, 24 May 2021 12:07:24 -0500	[thread overview]
Message-ID: <CAL_JsqKutXbKq5k0mVx5aw2iyLdGzhtWpi9Ez2Oc6t9Z4w7mug@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNATPUPxyW2Jaxm5WKdW1wMGsvtbsRryf9=H784wmZ+Xe6g@mail.gmail.com>

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

  reply	other threads:[~2021-05-24 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-05-25  4:28       ` Masahiro Yamada
2021-06-28 22:06   ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL_JsqKutXbKq5k0mVx5aw2iyLdGzhtWpi9Ez2Oc6t9Z4w7mug@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.