mbox series

[0/9] riscv: Partially move to binman to generate u-boot.itb

Message ID 20210505141557.23901-1-bmeng.cn@gmail.com
Headers show
Series riscv: Partially move to binman to generate u-boot.itb | expand

Message

Bin Meng May 5, 2021, 2:15 p.m. UTC
This series updates binman to handle creation of u-boot.itb image for
RISC-V SiFive Unleashed board.

QEMU RISC-V remains unchanged, as binman uses a dtb to describe the
image format, but for QEMU RISC-V there is no dtb as dtb is passed
to U-Boot via CONFIG_OF_PRIOR_STAGE.

Not sure how such use case could be properly supported by binman?


Bin Meng (9):
  common: kconfig: Correct a typo in SPL_LOAD_FIT
  binman: Correct '-a' description in the doc
  binman: Correct the comment for ATF entry type
  binman: test: Rename 172_fit_fdt.dts to 170_fit_fdt.dts
  binman: test: Correct the name of 170_fit_fdt_missing_prop.dts
  binman: Add support for RISC-V OpenSBI fw_dynamic blob
  makefile: Update clean rule to remove files generated by binman
  makefile: Pass OpenSBI blob to binman make rules
  riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb

 .gitignore                                    |  4 +-
 Makefile                                      |  6 +-
 arch/riscv/dts/binman.dtsi                    | 70 +++++++++++++++++++
 .../dts/hifive-unleashed-a00-u-boot.dtsi      |  1 +
 board/sifive/unleashed/Kconfig                |  1 +
 common/Kconfig.boot                           |  2 +-
 configs/sifive_unleashed_defconfig            |  1 +
 tools/binman/binman.rst                       |  4 +-
 tools/binman/entries.rst                      | 13 ++++
 tools/binman/etype/atf_bl31.py                |  2 +-
 tools/binman/etype/opensbi.py                 | 23 ++++++
 tools/binman/ftest.py                         | 17 +++--
 .../test/{172_fit_fdt.dts => 170_fit_fdt.dts} |  0
 tools/binman/test/201_opensbi.dts             | 16 +++++
 14 files changed, 148 insertions(+), 12 deletions(-)
 create mode 100644 arch/riscv/dts/binman.dtsi
 create mode 100644 tools/binman/etype/opensbi.py
 rename tools/binman/test/{172_fit_fdt.dts => 170_fit_fdt.dts} (100%)
 create mode 100644 tools/binman/test/201_opensbi.dts

Comments

Simon Glass May 5, 2021, 11:37 p.m. UTC | #1
Hi Bin,

On Wed, 5 May 2021 at 08:16, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> This series updates binman to handle creation of u-boot.itb image for
> RISC-V SiFive Unleashed board.
>
> QEMU RISC-V remains unchanged, as binman uses a dtb to describe the
> image format, but for QEMU RISC-V there is no dtb as dtb is passed
> to U-Boot via CONFIG_OF_PRIOR_STAGE.

That's odd. What software is providing the DTB? Not SPL?

>
> Not sure how such use case could be properly supported by binman?

Perhaps by adding a .dts file in U-Boot, or making it available
manually in some hacky way.

Regards,
Simon
Bin Meng May 6, 2021, 1:42 a.m. UTC | #2
Hi Simon,

On Thu, May 6, 2021 at 7:37 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Bin,
>
> On Wed, 5 May 2021 at 08:16, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > This series updates binman to handle creation of u-boot.itb image for
> > RISC-V SiFive Unleashed board.
> >
> > QEMU RISC-V remains unchanged, as binman uses a dtb to describe the
> > image format, but for QEMU RISC-V there is no dtb as dtb is passed
> > to U-Boot via CONFIG_OF_PRIOR_STAGE.
>
> That's odd. What software is providing the DTB? Not SPL?

QEMU itself creates DTB on the fly, based on command parameters passed
to QEMU. The DTB address will be passed to U-Boot by QEMU.

> >
> > Not sure how such use case could be properly supported by binman?
>
> Perhaps by adding a .dts file in U-Boot, or making it available
> manually in some hacky way.

I will see if I can do some hacky way :( Not sure if it brings any
improvements compared to current CONFIG_SPL_FIT_GENERATOR scripts.

Regards,
Bin
Simon Glass May 6, 2021, 3:08 p.m. UTC | #3
Hi Bin,

On Wed, 5 May 2021 at 19:42, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Thu, May 6, 2021 at 7:37 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On Wed, 5 May 2021 at 08:16, Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > This series updates binman to handle creation of u-boot.itb image for
> > > RISC-V SiFive Unleashed board.
> > >
> > > QEMU RISC-V remains unchanged, as binman uses a dtb to describe the
> > > image format, but for QEMU RISC-V there is no dtb as dtb is passed
> > > to U-Boot via CONFIG_OF_PRIOR_STAGE.
> >
> > That's odd. What software is providing the DTB? Not SPL?
>
> QEMU itself creates DTB on the fly, based on command parameters passed
> to QEMU. The DTB address will be passed to U-Boot by QEMU.

OK. So the canonical DTB is in qemu? Then I think we need at least
something in the U-Boot tree too, as you have done.

>
> > >
> > > Not sure how such use case could be properly supported by binman?
> >
> > Perhaps by adding a .dts file in U-Boot, or making it available
> > manually in some hacky way.
>
> I will see if I can do some hacky way :( Not sure if it brings any
> improvements compared to current CONFIG_SPL_FIT_GENERATOR scripts.

We should drop these scripts and use binman, as your patch does.

Regards,
Simon