All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: "François Ozog" <francois.ozog@linaro.org>,
	"Aaron Williams" <awilliams@marvell.com>,
	"Albert Aribaud" <albert.u.boot@aribaud.net>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Anastasiia Lukianenko" <Anastasiia_Lukianenko@epam.com>,
	"Andre Przywara" <andre.przywara@arm.com>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Jerry Van Baren" <vanbaren@cideas.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Mark Kettenis" <mark.kettenis@xs4all.nl>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Oleksandr Andrushchenko" <Oleksandr_Andrushchenko@epam.com>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Stephen Warren" <swarren@nvidia.com>,
	"Thomas Fitzsimmons" <fitzsim@fitzsim.org>,
	"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v5 00/26] fdt: Make OF_BOARD a boolean option
Date: Wed, 3 Nov 2021 13:21:14 -0400	[thread overview]
Message-ID: <20211103172114.GG24579@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1XF+NCRhaCwC=CY1YurD3=GHTyUNV4q4OsSqGccms-BA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4778 bytes --]

On Wed, Nov 03, 2021 at 10:45:11AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 27 Oct 2021 at 13:25, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Oct 27, 2021 at 12:23:21PM -0600, Simon Glass wrote:
> > > Hi François,
> > >
> > > On Wed, 27 Oct 2021 at 09:14, François Ozog <francois.ozog@linaro.org> wrote:
> > > >
> > > >
> > > >
> > > > On Wed, 27 Oct 2021 at 16:08, Simon Glass <sjg@chromium.org> wrote:
> > > >>
> > > >> Hi François,
> > > >>
> > > >> On Tue, 26 Oct 2021 at 00:07, François Ozog <francois.ozog@linaro.org> wrote:
> > > >> >
> > > >> > Hi Simon
> > > >> >
> > > >> > Position unchanged on this series: adding fake dts for boards that generate their device tree in the dts directory is not good. If you have them in documentation the it is acceptable.
> > > >>
> > > >> I think we are going to have to disagree on this one. I actually used
> > > >> the qemu one in testing/development recently. We have to have a way to
> > > >> develop in-tree with U-Boot. It does not impinge on any of your use
> > > >> cases, so far as I know.
> > > >
> > > > I am not the only one in disagreement... You just saw Alex Bénée from Qemu saying the same thing.
> > > > I understand the advanced debug/development scenario you mention.
> > > > But locating the DT files in the dts directory is mis-leading the contributors to think that they need to compile the DT for the targeted platforms.
> > > > For your advanced scenario, you can still have the dts in the documentation area, or whatever directory (except dts). compile it and supply to U-Boot.
> > >
> > > We have this situation with rpi 1, 2 and 3 and I don't believe anyone
> > > has noticed. U-Boot handles the build automatically. If you turn off
> > > OF_BOARD, it will use the U-Boot devicetree always so you know what is
> > > going on.
> >
> > That we have to have so many separate rpi build targets, and can't just
> > use rpm_arm64 and add rpi_arm32 is not a good feature.  The various rpi
> > configs that use CONFIG_OF_EMBED are on your list of things that need to
> > be cleaned up, yes?
> 
> Yes, it should use CONFIG_OF_SEPARATE. It think it didn't for
> historical reasons, but not sure why.

I think because it wasn't clear enough at the time how to say "just use
the dtb given to us as-is".

> > > We can add a message to U-Boot indicating where the devicetree came
> > > from, perhaps? That might be useful given everything that is going on.
> > >
> > > As in this case, quite often in these discussions I struggle to
> > > understand what is behind the objection. Is it that your customers are
> > > demanding that devicetrees become private, secret data, not included
> > > in open-source projects? Or is it just the strange case of QEMU that
> > > is informing your thinking? I know of at least one project where the
> > > first-stage bootloader produces a devicetree and no one has the source
> > > for it. I believe TF-A was created for licensing reasons...so can you
> > > be a bit clearer about what the problem actually is? If a board is
> > > in-tree in U-Boot I would like it to have a devicetree there, at least
> > > until we have a better option. At the very least, it MUST be
> > > discoverable and it must be possible to undertake U-Boot development
> > > easily without a lot of messing around.
> >
> > What I don't understand here is why or how U-Boot is supposed to become
> > the source of truth for device trees.  The general goal is that the
> > device tree be something that actually comes along on the hardware,
> > because it's stable enough and correct enough that it's not going to be
> > changed from one OS kernel release to the next.  That should be where
> > the correct and true tree comes from, the device itself.
> 
> Is that the confusion here? I am not saying that U-Boot becomes the
> 'source of truth' (horrible term). Where did that idea come from?
> 
> By hardware you mean firmware, I think. If you are developing
> firmware, you need control of the devicetree. It is part of the
> firmware.

