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

Radxa Orion O6 Armv9 mini-ITX motherboard
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
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications