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

Simon Glass sjg at chromium.org
Wed Oct 13 03:01:04 CEST 2021


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.

It also provides a few qemu clean-ups discovered along the way.

This series is based on Ilias' two series for OF_HOSTFILE and
OF_PRIOR_STAGE removal.

It is available at u-boot-dm/ofb-working

[1] https://patchwork.ozlabs.org/project/uboot/patch/20210919215111.3830278-3-sjg@chromium.org/


Simon Glass (16):
  arm: qemu: Mention -nographic in the docs
  arm: qemu: Explain how to extract the generate devicetree
  riscv: qemu: Explain how to extract the generate devicetree
  arm: qemu: Add a devicetree file for qemu_arm
  arm: qemu: Add a devicetree file for qemu_arm64
  riscv: qemu: Add devicetree files for qemu_riscv32/64
  arm: rpi: Add a devicetree file for rpi_4
  arm: vexpress: Add a devicetree file for juno
  arm: xenguest_arm64: Add a fake devicetree file
  arm: octeontx: Add a fake devicetree file
  arm: xilinx_versal_virt: Add a devicetree file
  arm: bcm7xxx: Add a devicetree file
  arm: qemu-ppce500: Add a devicetree file
  arm: highbank: Add a fake devicetree file
  fdt: Make OF_BOARD a bool option
  Drop CONFIG_BINMAN_STANDALONE_FDT

 Makefile                               |    3 +-
 arch/arm/dts/Makefile                  |   20 +-
 arch/arm/dts/bcm2711-rpi-4-b.dts       | 1958 ++++++++++++++++++++++++
 arch/arm/dts/bcm7xxx.dts               |   15 +
 arch/arm/dts/highbank.dts              |   14 +
 arch/arm/dts/juno-r2.dts               | 1038 +++++++++++++
 arch/arm/dts/octeontx.dts              |   14 +
 arch/arm/dts/qemu-arm.dts              |  402 +++++
 arch/arm/dts/qemu-arm64.dts            |  381 +++++
 arch/arm/dts/xenguest-arm64.dts        |   15 +
 arch/arm/dts/xilinx-versal-virt.dts    |  307 ++++
 arch/powerpc/dts/Makefile              |    1 +
 arch/powerpc/dts/qemu-ppce500.dts      |  264 ++++
 arch/riscv/dts/Makefile                |    2 +-
 arch/riscv/dts/qemu-virt.dts           |    8 -
 arch/riscv/dts/qemu-virt32.dts         |  217 +++
 arch/riscv/dts/qemu-virt64.dts         |  217 +++
 configs/bcm7260_defconfig              |    1 +
 configs/bcm7445_defconfig              |    1 +
 configs/highbank_defconfig             |    2 +-
 configs/octeontx2_95xx_defconfig       |    1 +
 configs/octeontx2_96xx_defconfig       |    1 +
 configs/octeontx_81xx_defconfig        |    1 +
 configs/octeontx_83xx_defconfig        |    1 +
 configs/qemu-ppce500_defconfig         |    2 +
 configs/qemu-riscv32_defconfig         |    1 +
 configs/qemu-riscv32_smode_defconfig   |    1 +
 configs/qemu-riscv32_spl_defconfig     |    4 +-
 configs/qemu-riscv64_defconfig         |    1 +
 configs/qemu-riscv64_smode_defconfig   |    1 +
 configs/qemu-riscv64_spl_defconfig     |    3 +-
 configs/qemu_arm64_defconfig           |    1 +
 configs/qemu_arm_defconfig             |    1 +
 configs/rpi_4_32b_defconfig            |    1 +
 configs/rpi_4_defconfig                |    1 +
 configs/rpi_arm64_defconfig            |    1 +
 configs/vexpress_aemv8a_juno_defconfig |    1 +
 configs/xenguest_arm64_defconfig       |    1 +
 configs/xilinx_versal_virt_defconfig   |    1 +
 doc/board/emulation/qemu-arm.rst       |   19 +-
 doc/board/emulation/qemu-riscv.rst     |   12 +
 dts/Kconfig                            |   27 +-
 tools/binman/binman.rst                |   20 -
 43 files changed, 4922 insertions(+), 61 deletions(-)
 create mode 100644 arch/arm/dts/bcm2711-rpi-4-b.dts
 create mode 100644 arch/arm/dts/bcm7xxx.dts
 create mode 100644 arch/arm/dts/highbank.dts
 create mode 100644 arch/arm/dts/juno-r2.dts
 create mode 100644 arch/arm/dts/octeontx.dts
 create mode 100644 arch/arm/dts/qemu-arm.dts
 create mode 100644 arch/arm/dts/qemu-arm64.dts
 create mode 100644 arch/arm/dts/xenguest-arm64.dts
 create mode 100644 arch/arm/dts/xilinx-versal-virt.dts
 create mode 100644 arch/powerpc/dts/qemu-ppce500.dts
 delete mode 100644 arch/riscv/dts/qemu-virt.dts
 create mode 100644 arch/riscv/dts/qemu-virt32.dts
 create mode 100644 arch/riscv/dts/qemu-virt64.dts

-- 
2.33.0.882.g93a45727a2-goog



More information about the U-Boot mailing list