These patches create specialized U-Boot and OpenSBI packages to use with RVVM by
applying RVVM's author's patches to those projects. Additionally, they build
this patched version of U-Boot into OpenSBI's `fw_payload.bin`, mimicking the
binary release from RVVM.
The RVVM author claims faster execution than QEMU. As such, the ultimate goal of
these packages is to create a system service which will allow developers to
easily run Guix under RVVM for the purpose of development, much like
hurd-vm-service-type provides a way to run Hurd under Guix. However, that's a
larger project, and getting these packaged as they are will already prove
useful. Anyone wishing to use them can simply run:
guix shell --pure rvvm opensbi-rvvm
rvvm /gnu/store/<hash>-opensbi-rvvm-<version>/fw_payload.bin -i <os>.img [...]
I have tested these packages with the FreeBSD-13.2 RV64 raw disk image, so I
know they run successfully.
It's worth noting that opensbi-generic works fine with RVVM. However, it does
not provide `fw_payload.bin` - only `fw_jump.bin` - so this version provides
more flexibility. That said, opensbi-rvvm is 5.3 MB compared to
opensbi-generic's 1.3 MB. Because of that, I'm ambivalent about adding it. I
leave the decision on whether or not to include it entirely up to others;
there's no sense in throwing away work I already did if it may be useful.
It may be worth noting that RVVM also has patches for the Linux kernel. However,
upon inspection they seem to primarily be concerned with decreasing binary size,
which can be worked around if needed. The linux-libre-riscv64-generic package
should work just fine, but this has not been tested.
Juliana Sims (2):
gnu: Add u-boot-rvvm.
gnu: Add opensbi-rvvm.
gnu/packages/bootloaders.scm | 23 +++++++
gnu/packages/firmware.scm | 32 +++++++++
.../patches/opensbi-rvvm-lowram-fdt.patch | 21 ++++++
.../patches/u-boot-rvvm-support.patch | 67 +++++++++++++++++++
4 files changed, 143 insertions(+)
create mode 100644 gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch
create mode 100644 gnu/packages/patches/u-boot-rvvm-support.patch