Running qemu tests on RISC-V

Alper Nebi Yasak alpernebiyasak at gmail.com
Tue Feb 8 19:19:57 CET 2022


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...


More information about the U-Boot mailing list