You can now boot Fedora 25 for RISC-V in Fabrice Bellard’s RISCVEMU RISC-V emulator. Here’s how in four simple steps:
diskimage-linux-riscv64-XXX.tar.gz from Fabrice’s site.
- Download the latest stage 4 disk image for Fedora/RISC-V from here.
- Compile riscvemu. You should just need to do
- Run everything like this:
./riscvemu -b 64 ../diskimage-linux-riscv64-XXX/bbl.bin stage4-disk.img
If you’re going to do serious work inside the disk image then you’ll probably want to customize it with extra packages. See these instructions.
$ virt-builder -l | grep fedora-25
fedora-25 x86_64 Fedora® 25 Server
fedora-25 i686 Fedora® 25 Server (i686)
fedora-25 aarch64 Fedora® 25 Server (aarch64)
fedora-25 armv7l Fedora® 25 Server (armv7l)
fedora-25 ppc64 Fedora® 25 Server (ppc64)
fedora-25 ppc64le Fedora® 25 Server (ppc64le)
$ virt-builder fedora-25
$ qemu-system-x86_64 -machine accel=kvm:tcg \
-cpu host -m 2048 \
Or to try out Fedora on a different architecture:
$ virt-builder fedora-25 --arch ppc64le -o fedora-25-ppc64le.img
$ qemu-system-ppc64 -cpu POWER8 -m 2048 \
I pushed OCaml 4.04.0 to Fedora Rawhide last week. There are loads of new features for OCaml users, but the ones that particularly affect Fedora are:
- New, upstream POWER (ppc64, ppc64le) backend, replacing the downstream one that we have maintained for a few years. I was quite apprehensive about this change because I had tried the new backend during the OCaml 4.03 release cycle and found it to be quite unstable. However the latest version looks rock solid and has no problem compiling the entire Fedora+OCaml software suite.
- New, upstream S/390x backend. I actually found and fixed a bug, go me!
- New, non-upstream RISC-V backend. I found a bug in this backend too, but it proved to be easy to fix. You can now install and run most of the OCaml packages on Fedora/RISC-V.
And talking about Fedora/RISC-V, it took a month, but the mass-rebuild of all Fedora packages completed, and now we’ve got about ⅔rds of all Fedora packages available for RISC-V. That’s quite a lot:
$ du -sh SRPMS/ RPMS/
Ha ha only joking. However when we started out on building Fedora on the free RISC-V architecture, the goal we decided on was to get every package in the Fedora @Core group built.
I’m happy to announce that we have done that. Almost.
There are two mandatory packages that we’re not building, dracut and plymouth. Luckily neither are relevant to RISC-V at the moment since we’re not using an initramfs and there is no graphical boot device.
Another milestone is we have built more than 5,000 Fedora packages. Fedora has about 18,400 packages in total, so that’s a respectable chunk.
Here is what Fedora/RISC-V looks like when it is booting in QEMU:
Props to Stefan O’Rear, David Abdurachmanov for doing most of the real work.
$ ls -l SRPMS | wc -l
The autobuilder is really getting though the package list, having attempted to rebuild nearly 4,000 so far.
Bootstrapping Fedora on the new RISC-V architecture continues apace.
I have now written a small autobuilder which picks up new builds from the Fedora Koji build system and attempts to build them in the clean “stage4” environment.
Getting latest packages from Koji ...
Running: 0 (max: 16) Waiting to start: 7
uboot-tools-2016.09.01-1.fc25.src.rpm | 11 MB 00:10
uboot-tools-2016.09.01-1.fc25 build starting
tuned-2.7.1-2.fc25.src.rpm | 136 kB 00:00
tuned-2.7.1-2.fc25 build starting
rubygem-jgrep-1.4.1-1.fc25.src.rpm | 24 kB 00:00
rubygem-jgrep-1.4.1-1.fc25 build starting
qpid-dispatch-0.6.1-3.fc25.src.rpm | 1.3 MB 00:01
qpid-dispatch-0.6.1-3.fc25 build starting
python-qpid-1.35.0-1.fc25.src.rpm | 235 kB 00:01
python-qpid-1.35.0-1.fc25 build starting
java-1.8.0-openjdk-aarch32-188.8.131.52-4.160812.fc25.src.rpm | 53 MB 00:54
java-1.8.0-openjdk-aarch32-184.108.40.206-4.160812.fc25 build starting
NetworkManager-strongswan-1.4.0-1.fc25.src.rpm | 290 kB 00:00
NetworkManager-strongswan-1.4.0-1.fc25 build starting
MISSING DEPS: NetworkManager-strongswan-1.4.0-1.fc25 (see
... etc ...
Given that we don’t have GCC in the stage4 environment yet, almost all of them currently fail due to missing dependencies, but we’re hoping to correct that soon. In the mean time a few packages that have no C dependencies can actually compile. This way we’ll gradually build up the number of packages for Fedora/RISC-V, and that process will accelerate rapidly once we’ve got GCC.
You can browse the built packages and build logs here: https://fedorapeople.org/groups/risc-v/
For context, see the previous post
I’ve uploaded our latest stage4 to http://oirase.annexia.org/riscv/.
util-linux is still missing, so there’s no mount command and the filesystem comes up read-only.
RPM has been added, but there’s some sort of bug or configuration problem in libdb which means that RPM cannot read its own database (although the RPM database that has been written seems fine and can be read quite happily from an x86_64 machine). Still under investigation …