qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option


From: François Ozog
Subject: Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option
Date: Wed, 13 Oct 2021 10:02:22 +0200

Hi Simon


Le mer. 13 oct. 2021 à 03:35, Tom Rini <trini@konsulko.com> a écrit :
On Wed, Oct 13, 2021 at 09:29:14AM +0800, Bin Meng wrote:
> Hi Simon,
>
> On Wed, Oct 13, 2021 at 9:01 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so
> > there are only three ways to obtain a devicetree:
> >
> >    - OF_SEPARATE - the normal way, where the devicetree is built and
> >       appended to U-Boot
> >    - OF_EMBED - for development purposes, the devicetree is embedded in
> >       the ELF file (also used for EFI)
> >    - OF_BOARD - the board figures it out on its own
> >
> > The last one is currently set up so that no devicetree is needed at all
> > in the U-Boot tree. Most boards do provide one, but some don't. Some
> > don't even provide instructions on how to boot on the board.
> >
> > The problems with this approach are documented at [1].
> >
> > In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any board
> > can obtain its devicetree at runtime, even it is has a devicetree built
> > in U-Boot. This is because U-Boot may be a second-stage bootloader and its
> > caller may have a better idea about the hardware available in the machine.
> > This is the case with a few QEMU boards, for example.
> >
> > So it makes no sense to have OF_BOARD as a 'choice'. It should be an
> > option, available with either OF_SEPARATE or OF_EMBED.
> >
> > This series makes this change, adding various missing devicetree files
> > (and placeholders) to make the build work.
>
> Adding device trees that are never used sounds like a hack to me.
>
> For QEMU, device tree is dynamically generated on the fly based on
> command line parameters, and the device tree you put in this series
> has various hardcoded <phandle> values which normally do not show up
> in hand-written dts files.
>
> I am not sure I understand the whole point of this.

I am also confused and do not like the idea of adding device trees for
platforms that are capable of and can / do have a device tree to give us
at run time.

--
Tom

+1

While the cleanup go get three options, including OF_BOARD is nice, the build solution you propose does not sound the right approach: U-Boot should be buildable without any DT.

Getting the DT you produced as sample information can be useful and kept out of build path in documentation with ad-hoc warnings though as I explained in other mails of the series.

OF_BOARD is a choice to say “I don’t override the legitimate DT with either OF_SEPARATE or OF_EMBED” (which I see in this case as debug facility for U-Boot maintainer of the platform).

--
François-Frédéric Ozog | Director Business Development
T: +33.67221.6485
francois.ozog@linaro.org | Skype: ffozog


reply via email to

[Prev in Thread] Current Thread [Next in Thread]