Running qemu tests on RISC-V

Simon Glass sjg at chromium.org
Tue Feb 8 21:43:16 CET 2022


Hi Alper,

On Tue, 8 Feb 2022 at 11:20, Alper Nebi Yasak <alpernebiyasak at gmail.com> wrote:
>
> On 08/02/2022 20:13, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Tue, 8 Feb 2022 at 08:34, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> >>
> >> On 2/8/22 15:52, Simon Glass wrote:
> >>> Hi Heinrich,
> >>>
> >>> On Tue, 8 Feb 2022 at 01:21, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> >>>> Hello Simon,
> >>>>
> >>>> The qemu-riscv32_spl_defconfig image built inside Docker with
> >>>>
> >>>> wget -O -
> >>>> https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz
> >>>> export
> >>>> OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin
> >>>> tools/buildman/buildman -o build -w -E -W -e --board qemu-riscv32_spl
> >>>>
> >>>> runs flawlessly on Ubuntu Jammy with:
> >>>>
> >>>> qemu-system-riscv32 -nographic -machine virt -bios spl/u-boot-spl \
> >>>>       -device loader,file=u-boot.itb,addr=0x80200000 -smp cpus=4
> >>>>
> >>>> This is a QEMU 6.0
> >>>>
> >>>> Please, provide a reproducible instruction for your problem.
> >>>
> >>> I wonder if the problem is the OPENSBI thing. I am not providing that,
> >>> nor am I seeing a warning about it.
> >>
> >> OpenSBI is needed to emulate unaligned access, access to CSR registers
> >> and so forth. I assume you cannot run qemu-riscv32_spl_defconfig.
> >>
> >> A build warning if CONFIG_SPL_OPENSBI=y and OPENSBI is not defined might
> >> make sense.
> >
> > OK, it seems we need a binman test that we warn on external blobs that
> > are embedded in a FIT.
>
> I tried building qemu-riscv32_spl with buildman on current master from
> Debian unstable (outside the container). I am getting the "missing
> external blobs" binman warning when I don't pass OPENSBI as a make flag.
>
> The qemu-system-riscv32 command above works fine with that OPENSBI
> binary, but not without it. I get garbled output and errors including:
> Illegal instruction, Unhandled exception, Please RESET the board...

Thanks for testing it. I don't see this on

8b139f4e1c0 (HEAD, us/master) Merge tag 'u-boot-imx-20220207' of
https://gitlab.denx.de/u-boot/custodians/u-boot-imx

:

tools/binman/binman   --toolpath ./tools  build -u -d u-boot.dtb -O .
-m --allow-missing --fake-ext-blobs -I . -I
/scratch/sglass/cosarm/src/third_party/u-boot/files -I
/scratch/sglass/cosarm/src/third_party/u-boot/files/board/emulation/qemu-riscv
-I arch/riscv/dts -a of-list="qemu-virt32"  -a atf-bl31-path= -a
opensbi-path= -a default-dt="qemu-virt32" -a scp-path= -a
spl-bss-pad=1 -a tpl-bss-pad=1 -a spl-dtb=y -a tpl-dtb=


Regards,
Simon


More information about the U-Boot mailing list