I mean the case where U-Boot is provided the device tree to use, by
whatever external and non-U-Boot means.  I keep saying "source of truth"
as a way to clarify that the correct and only required device tree is
given to us at run time.  If U-Boot needs to know something, it's
already provided there.  If it's not there, we don't need to know it.
This is also why there's not a reason to normally build a device tree
in U-Boot since it will not be used.  And if we aren't building it, we
don't need it in the source tree either since it's going to introduce
confusion.  Quoted in part or referenced under doc/ ?  OK, that can make
sense in some cases.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Thomas Fitzsimmons" <fitzsim@fitzsim.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Sean Anderson" <seanga2@gmail.com>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Mark Kettenis" <mark.kettenis@xs4all.nl>,
	"François Ozog" <francois.ozog@linaro.org>,
	"Stephen Warren" <swarren@nvidia.com>,
	"Oleksandr Andrushchenko" <Oleksandr_Andrushchenko@epam.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Jerry Van Baren" <vanbaren@cideas.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Andre Przywara" <andre.przywara@arm.com>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Anastasiia Lukianenko" <Anastasiia_Lukianenko@epam.com>,
	"Albert Aribaud" <albert.u.boot@aribaud.net>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Aaron Williams" <awilliams@marvell.com>,
	"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>,
	"Bin Meng" <bmeng.cn@gmail.com>
Subject: Re: [PATCH v5 00/26] fdt: Make OF_BOARD a boolean option
Date: Wed, 3 Nov 2021 13:21:14 -0400	[thread overview]
Message-ID: <20211103172114.GG24579@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1XF+NCRhaCwC=CY1YurD3=GHTyUNV4q4OsSqGccms-BA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4778 bytes --]

On Wed, Nov 03, 2021 at 10:45:11AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 27 Oct 2021 at 13:25, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Oct 27, 2021 at 12:23:21PM -0600, Simon Glass wrote:
> > > Hi François,
> > >
> > > On Wed, 27 Oct 2021 at 09:14, François Ozog <francois.ozog@linaro.org> wrote:
> > > >
> > > >
> > > >
> > > > On Wed, 27 Oct 2021 at 16:08, Simon Glass <sjg@chromium.org> wrote:
> > > >>
> > > >> Hi François,
> > > >>
> > > >> On Tue, 26 Oct 2021 at 00:07, François Ozog <francois.ozog@linaro.org> wrote:
> > > >> >
> > > >> > Hi Simon
> > > >> >
> > > >> > Position unchanged on this series: adding fake dts for boards that generate their device tree in the dts directory is not good. If you have them in documentation the it is acceptable.
> > > >>
> > > >> I think we are going to have to disagree on this one. I actually used
> > > >> the qemu one in testing/development recently. We have to have a way to
> > > >> develop in-tree with U-Boot. It does not impinge on any of your use
> > > >> cases, so far as I know.
> > > >
> > > > I am not the only one in disagreement... You just saw Alex Bénée from Qemu saying the same thing.
> > > > I understand the advanced debug/development scenario you mention.
> > > > But locating the DT files in the dts directory is mis-leading the contributors to think that they need to compile the DT for the targeted platforms.
> > > > For your advanced scenario, you can still have the dts in the documentation area, or whatever directory (except dts). compile it and supply to U-Boot.
> > >
> > > We have this situation with rpi 1, 2 and 3 and I don't believe anyone
> > > has noticed. U-Boot handles the build automatically. If you turn off
> > > OF_BOARD, it will use the U-Boot devicetree always so you know what is
> > > going on.
> >
> > That we have to have so many separate rpi build targets, and can't just
> > use rpm_arm64 and add rpi_arm32 is not a good feature.  The various rpi
> > configs that use CONFIG_OF_EMBED are on your list of things that need to
> > be cleaned up, yes?
> 
> Yes, it should use CONFIG_OF_SEPARATE. It think it didn't for
> historical reasons, but not sure why.

