On 8/27/24 06:36, Michael Tokarev wrote:
I don't know how the 32bit version is used. I build qemu-system-riscv32
binary, and that one does load opensbi-riscv32-generic-fw_dynamic.bin and
fails if it is not present. But how useful it is, - I don't know.

QEMU for RISC-V needs to have a binary to run. This is by default OpenSBI. But you can specify any binary with the -bios parameter. E.g. you can use the -bios parameter to point to /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.bin or to your bare metal code.

For people using Debian as a development platform for embedded 32bit RISC-V Linux having a 32bit OpenSBI will be necessary.

Building QEMU pulls in released binary versions of OpenSBI from https://github.com/riscv-software-src/opensbi/releases. Upstream security maintenance of the release files does not occur.

As a first step let us add a 32bit OpenSBI to our opensbi package as /usr/lib/riscv32-linux-gnu/opensbi/generic/fw_*. Debian's riscv64-linux-gnu-gcc can build the 32bit OpenSBI when setting PLATFORM_RISCV_XLEN=32.

Best regards

Heinrich

Reply via email to