Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages.

From: Vagrant Cascadian <[email-masked]>
Date: Tue, 29 Aug 2023 16:07:27 -0700

On 2023-07-27, Juliana Sims wrote:
> 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.

It could be a lot of work over time to maintain a patched version of
u-boot and/or opensbi, especially if those patches are not going to be
merged upstream at some point...

> The RVVM author claims faster execution than QEMU.

How much faster? Knowing nothing about RVVM, When I asked on
irc.libera.chat #riscv that was basically the question I got...

So if going that route, would want to make sure the performance
difference is significant.

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

If it requires patches, I am a bit concerned about long-term
maintenence... If it does not require patches, that does not seem like a
huge increase, or an alternate build that also ships the fw_payload.bin
file.

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

Worked around how?

live well,
  vagrant