All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Tom Rini <trini@konsulko.com>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Mark Kettenis" <mark.kettenis@xs4all.nl>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"François Ozog" <francois.ozog@linaro.org>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"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>,
	"Jerry Van Baren" <vanbaren@cideas.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Oleksandr Andrushchenko" <Oleksandr_Andrushchenko@epam.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Stephen Warren" <swarren@nvidia.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Thomas Fitzsimmons" <fitzsim@fitzsim.org>,
	"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>
Subject: Re: [PATCH v6 00/25] fdt: Make OF_BOARD a boolean option
Date: Fri, 3 Dec 2021 08:39:34 -0700	[thread overview]
Message-ID: <CAPnjgZ2uMr+KKZyg8LPAUdgiKAwLuS_xGK0dtZc1EQViFFcGbQ@mail.gmail.com> (raw)
In-Reply-To: <20211203145531.GI1220664@bill-the-cat>

Hi Tom,

On Fri, 3 Dec 2021 at 07:55, Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Dec 02, 2021 at 08:58:54AM -0700, Simon Glass 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 in another patch in this
> > series: "doc: Add documentation about devicetree usage"
> >
> > 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.
> >
> > Note: If board maintainers are able to add their own patch to add the
> > files, some patches in this series can be dropped.
> >
> > It also provides a few qemu clean-ups discovered along the way. The
> > qemu-riscv64_spl problem is fixed.
>
> Note that I can't run-time test this as the last patch fails to apply
> and is dependent on non-trivial missing changes ("/* The devicetree is
> typically appended to U-Boot */" doesn't exist at all in lib/fdtdec.c
> and that's part of the unchanging context where things fail to apply).

That code is the penultimate patch ("fdt: Drop remaining preprocessor
macros in fdtdec_setup()"). Did that patch apply OK? It is based on
-next and is at dm/ofb-working if you want to compare.

>
> So, here's my first bit of confusion.  Today, I build for rpi_arm64 and
> no dtb files are built.  I run this on my Pi 3 and everything works.
> With your series, I see all the dtbs have been built, and dts/dt.dtb and
> u-boot.dtb have a Pi 4 dtb in them.  Should this even run now?

Yes, so long as OF_BOARD is enabled, which it is in this series. This
is basically the same as the situation with rpi3, except it uses
OF_EMBED (need to fix...)

If we get as far as the std passage stuff then it will print out the
source of the DT when it starts. If you like I could move three
patches into this series:

f88bd6a431a (HEAD -> ofb6) dm: core: Allow getting some basic stats
8121102a004 passage: Report the devicetree source
c9c791ddedf passage: Record where the devicetree came from
5a0b7505498 (dm/ofb-working, dm-public/ofb-working) fdt: Don't call
board_fdt_blob_setup() without OF_BOARD

Booting with rpi3 and rpi4 I get (see the "devicetree:" bit):

U-Boot 2022.01-rc3-00154-gf88bd6a431a (Dec 03 2021 - 08:32:41 -0700)

DRAM:  992 MiB
RPI 3 Model B (0xa02082)
Core:  61 devices, 11 uclasses, devicetree: embed
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT... Unable to read "uboot.env" from
mmc0:1... In:    serial
Out:   vidconsole
Err:   vidconsole


U-Boot 2022.01-rc3-00154-gf88bd6a431a (Dec 03 2021 - 08:33:43 -0700)

DRAM:  3.9 GiB
RPI 4 Model B (0xc03111)
Core:  197 devices, 13 uclasses, devicetree: board
MMC:   mmcnr@7e300000: 1, mmc@7e340000: 0
Loading Environment from FAT... Unable to read "uboot.env" from
mmc0:1... In:    serial
Out:   vidconsole

Regards,
Simon

  reply	other threads:[~2021-12-03 15:39 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 15:58 [PATCH v6 00/25] fdt: Make OF_BOARD a boolean option Simon Glass
2021-12-02 15:58 ` [PATCH v6 01/25] doc: Add documentation about devicetree usage Simon Glass
2021-12-03 12:34   ` Heinrich Schuchardt
2021-12-03 13:09     ` Heinrich Schuchardt
2021-12-03 20:13       ` Simon Glass
2021-12-03 20:28         ` Heinrich Schuchardt
2021-12-04  1:02           ` Simon Glass
2021-12-04 11:06             ` François Ozog
2021-12-04 17:42               ` Simon Glass
2021-12-05  1:14                 ` François Ozog
2021-12-06 15:23                   ` Simon Glass
2021-12-07 22:02                     ` François Ozog
2021-12-02 15:58 ` [PATCH v6 02/25] arm: qemu: Mention -nographic in the docs Simon Glass
2021-12-02 15:58 ` [PATCH v6 03/25] arm: riscv: qemu: Explain how to extract the generated dt Simon Glass
2021-12-02 16:30   ` Heinrich Schuchardt
2021-12-02 16:51     ` Simon Glass
2021-12-02 17:03     ` Tom Rini
2021-12-02 15:58 ` [PATCH v6 04/25] arm: qemu: Add a devicetree file for qemu_arm Simon Glass
2021-12-02 15:58 ` [PATCH v6 05/25] arm: qemu: Add a devicetree file for qemu_arm64 Simon Glass
2021-12-02 15:59 ` [PATCH v6 06/25] riscv: qemu: Add devicetree files for qemu_riscv32/64 Simon Glass
2021-12-02 15:59 ` [PATCH v6 07/25] arm: rpi: Add a devicetree file for rpi_4 Simon Glass
2021-12-02 17:34   ` Mark Kettenis
2021-12-02 18:20     ` François Ozog
2021-12-02 18:25     ` Simon Glass
2021-12-03 12:16       ` Peter Robinson
2021-12-03 20:13         ` Simon Glass
2021-12-02 15:59 ` [PATCH v6 08/25] arm: vexpress: Add a devicetree file for juno Simon Glass
2021-12-02 15:59 ` [PATCH v6 09/25] arm: xenguest_arm64: Add a fake devicetree file Simon Glass
2021-12-02 17:40   ` Oleksandr Andrushchenko
2021-12-02 17:56     ` Tom Rini
2021-12-02 18:05       ` Simon Glass
2021-12-02 18:07         ` Tom Rini
2021-12-02 18:16         ` François Ozog
2021-12-02 18:29           ` Simon Glass
2021-12-02 18:44             ` François Ozog
2021-12-02 19:23               ` Simon Glass
2021-12-03 12:14                 ` Tom Rini
2021-12-03 16:04                   ` Simon Glass
2021-12-03 17:02                     ` François Ozog
2021-12-03 20:14                       ` Simon Glass
2021-12-03 20:21                         ` Tom Rini
2021-12-03 20:27                         ` François Ozog
2021-12-02 17:57     ` Simon Glass
2021-12-03  5:41       ` Oleksandr Andrushchenko
2021-12-03 16:23         ` Simon Glass
2021-12-03 17:02           ` Oleksandr Andrushchenko
2021-12-02 15:59 ` [PATCH v6 10/25] arm: octeontx: " Simon Glass
2021-12-02 15:59 ` [PATCH v6 11/25] arm: xilinx_versal_virt: Add a " Simon Glass
2021-12-02 15:59 ` [PATCH v6 12/25] arm: bcm7xxx: " Simon Glass
2021-12-02 15:59 ` [PATCH v6 13/25] arm: qemu-ppce500: " Simon Glass
2021-12-02 15:59 ` [PATCH v6 14/25] arm: highbank: Add a fake " Simon Glass
2021-12-02 15:59 ` [PATCH v6 15/25] fdt: Make OF_BOARD a bool option Simon Glass
2021-12-02 15:59 ` [PATCH v6 16/25] Drop CONFIG_BINMAN_STANDALONE_FDT Simon Glass
2021-12-02 15:59 ` [PATCH v6 17/25] doc: Update info on devicetree update Simon Glass
2021-12-02 15:59 ` [PATCH v6 18/25] fdt: Move MULTI_DTB_FIT handling out of fdtdec_setup() Simon Glass
2021-12-02 15:59 ` [PATCH v6 19/25] fdt: Drop #ifdefs with MULTI_DTB_FIT Simon Glass
2021-12-02 15:59 ` [PATCH v6 20/25] fdt: Drop CONFIG_SPL_BUILD check in fdtdec_setup() Simon Glass
2021-12-02 15:59 ` [PATCH v6 21/25] fdt: Drop #ifdef around board_fdt_blob_setup() Simon Glass
2021-12-02 15:59 ` [PATCH v6 22/25] fdt: Use if() for fdtcontroladdr check Simon Glass
2021-12-02 15:59 ` [PATCH v6 25/25] fdt: Don't call board_fdt_blob_setup() without OF_BOARD Simon Glass
2021-12-02 16:33 ` [PATCH v6 00/25] fdt: Make OF_BOARD a boolean option François Ozog
2021-12-02 16:38   ` Tom Rini
2021-12-02 16:49     ` Simon Glass
2021-12-02 16:59       ` Tom Rini
2021-12-02 17:07         ` Simon Glass
2021-12-02 18:03           ` Tom Rini
2021-12-02 18:17             ` Simon Glass
2021-12-02 18:34               ` Tom Rini
2021-12-02 19:12                 ` Simon Glass
2021-12-02 22:47                   ` Tom Rini
2021-12-02 23:46                     ` Simon Glass
2021-12-02 22:36                 ` François Ozog
2021-12-02 22:52                   ` Tom Rini
2021-12-02 22:55                     ` Simon Glass
2021-12-03 15:14                       ` Tom Rini
2021-12-03 15:47                         ` Simon Glass
2021-12-03  1:57                 ` Andre Przywara
2021-12-03  2:03                   ` Simon Glass
2021-12-03 20:43                     ` Tom Rini
2021-12-04  1:02                       ` Simon Glass
2021-12-03  1:29               ` Andre Przywara
2021-12-03  1:43                 ` Simon Glass
2021-12-02 17:03     ` Ilias Apalodimas
2021-12-02 17:09       ` Simon Glass
2021-12-03  7:54         ` Ilias Apalodimas
2021-12-02 18:15       ` Mark Kettenis
2021-12-02 18:21         ` Simon Glass
2021-12-02 18:38           ` Tom Rini
2021-12-02 18:47           ` Mark Kettenis
2021-12-02 18:53             ` Simon Glass
2021-12-02 19:22               ` Mark Kettenis
2021-12-02 19:24                 ` Simon Glass
2021-12-02 21:53                   ` Tom Rini
2021-12-02 22:42                     ` Simon Glass
2021-12-02 18:32         ` François Ozog
2021-12-02 19:00           ` Mark Kettenis
2021-12-03  7:50         ` Ilias Apalodimas
2021-12-03 10:27           ` Mark Kettenis
2021-12-03 13:59             ` Heinrich Schuchardt
2021-12-03 14:30               ` Ilias Apalodimas
2021-12-03 14:35                 ` Tom Rini
2021-12-03 15:10                   ` Ilias Apalodimas
2021-12-03  1:19       ` Andre Przywara
2021-12-02 16:39   ` Simon Glass
2021-12-02 16:58     ` Peter Maydell
2021-12-02 16:59     ` François Ozog
2021-12-03  1:10     ` Andre Przywara
2021-12-02 16:47 ` Heinrich Schuchardt
2021-12-02 16:50   ` Simon Glass
2021-12-03 10:03     ` Heinrich Schuchardt
2021-12-06 15:22       ` Simon Glass
2021-12-03 14:55 ` Tom Rini
2021-12-03 15:39   ` Simon Glass [this message]
2021-12-03 15:57     ` Tom Rini
2021-12-03 16:18       ` Simon Glass
2021-12-03 16:30         ` Tom Rini
2021-12-03 16:45           ` Simon Glass
2021-12-03 19:25             ` Tom Rini
2021-12-04  1:01               ` Simon Glass
2021-12-04 13:52                 ` Tom Rini
2021-12-04 15:20                   ` Simon Glass
2021-12-04 15:58                     ` Ilias Apalodimas
2021-12-04 17:25                       ` Simon Glass
2021-12-04 18:46                         ` Ilias Apalodimas
2021-12-04 16:02                     ` Mark Kettenis
2021-12-04 17:25                       ` Simon Glass
2021-12-04 16:55                     ` François Ozog
2021-12-04 17:35                       ` Simon Glass
2021-12-04 18:52                         ` François Ozog
2021-12-05 13:32                           ` Tom Rini
2021-12-04 18:03                     ` Tom Rini
2021-12-04 22:09                       ` Simon Glass
2021-12-05 13:32                         ` Tom Rini
2021-12-06 15:24                           ` Simon Glass
2021-12-06 15:43                             ` Tom Rini
     [not found] ` <20211202155919.2429190-25-sjg@chromium.org>
2021-12-06 18:45   ` [PATCH v6 24/25] fdt: Drop remaining preprocessor macros in fdtdec_setup() Ilias Apalodimas

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=CAPnjgZ2uMr+KKZyg8LPAUdgiKAwLuS_xGK0dtZc1EQViFFcGbQ@mail.gmail.com \
    --to=sjg@chromium.org \
    --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=peter.maydell@linaro.org \
    --cc=seanga2@gmail.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=trini@konsulko.com \
    --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.