From: Tom Rini Date: Fri, 24 Dec 2021 14:31:35 +0000 (-0500) Subject: Merge branch '2021-12-23-make-OF_BOARD-a-boolean' into next X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=bc0abd80b3c2d395a0245d4e1ce4f8f445f79cde;p=u-boot.git Merge branch '2021-12-23-make-OF_BOARD-a-boolean' into next Merge v8 of Simon's series to make CONFIG_OF_BOARD a boolean option. Quoting him: 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 were covered in another patch[1], since removed from this series. 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 would allow rpi3, for example, to run with the devicetree provided by the prior bootloader. This series makes this change, adding various missing devicetree files (and placeholders) to make the build work. To make the 'prior stage' side of things more deterministic, a new OF_HAS_PRIOR_STAGE is added, which cannot be disabled by updated a board's defconfig. This should help to prevent mistakes. It also adds a run-time message showing where the devicetree came from, as well as warnings if the board's expected flow is not being used. This comes originally from the 'standard passage' series, which depends on this series. It also provides a few qemu clean-ups discovered along the way. The qemu-riscv64_spl problem is fixed. Please see [2] for discussion on the v6 series. I put Heinrich's Tested-by tag[3] for the series onto the three devicetree patches (ARM and RISC-V) that I think it most affects. It isn't possible to apply a tag to a whole series at present and in any case there are changes in v7. This series is available at u-boot-dm/ofb-working [1] https://patchwork.ozlabs.org/project/uboot/patch/20211207001209.3467163-2-sjg@chromium.org/ [2] https://lore.kernel.org/u-boot/20211205133207.GW1220664@bill-the-cat/T/#mcd8c0258827fbc1bb3000b7ff9ba0929df1ddcb2 [3] https://lore.kernel.org/u-boot/93913911-4d20-d28f-ee04-739985184c5e@canonical.com/raw --- bc0abd80b3c2d395a0245d4e1ce4f8f445f79cde