I think because it wasn't clear enough at the time how to say "just use
the dtb given to us as-is".

> > > We can add a message to U-Boot indicating where the devicetree came
> > > from, perhaps? That might be useful given everything that is going on.
> > >
> > > As in this case, quite often in these discussions I struggle to
> > > understand what is behind the objection. Is it that your customers are
> > > demanding that devicetrees become private, secret data, not included
> > > in open-source projects? Or is it just the strange case of QEMU that
> > > is informing your thinking? I know of at least one project where the
> > > first-stage bootloader produces a devicetree and no one has the source
> > > for it. I believe TF-A was created for licensing reasons...so can you
> > > be a bit clearer about what the problem actually is? If a board is
> > > in-tree in U-Boot I would like it to have a devicetree there, at least
> > > until we have a better option. At the very least, it MUST be
> > > discoverable and it must be possible to undertake U-Boot development
> > > easily without a lot of messing around.
> >
> > What I don't understand here is why or how U-Boot is supposed to become
> > the source of truth for device trees.  The general goal is that the
> > device tree be something that actually comes along on the hardware,
> > because it's stable enough and correct enough that it's not going to be
> > changed from one OS kernel release to the next.  That should be where
> > the correct and true tree comes from, the device itself.
> 
> Is that the confusion here? I am not saying that U-Boot becomes the
> 'source of truth' (horrible term). Where did that idea come from?
> 
> By hardware you mean firmware, I think. If you are developing
> firmware, you need control of the devicetree. It is part of the
> firmware.

