linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v2] kbuild: Enable DT schema checks for %.dtb targets
Date: Wed, 8 Dec 2021 15:31:48 -0600	[thread overview]
Message-ID: <CAL_JsqKqcCD+0ymW_km874A+HMeONBCF5Zgu352mwr-nNjDeqA@mail.gmail.com> (raw)
In-Reply-To: <cc083619-3744-5979-4750-9c26f016505c@alliedtelesis.co.nz>

On Mon, Dec 6, 2021 at 1:34 AM Chris Packham
<Chris.Packham@alliedtelesis.co.nz> wrote:
>
> Hi Rob,
>
> On 14/09/21 2:51 am, Rob Herring wrote:
> > It is possible to build a single dtb, but not with DT schema validation
> > enabled. Enable the schema validation to run for %.dtb and %.dtbo
> > 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.
>
> Just started building 5.16-rc4 and hit the following error
>
> /usr/src/linux/scripts/dtc/Makefile:23: *** dtc needs libyaml for DT
> schema validation support. Install the necessary libyaml development
> package..  Stop.
> make: *** [/usr/src/linux/Makefile:1405: scripts_dtc] Error 2
> make: *** Waiting for unfinished jobs....
>
> I tracked it back to this patch and I gather that the "error" is very
> much intended. Fixing it means I need to get a native libyaml into my
> cross toolchain, which is doable but a bit of a hassle. This probably
> affects other meta build systems like buildroot and yocto.

Yes. I'm going to revert this for now.

Are python dependencies any easier? The libyaml dtc dependency may
actually go away, but dtschema and it's dependencies will remain.

> I think I understand what you're getting at but is it possible to have
> some kind of escape hatch to avoid having to add a build time tool
> dependency (or even bundling libyaml next to scripts/dtc)?

My current thought is to make it a kconfig option. I assume that would
work for you?

> I also notice that when I do supply a toolchain with libyaml the build
> times are impacted by a noticable factor.

How many dtbs are you building?

Rob

  reply	other threads:[~2021-12-08 21:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 14:51 [PATCH v2] kbuild: Enable DT schema checks for %.dtb targets Rob Herring
2021-09-13 15:19 ` Masahiro Yamada
2021-12-06  7:34 ` Chris Packham
2021-12-08 21:31   ` Rob Herring [this message]
2021-12-08 22:37     ` Chris Packham

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_JsqKqcCD+0ymW_km874A+HMeONBCF5Zgu352mwr-nNjDeqA@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=trini@konsulko.com \
    /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 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).