Hi Simon, On Sat, May 8, 2021 at 11:49 PM Simon Glass <s...@chromium.org> wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 08:15, Bin Meng <bmeng...@gmail.com> wrote: > > > > By utilizing the newly introduced BINMAN_DTB option, along with a > > new dedicated device tree source file for the QEMU virt target used > > for binman only, we can now use binman to generate u-boot.itb. > > > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > > > --- > > > > Changes in v2: > > - new patch: "riscv: qemu: Switch to use binman to generate u-boot.itb" > > > > arch/riscv/cpu/generic/Kconfig | 1 + > > arch/riscv/dts/Makefile | 1 + > > arch/riscv/dts/binman.dtsi | 8 ++++++++ > > arch/riscv/dts/qemu-virt.dts | 8 ++++++++ > > configs/qemu-riscv32_spl_defconfig | 2 ++ > > configs/qemu-riscv64_spl_defconfig | 2 ++ > > 6 files changed, 22 insertions(+) > > create mode 100644 arch/riscv/dts/qemu-virt.dts > > Reviewed-by: Simon Glass <s...@chromium.org> > > Do you think it would be better to have qemu use a completely > different DT? Do 'normal' boards define OF_PRIOR_STAGE?
I am not sure what do you mean by using a completely different DT for QEMU. The device nodes are provided by QEMU and passed to U-Boot, via OF_PRIOR_STAGE. I would not expect "normal" boards to define OF_PRIOR_STAGE, but looks there are still some. A grep in the U-Boot source shows the following boards support OF_PRIOR_STAGE except QEMU riscv: ./configs/bcm7260_defconfig:25:CONFIG_OF_PRIOR_STAGE=y ./configs/bcm7445_defconfig:26:CONFIG_OF_PRIOR_STAGE=y ./configs/ae350_rv64_spl_defconfig:21:CONFIG_OF_PRIOR_STAGE=y ./configs/ae350_rv32_spl_defconfig:20:CONFIG_OF_PRIOR_STAGE=y ./configs/ae350_rv64_defconfig:19:CONFIG_OF_PRIOR_STAGE=y ./configs/ae350_rv32_defconfig:18:CONFIG_OF_PRIOR_STAGE=y config ARCH_BCMSTB bool "Broadcom BCM7XXX family" select CPU_V7A select DM select OF_CONTROL select OF_PRIOR_STAGE imply CMD_DM Regards, Bin