linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
	David Gibson <david@gibson.dropbear.id.au>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Frank Rowand <frowand.list@gmail.com>,
	Michal Marek <michal.lkml@markovi.net>,
	DTML <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Bill Mills <bill.mills@linaro.org>,
	tero.kristo@gmail.com
Subject: Re: [RFC 0/2] kbuild: Add support to build overlays (%.dtbo)
Date: Mon, 11 Jan 2021 10:13:24 -0600	[thread overview]
Message-ID: <CAL_Jsq+HiPv1x8B8ZdM2yjFLyiCwzcRR79SVsHCk80asySWp4w@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNASViCOTGR7yDTfh0O+PAu+X-P2NwdY4oPMuXrr51awafA@mail.gmail.com>

+David Gibson

On Mon, Jan 11, 2021 at 9:40 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Mon, Jan 11, 2021 at 8:17 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 07-01-21, 14:28, Masahiro Yamada wrote:
> > > Viresh's patch is not enough.
> > >
> > > We will need to change .gitignore
> > > and scripts/Makefile.dtbinst as well.
> > >
> > > In my understanding, the build rule is completely the same
> > > between .dtb and .dtbo
> > > As Rob mentioned, I am not sure if we really need/want
> > > a separate extension.
> > >
> > > A counter approach is to use an extension like '.ovl.dtb'
> > > It clarifies it is an overlay fragment without changing
> > > anything in our build system or the upstream DTC project.
> >
> > By the time you gave feedback, I have already sent the dtbo change for
> > DTC to the device-tree-compiler list (based on Rob's suggestion).
> >
> > And it got merged today by David:
> >
> > https://github.com/dgibson/dtc/commit/163f0469bf2ed8b2fe5aa15bc796b93c70243ddc
> >
> > Can we please finalize what we need to do with naming here and be done
> > with it, so I can rework my patches and get going ?
> >
> > Thanks.
> >
> > --
> > viresh
>
>
>
> It is unfortunate to see such a patch merged
> before getting agreement about how it should work
> as a whole.

Given the feedback that dtbo is already a standard, I'd suggest we
just stick with dts->dtbo.

> >+# enable creation of __symbols__ node
> >+ifneq ($(dtbo-y),)
> >+DTC_FLAGS += -@
> >+endif
>
> I am not convinced with this code.
>
> A single user of the dtbo-y syntax gives -@ to all
> device trees in the same directory.
>
> This is not a solution since Rob already stated -@ should be
> given per board (or per platform, at least).

Agreed.

> I still do not understand why adding the new syntax dtbo-y
> is helpful.

I think we should stick with 'dtb-y' here.


> Have we already decided to use separate ".dtb" and ".dtbo" for blobs?
>
> Will we use ".dts" for all source files?
> Or, will we use ".dtso" for overlay source files?
>
> How should the build system determine the targets
> that should have -@ option?

The way it does already. Either:

DTC_FLAGS += -@

in a directory of dts files. Or on a per file basis like:

DTC_FLAGS_foo_base += -@

> For consistency, will we need a patch like follows?
>
>
> diff --git a/dtc.c b/dtc.c
> index bdb3f59..474401e 100644
> --- a/dtc.c
> +++ b/dtc.c
> @@ -120,6 +120,8 @@ static const char *guess_type_by_name(const char
> *fname, const char *fallback)
>                 return fallback;
>         if (!strcasecmp(s, ".dts"))
>                 return "dts";
> +       if (!strcasecmp(s, ".dtso"))
> +               return "dts";
>         if (!strcasecmp(s, ".yaml"))
>                 return "yaml";
>         if (!strcasecmp(s, ".dtb"))
> @@ -349,6 +351,8 @@ int main(int argc, char *argv[])
>
>         if (streq(outform, "dts")) {
>                 dt_to_source(outf, dti);
> +       else if (streq(outform, "dtso")) {
> +               dt_to_source(outf, dti);
>  #ifndef NO_YAML
>         } else if (streq(outform, "yaml")) {
>                 if (!streq(inform, "dts"))
>
>
>
> Overall solution looks unclear to me.
>
>
> Again, it is unfortunate that we did not take enough time
> (in spite of the RFC prefix) before proceeding.

I should have added David here from the start. Honestly, I expected
some discussion there.

Rob

  reply	other threads:[~2021-01-11 16:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 11:24 [RFC 0/2] kbuild: Add support to build overlays (%.dtbo) Viresh Kumar
2021-01-05 11:24 ` [RFC 1/2] " Viresh Kumar
2021-01-05 11:24 ` [RFC 2/2] scripts: dtc: Handle outform dtbo Viresh Kumar
2021-01-05 15:37   ` Rob Herring
2021-01-12  0:18     ` Frank Rowand
2021-01-05 15:21 ` [RFC 0/2] kbuild: Add support to build overlays (%.dtbo) Rob Herring
2021-01-06 10:09   ` [PATCH] scripts: dtc: Start building fdtoverlay and fdtdump Viresh Kumar
2021-01-06 12:24     ` kernel test robot
2021-01-06 15:52     ` Rob Herring
2021-01-07  5:28   ` [RFC 0/2] kbuild: Add support to build overlays (%.dtbo) Masahiro Yamada
2021-01-07  7:27     ` Viresh Kumar
2021-01-07 19:02     ` Rob Herring
2021-01-07 19:42       ` Bill Mills
2021-01-11 17:26       ` Masahiro Yamada
2021-01-11 11:17     ` Viresh Kumar
2021-01-11 15:40       ` Masahiro Yamada
2021-01-11 16:13         ` Rob Herring [this message]
2021-01-11 17:02           ` Masahiro Yamada
2021-01-12  9:41             ` Viresh Kumar
2021-01-12  0:25   ` Frank Rowand

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_Jsq+HiPv1x8B8ZdM2yjFLyiCwzcRR79SVsHCk80asySWp4w@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bill.mills@linaro.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=olof@lixom.net \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=tero.kristo@gmail.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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).