[PATCH 00/16] fdt: Make OF_BOARD a boolean option
trini at konsulko.com
Wed Oct 13 03:34:50 CEST 2021
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 at 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 .
> > 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 659 bytes
Desc: not available
More information about the U-Boot