Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V build enablement #4378

Open
Slackadays opened this issue Jul 31, 2023 · 4 comments
Open

RISC-V build enablement #4378

Slackadays opened this issue Jul 31, 2023 · 4 comments

Comments

@Slackadays
Copy link

RISC-V is a new kind of CPU architecture that's free and open source, as well as pragmatically designed to be easy to learn yet powerful enough to be useful for real world projects. It's already well supported in the Linux kernel as well as most of userspace. With that, I think it's time that Flathub supported automatically building RISC-V packages alongside with amd64 and aarch64.

I'm hoping this issue could become a tracker for RISC-V support in Flathub because there are a few things we need to consider along the way. These include:

  • what hardware will Flathub use?
  • where will the hardware be hosted?
  • does Buildbot need any specific changes?
  • does Flathub need any specific changes?

What does the Flathub team think of this? I'm willing to help out as much as I can with hardware, hosting, and software.

@doraskayo
Copy link

doraskayo commented Jul 31, 2023

Freedesktop SDK essentially supports building its runtimes for RISC-V (specifically riscv64), but lacks hardware to build it. If you're not familiar with it, Freedesktop SDK is the upstream runtime environment in which all of Flathub's apps and runtimes are built and run.

RISC-V is currently built in our x86_64 hardware (which is severely underpowered and overutilized) through emulation using qemu-user-static. It takes almost a week to build our runtimes from scratch for riscv64, compared to a few hours for every other architecture we support. As such, RISC-V can't be made a first-citizen in our CI and must be built manually once every few months. This also means that we don't test changes on RISC-V continuously, and would tag releases even if it fails to build.

In other words, without sufficient and sustainable hardware for CI we likely won't be able to include RISC-V in public releases. With that said, we already have everything other than hardware in place to supply org.freedesktop.{Sdk,Platform} and the rest of our runtimes for RISC-V (at least in theory).

@Slackadays
Copy link
Author

If hardware is actually the only major blocker to RISC-V Flathub support, then that shouldn't actually be too bad. Right now Debian has a fleet of HiFive Unmatched boards which have about the same performance as a VisionFive 2 each, so it would be possible to do the same using those for a much lower cost. Alternatively, I happen to have preordered a Milk-V Pioneer which has 64 cores and 128GB of RAM, a much more formidable option. I'm willing to donate my hardware if that would solve this CI problem.

@nanonyme
Copy link

At this point following parties at minimum need riscv64 builders for it to work at all

  1. freedesktop-sdk (base runtime and extensions)
  2. Flathub (apps, KDE runtime)

Unless gnome also has riscv64 builders, then it's a no-go for any gnome riscv64 apps or runtimes.

@doraskayo
Copy link

doraskayo commented Jul 31, 2023

@Slackadays, I think that Milk-V Pioneer-level hardware should be just about sufficient for Freedesktop SDK's CI needs, and could allow us to support RISC-V binaries as part of our official runtime releases.

However, while support in Freedesktop SDK would be the first major step, it's indeed not enough as @nanonyme mentioned. It would allow any non-GNOME/KDE Flatpak app to be built for RISC-V locally, but it wouldn't be enough to provide CI services for Flathub's hosted apps (through Buildbot). I suspect Buildbot may have even higher hardware requirements if we were planning to build every app on Flathub for RISC-V. @barthalion, do you happen to know what kind of hardware would be required for this?

And yes, the GNOME/KDE runtimes that build upon the Freedesktop SDK runtime may require yet additional hardware to provide their own official releases.

Perhaps RISC-V releases/CI can be made available to apps on an opt-in basis until additional hardware is obtained? Anyway, a decision would need to be taken by the Flathub team if such a direction is acceptable.

Additional infrastructure and website changes may also be required to support RISC-V on the Flathub side, but hopefully nothing too difficult. Again, @barthalion would know best.

CC: @jjardon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants