From: Rob Herring <robh@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Tom Rini <trini@konsulko.com>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v3] kbuild: Enable DT schema checks for %.dtb targets
Date: Fri, 15 Jul 2022 17:01:57 -0600 [thread overview]
Message-ID: <CAL_JsqLi31FPBdYPzEW__UmfMTur-0428okopFYVaCbwm045gg@mail.gmail.com> (raw)
In-Reply-To: <20220623144357.297252-1-dmitry.baryshkov@linaro.org>
On Thu, Jun 23, 2022 at 8:44 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.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 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.
>
> This patch differs from the previous one ([1]) in the fact that it
> requires specifying VALIDATE_DT=1 to run the checks while doing the
> build. Thus default build procedures would not obtain additional build
> dependency, while maintainers can still build a single DTB file an get
> only corresponding warnings.
I'd rather this be a kconfig option, so that eventually 'make
allmodconfig; make dtbs' also runs the schema checks. If something can
be enabled for allmodconfig, then builders will automatically start
testing it. Though the extra dependency is a problem here.
>
> [1] https://lore.kernel.org/all/20210913145146.766080-1-robh@kernel.org/
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: linux-kbuild@vger.kernel.org
> Co-developed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Makefile | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c43d825a3c4c..0942922384c4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1365,11 +1365,17 @@ endif
>
> ifneq ($(dtstree),)
>
> -%.dtb: include/config/kernel.release scripts_dtc
> - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> +ifneq ($(VALIDATE_DT),)
> +DT_YAML = $(dtstree)/$*.dt.yaml
.dt.yaml files are deprecated now. This probably doesn't do anything.
> +DT_CHECK = dt_binding_check
> +export CHECK_DTBS=y
> +endif
>
> -%.dtbo: include/config/kernel.release scripts_dtc
> - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> +%.dtb: include/config/kernel.release scripts_dtc $(DT_CHECK)
> + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(DT_YAML)
> +
> +%.dtbo: include/config/kernel.release scripts_dtc $(DT_CHECK)
> + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(DT_YAML)
>
> PHONY += dtbs dtbs_install dtbs_check
> dtbs: include/config/kernel.release scripts_dtc
> @@ -1654,6 +1660,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 VALIDATE_DT=y [targets] Validate all DT processsed during the build'; \
Typo.
> + 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'
> --
> 2.35.1
>
next prev parent reply other threads:[~2022-07-15 23:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 14:43 [PATCH v3] kbuild: Enable DT schema checks for %.dtb targets Dmitry Baryshkov
2022-07-14 20:17 ` Marijn Suijten
2022-07-15 23:01 ` Rob Herring [this message]
2022-07-16 8:12 ` Masahiro Yamada
2022-07-16 9:48 ` Masahiro Yamada
2022-08-04 16:34 ` Rob Herring
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_JsqLi31FPBdYPzEW__UmfMTur-0428okopFYVaCbwm045gg@mail.gmail.com \
--to=robh@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--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).