0

$USD

$USD
SELECTION GUIDE

Selection Guide of Linux Systems Compatible with RISC-V Architecture

DFRobot Mar 26 2024 3576

Multiple versions of Linux systems are now supported on the RISC-V architecture, offering a wealth of choices for developers. This article will provide a detailed introduction to several versions of Linux systems, including Ubuntu, Debian, Fedora, OpenSuse, FreeBSD, and OpenBSD, and the compatibility with the RISC-V architecture. In addition, we will also list some RISC-V development boards that come pre-installed or support these Linux systems.

Linux systems are now supported on the RISC-V architecture
 
 

The Synergistic Advantages of RISC-V and Linux (Why Run Linux on RISC-V?)

Both Linux operating system and RISC-V architecture are open-source, providing developers with boundless possibilities. They have the freedom to use and modify the operating system and processor, tailoring them to their specific needs. This openness is bolstered by a vibrant community support system, where the Linux and RISC-V developer communities offer abundant documentation, tutorials, and tools, making Linux development on RISC-V more accessible.

Due to the widespread adoption of Linux, numerous applications have already been ported to the Linux platform. Running Linux on RISC-V enables users to access these applications while maintaining device independence. This means that the same software can run on multiple hardware implementations without any modifications required.

 

The Steps to Run Linux on RISC-V:

1. Obtain Hardware or Emulator: Choose to run Linux on RISC-V hardware or use an emulator such as QEMU or Spike.

2. Select a Linux Distribution: Choose a Linux distribution that supports RISC-V, such as Ubuntu, Fedora, OpenSUSE, or Debian.

3. Obtain a Linux Image: Download the Linux image specifically designed for RISC-V from the official website of the chosen Linux distribution.

4. Install Linux: Install the Linux image onto the hardware or emulator, which involves configuring the bootloader, partitioning the disk, and other necessary steps.

5. Configure and Use Linux: Once the installation is complete, configure and use Linux by installing software packages, compiling and running programs, and performing other desired tasks.

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

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

 

Which Linux versions are compatible with RISC-V?

Ubuntu:

Ubuntu is the Linux version that offers the best support and compatibility with RISC-V.

The Ubuntu Linux distribution provides support for RISC-V architecture starting from the 20.04 LTS release. Ubuntu runs on various RISC-V development boards, such as SiFive, and provides pre-installed server images. Moreover, the official Ubuntu website offers multiple versions of pre-installed server images, including Ubuntu 23.10, Ubuntu 23.04, Ubuntu 22.04.3, and Ubuntu 20.04.5.


 

Fedora:

The Fedora/RISC-V project aims to provide a comprehensive Fedora experience and has already established the initial RISC-V build infrastructure.

The development environment of Fedora includes GCC, Perl, Python, git, systemd, and more. However, currently, there is a lack of certain software packages and RISC-V images for Fedora Workstation/Server.

RISC-V Fedora is on Kernel
Figure: RISC-V Fedora is on Kernel

OpenSuse

OpenSUSE supports certain RISC-V hardware and provides Tumbleweed images. However, RISC-V support is still under development, and it is possible to encounter some errors or instability during usage.

RISC-V SBC VisionFive 2 and openSUSE
 RISC-V SBC VisionFive 2 and openSUSE

Debian

Debian provides a port called "riscv64" for the RISC-V architecture and has established the initial RISC-V build infrastructure. The Debian Sid (Unstable) and Debian Experimental suites are available for the riscv64 architecture, but there are still some software packages that cannot be built from source code.

Debian has a longer update cycle, with new versions being released approximately every two years.

Booting RISC-V Debian in LiteX/Rocket on FPGA boards
Booting RISC-V Debian in LiteX/Rocket on FPGA boards

OpenBSD

OpenBSD offers a port named "riscv64" for the RISC-V architecture. OpenBSD/riscv64 extends its support to various hardware platforms, including SiFive HiFive Unmatched, StarFive VisionFive and VisionFive 2, as well as the Microsemi PolarFire SoC Icicle Kit. However, it should be noted that OpenBSD's support for the PolarFire SoC Icicle Kit is not yet comprehensive.

OpenBSD on the HiFive Unmatched
 OpenBSD on the HiFive Unmatched

FreeBSD

FreeBSD also extends its support to the RISC-V architecture and provides a port named "riscv64". FreeBSD/riscv64 encompasses a range of hardware and software platforms, including the Spike simulator, the QEMU simulator, the BeagleV hardware, as well as SiFive's HiFive Unleashed and HiFive Unmatched hardware. It is worth noting that FreeBSD holds the distinction of being the pioneering operating system with bootable support for RISC-V.

 

In which domains can the compatibility of the Linux operating system with RISC-V be applied?

Software development and testing: Software engineers can engage in software development and testing on the RISC-V architecture, encompassing operating systems, drivers, and applications. This ensures the seamless execution of software products across diverse hardware configurations.

Education and research: RISC-V, an open-source instruction set architecture (ISA), finds utility in educational and research endeavors. It facilitates the exploration and study of computer architecture, operating systems, compiler design, and related fields.

Embedded system development: Embedded system designers can harness the flexibility of RISC-V to tailor their solutions to specific application requirements. They can deploy real-time operating systems on RISC-V and engage in the development of Internet of Things (IoT) devices, among other applications.

Hardware development: As RISC-V is open-source, hardware engineers have the freedom to design and manufacture their own RISC-V hardware, such as microprocessors and single-board computers. It provides an accessible entry point at a low cost, enabling them to delve into novel hardware designs.

Cloud computing and data centers: RISC-V holds promise in the realms of cloud computing and data centers, offering enhanced energy efficiency and customization. This, in turn, reduces operational costs and environmental impact.

Open-source hardware projects: RISC-V permits hardware designers to freely modify and share their designs, rendering it an ideal choice for crafting open-source hardware projects.

 

Summary

The openness and flexibility of the RISC-V architecture have ushered in new possibilities for modern computing. From software development to hardware innovation, and even optimization in cloud computing and data centers, Linux versions compatible with RISC-V, such as Ubuntu and Fedora, provide developers and researchers with a robust platform. As the RISC-V ecosystem continues to mature, there will be more Linux operating system versions, such as Debian, OpenBSD, and FreeBSD, that will offer RISC-V users even more stable and comprehensive support.