I mean the case where U-Boot is provided the device tree to use, by
whatever external and non-U-Boot means.  I keep saying "source of truth"
as a way to clarify that the correct and only required device tree is
given to us at run time.  If U-Boot needs to know something, it's
already provided there.  If it's not there, we don't need to know it.
This is also why there's not a reason to normally build a device tree
in U-Boot since it will not be used.  And if we aren't building it, we
don't need it in the source tree either since it's going to introduce
confusion.  Quoted in part or referenced under doc/ ?  OK, that can make
sense in some cases.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-11-03 17:21 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  0:23 [PATCH v5 00/26] fdt: Make OF_BOARD a boolean option Simon Glass
2021-10-26  0:23 ` Simon Glass
2021-10-26  0:23 ` [PATCH v5 01/26] sandbox: Remove OF_HOSTFILE Simon Glass
2021-10-26  0:23 ` [PATCH v5 02/26] doc: Add documentation about devicetree usage Simon Glass
2021-10-26 14:06   ` Ilias Apalodimas
2021-10-26 15:27     ` Simon Glass
2021-10-27  9:29       ` Ilias Apalodimas
2021-10-26 14:31   ` François Ozog
2021-10-26 15:27     ` Simon Glass
2021-10-26 15:57       ` François Ozog
2021-10-27 14:13         ` Simon Glass
2021-10-27 15:38           ` François Ozog
2021-10-27 18:32             ` Simon Glass
2021-10-27 19:12               ` Ilias Apalodimas
2021-10-27 19:52                 ` Simon Glass
2021-10-29 10:20                   ` Ilias Apalodimas
2021-11-01 15:19                     ` Tom Rini
2021-11-02 14:53                     ` Simon Glass
2021-11-02 15:38                       ` Ilias Apalodimas
2021-11-03  3:29                         ` Simon Glass
2021-10-29 17:07                   ` François Ozog
2021-11-02 14:53                     ` Simon Glass
2021-10-27 19:46               ` François Ozog
2021-10-27 19:48             ` Tom Rini
2021-10-27 20:13               ` François Ozog
2021-10-26  0:23 ` [PATCH v5 03/26] arm: qemu: Mention -nographic in the docs Simon Glass
2021-10-26  0:23   ` Simon Glass
2021-10-26  0:23 ` [PATCH v5 04/26] arm: riscv: qemu: Explain how to extract the generated dt Simon Glass
2021-10-26  0:23   ` Simon Glass
2021-10-26  0:23 ` [PATCH v5 05/26] arm: qemu: Add a devicetree file for qemu_arm Simon Glass
2021-10-26  0:23   ` Simon Glass
2021-10-26  0:23 ` [PATCH v5 06/26] arm: qemu: Add a devicetree file for qemu_arm64 Simon Glass
2021-10-26  0:23   ` Simon Glass
2021-11-01 10:48   ` Peter Maydell
2021-11-01 10:48     ` Peter Maydell
2021-11-01 16:58     ` Simon Glass
2021-11-01 16:58       ` Simon Glass
2021-11-01 17:33       ` François Ozog
2021-11-01 17:33         ` François Ozog
2021-11-01 18:07         ` Tom Rini
2021-11-01 18:07           ` Tom Rini
2021-11-02 15:00           ` Simon Glass
2021-11-02 15:00             ` Simon Glass
2021-11-02 17:28             ` Tom Rini
2021-11-02 17:28               ` Tom Rini
2021-11-03  1:29               ` Simon Glass
2021-11-03  1:29                 ` Simon Glass
2021-11-03  5:29                 ` François Ozog
2021-11-03  5:29                   ` François Ozog
2021-11-03 14:41                   ` Tom Rini
2021-11-03 14:41                     ` Tom Rini
2021-11-04 11:09                     ` Peter Maydell
2021-11-04 11:09                       ` Peter Maydell
2021-11-04 11:22                       ` François Ozog
2021-11-04 11:22                         ` François Ozog
2021-11-04 11:41                         ` Peter Maydell
2021-11-04 11:41                           ` Peter Maydell
2021-11-04 11:48                           ` François Ozog
2021-11-04 11:48                             ` François Ozog
2021-11-03 14:44                   ` François Ozog
2021-11-03 14:44                     ` François Ozog
2021-11-03 14:39                 ` Tom Rini
2021-11-03 14:39                   ` Tom Rini
2021-11-02 14:59         ` Simon Glass
2021-11-02 14:59           ` Simon Glass
2021-11-02 16:57           ` Tom Rini
2021-11-02 16:57             ` Tom Rini
2021-11-03  1:32             ` Simon Glass
2021-11-03  1:32               ` Simon Glass
2021-11-03 14:39               ` Tom Rini
2021-11-03 14:39                 ` Tom Rini
2021-10-26  0:23 ` [PATCH v5 07/26] riscv: qemu: Add devicetree files for qemu_riscv32/64 Simon Glass
2021-10-26  0:23   ` Simon Glass
2021-10-26  0:23 ` [PATCH v5 08/26] arm: rpi: Add a devicetree file for rpi_4 Simon Glass
2021-10-26  0:23 ` [PATCH v5 09/26] arm: vexpress: Add a devicetree file for juno Simon Glass
2021-10-26  0:23 ` [PATCH v5 10/26] arm: xenguest_arm64: Add a fake devicetree file Simon Glass
2021-10-26  0:23 ` [PATCH v5 11/26] arm: octeontx: " Simon Glass
2021-10-26  0:23 ` [PATCH v5 12/26] arm: xilinx_versal_virt: Add a " Simon Glass
2021-10-26  0:23 ` [PATCH v5 13/26] arm: bcm7xxx: " Simon Glass
2021-10-26  0:23 ` [PATCH v5 14/26] arm: qemu-ppce500: " Simon Glass
2021-10-26  0:23 ` [PATCH v5 15/26] arm: highbank: Add a fake " Simon Glass
2021-10-26  0:23 ` [PATCH v5 16/26] fdt: Make OF_BOARD a bool option Simon Glass
2021-10-26  0:23 ` [PATCH v5 17/26] Drop CONFIG_BINMAN_STANDALONE_FDT Simon Glass
2021-10-26  0:23 ` [PATCH v5 18/26] doc: Update info on devicetree update Simon Glass
2021-10-26  0:23 ` [PATCH v5 19/26] fdt: Move MULTI_DTB_FIT handling out of fdtdec_setup() Simon Glass
2021-10-29  5:49   ` Ilias Apalodimas
2021-10-26  0:23 ` [PATCH v5 20/26] fdt: Drop #ifdefs with MULTI_DTB_FIT Simon Glass
2021-10-29  5:55   ` Ilias Apalodimas
2021-10-26  0:23 ` [PATCH v5 21/26] fdt: Drop CONFIG_SPL_BUILD check in fdtdec_setup() Simon Glass
2021-10-26  0:23 ` [PATCH v5 22/26] fdt: Drop #ifdef around board_fdt_blob_setup() Simon Glass
2021-10-26  0:23 ` [PATCH v5 25/26] fdt: Drop remaining preprocessor macros in fdtdec_setup() Simon Glass
2021-10-26  0:23 ` [PATCH v5 26/26] fdt: Don't call board_fdt_blob_setup() without OF_BOARD Simon Glass
2021-10-26 13:55   ` Ilias Apalodimas
2021-10-26 15:27     ` Simon Glass
2021-10-27  7:17       ` Ilias Apalodimas
2021-10-27 19:12         ` Tom Rini
2021-10-27 21:33           ` François Ozog
2021-10-27 21:44             ` Tom Rini
2021-10-26  6:07 ` [PATCH v5 00/26] fdt: Make OF_BOARD a boolean option François Ozog
2021-10-26  6:07   ` François Ozog
2021-10-27 14:08   ` Simon Glass
2021-10-27 14:08     ` Simon Glass
2021-10-27 15:14     ` François Ozog
2021-10-27 15:14       ` François Ozog
2021-10-27 18:23       ` Simon Glass
2021-10-27 18:23         ` Simon Glass
2021-10-27 19:25         ` Tom Rini
2021-10-27 19:25           ` Tom Rini
2021-11-03 16:45           ` Simon Glass
2021-11-03 16:45             ` Simon Glass
2021-11-03 17:21             ` Tom Rini [this message]
2021-11-03 17:21               ` Tom Rini
2021-10-27 20:07         ` François Ozog
2021-10-27 20:07           ` François Ozog
2021-11-03  1:20           ` Simon Glass
2021-11-03  1:20             ` Simon Glass
2021-11-03  4:45             ` François Ozog
2021-11-03  4:45               ` François Ozog
2021-10-27 22:30         ` Mark Kettenis
2021-10-27 22:30           ` Mark Kettenis
2021-11-03  1:20           ` Simon Glass
2021-11-03  1:20             ` Simon Glass
2021-11-03  8:22             ` Mark Kettenis
2021-11-03  8:22               ` Mark Kettenis
2021-11-03 16:02               ` Tom Rini
2021-11-03 16:02                 ` Tom Rini
2021-11-03 16:45                 ` Simon Glass
2021-11-03 16:45                   ` Simon Glass
2021-11-03 17:36                   ` Mark Kettenis
2021-11-03 17:36                     ` Mark Kettenis
2021-11-03 15:56             ` Tom Rini
2021-11-03 15:56               ` Tom Rini
2021-11-03 16:45               ` Simon Glass
2021-11-03 16:45                 ` Simon Glass
2021-10-27 15:36     ` Tuomas Tynkkynen
2021-10-27 15:36       ` Tuomas Tynkkynen
2021-10-27 19:13       ` Tom Rini
2021-10-27 19:13         ` Tom Rini
2021-10-27 18:16     ` Tom Rini
2021-10-27 18:16       ` Tom Rini
2021-10-27 18:24     ` Tom Rini
2021-10-27 18:24       ` Tom Rini
2021-11-03 17:13 ` François Ozog
2021-11-03 17:13   ` François Ozog

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=20211103172114.GG24579@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Anastasiia_Lukianenko@epam.com \
    --cc=Oleksandr_Andrushchenko@epam.com \
    --cc=agraf@csgraf.de \
    --cc=albert.u.boot@aribaud.net \
    --cc=andre.przywara@arm.com \
    --cc=awilliams@marvell.com \
    --cc=bmeng.cn@gmail.com \
    --cc=fitzsim@fitzsim.org \
    --cc=francois.ozog@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=mbrugger@suse.com \
    --cc=michal.simek@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tuomas.tynkkynen@iki.fi \
    --cc=u-boot@lists.denx.de \
    --cc=vanbaren@cideas.com \
    --cc=xypron.glpk@gmx.de \
    /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.