[PATCH v2 10/11] riscv: qemu: Switch to use binman to generate u-boot.itb

Simon Glass sjg at chromium.org
Sat May 8 19:39:45 CEST 2021


Hi Bin,

On Sat, 8 May 2021 at 09:00, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Sat, May 8, 2021 at 11:49 PM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On Sat, 8 May 2021 at 08:15, Bin Meng <bmeng.cn at 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.cn at 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 <sjg at 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

OK I see. It is very strange, but it seems that U-Boot is somewhere in
the middle of the boot, not at the start, on these devices.

Regards,
Simon


More information about the U-Boot mailing list