Ubuntu 20.04/21.04 64-bit RISC-V released for QEMU, HiFive boards

Let’s a lot of excitement around RISC-V open architecture, but a lot of work still needs to be done to bring the ecosystem to level with Arm or x86 architecture from the silicon to the software. Progress is made step-by-step and one of these steps is Canonical released Ubuntu 64-bit RISC-V (RISCV64) images for some of SiFive HiFive boards, as well as QEMU open-source emulator.

Specifically, Canonical released an Ubuntu 20.04.2 LTS image for HiFive Unleashed & QEMU, and an Ubuntu 21.04 image for HiFive Unleashed, HiFive Unmatched, and QEMU. Note those are only server images, and there’s no desktop image yet like for Ubuntu 21.04 on Raspberry Pi 2/3/4.

Ubuntu RISC-V HiFive QEMUIt’s been possible to run RISC-V Linux in QEMU for at least three years, but when I tried it was a minimal system based on Busybox, so let’s try again with Ubuntu 21.04 following the instructions provided on Discourse.

I have an AMD Ryzen laptop running Ubuntu 20.04, and I opened a terminal window to first install the dependencies.


then downloaded and extracted Ubuntu 21.04 image for HiFive Unmatched:


We can now Ubuntu 21.04 RISCV64 in your machine:


But it abruptly stops:


That’s because the Ubuntu 21.04 Hirsute cannot boot with the version of u-boot-qemu provided in Ubuntu 20.04 at this time, only the version in Ubuntu 21.04 is supported. So let’s try the Ubuntu 20.04 RISC-V image instead:


Good! After a few minutes, we can access the command line using “ubuntu” username and password:


We are indeed in a dual-core 64-bit RISC-V system as I used “smp 2” option in the command line:


We have Ethernet up and running properly:


So I could SSH to my host computer, but I could not SSH to the QEMU session. So I shut down the Ubuntu RISC-V instance, added a tcp redirect to enable SSH on port 2222, and restarted QEMU.


I could login to QEMU over SSH as follows:


So it’s possible to easily transfer files between QEMU and the host in either direction.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
13 Comments
oldest
newest
Sander
Sander
2 years ago

HiFive Unleashed $999
HiFive Unmatched $679

… my hope is on affordable RISC-V mobo’s … around 150 USD … as for that money you can get a quite nice Celeron board ^H^^H^H^H barebone system.

Ignas Kiela
Ignas Kiela
2 years ago

Sadly still way too experimental to get good discounts on large orders. Allwinner D1 might reach that, but it’s still quite expensive for price/perf, and will take a while to mature.

Noloqoq
Noloqoq
2 years ago

There is the Beagleboard too par around 100€, but this is developer/integrators oriented, no GPU for now. The next version should have a GPU. Everything progress very fast in RISC-V world, on embedded world most (if not all) OS are ported several major linux distribution are ported, I’m pretty sure we will see basic and affordable complete RISC-V boards at the end of this year or beginning of next year. Don’t expect the same perfs with the same price, it will still be for people that want to help this architecture to progress faster. More I know it, more I… Read more »

Pete
Pete
2 years ago

If the Intel/SiFive collaboration comes to fruition, we might see motherboards that support either a Celeron or a Risc-V using a common socket.

Theguyuk
Theguyuk
2 years ago

Mad idea :

Retro Console system emulation and gaming has come along way on Arm SBC and Arm TV boxes. Can you emulate a powerful RISC-V system on a Arm SBC, Arm TV box?

Noloqoq
Noloqoq
2 years ago

ISO is generally slow to boot, try to install it on a raw format disk image, I used about the same settings with Debian Bullseye on a 2012 Core i7, with 8GB of ram, and giving 512M~1.5G to VM and 1 or 2 core and boot in less that 1 minute (on ArchLinux with qemu-6.0.0). The debian image is in qcow2 (10× slower) format but can be converted easily with qemu-img. I will try ubuntu, as packages are generally more recent, thanks for the information. i’ve only a very slow ARM board, with very old/slow SD card (I will try… Read more »

Willy
2 years ago

> Also note that I had to type slower in QEMU, or some key presses will be missed…

This is probably not related to emulation speed then, but to support for the virtualized hardware. E.g. some drivers might possibly not implement interrupts correctly and might miss some events, or rely on polling. The number of CPU cycles needed to echo keystrokes is ridiculously low. Just remember that an ESP8266 can easily emulate a PDP11 running BSD 🙂

Darryl
Darryl
2 years ago

Hi, this is incorrect. The default username and password ‘ubuntu’ does not work.

Darryl
Darryl
2 years ago

Got it working via SSH. Strangely, after the mandatory password change, logging in via the serial tty started functioning.

Dingli
Dingli
2 years ago

I try Ubuntu 21.04 image for HiFive Unmatched on Ubuntu 21.04 Intel Laptop with QEMU and it works.

Khadas VIM4 SBC