Linux on RISC-V
status update from firmware to distros
Wei Fu <wefu@redhat.com>
RISC-V Ambassador @ RISC-V Foundation
Principal Software Engineer @ Platform Enablement, Red Hat Software (Beijing) Co.,Ltd.
Tue, Jun 20, 2023 @ RISC-V Days Tokyo 2023 Summer

1

AGENDA

2

FedoraFedora on RISC-V

DistroLinux Distros on RISC-V

Status

The software component

Prospect

From IoT to HPC

Part I

Fedoraon RISC-V

3

Fedora on riscv64 History

rpmbuild on RISC-V
by Richard JonesThe 2nd bootstrap
for Fedora 27
as the final preparation

October 15,2016

4The 1st bootstrap

The 3rd bootstrap

for Fedora 25
as the first trial.

for Fedora 28
as the final bootstrap

Join RISC-V
Foundation

For RISC-V build farm

Aug ，
2018

March ，
2018
Jan 29 ,2018

August 10,
2016

Red HatKoji

April 15，
2018

Fedora 37
Fedora29~32

Jul，2019

Graphic Desktop is enabled
on a real RISC-V Hardware

IBM is a Founding memberof Foundation

NowFedora bootstrap for RV32 Now!

Stage4: build systembuilder

basic rootfs with native tools(gcc)
FOR chroot

Stage3: chroot
Mock/chroot

minimal rootfs withnative tools(packages)
for chroot

Native package build

We are building the rpms for minimal rootfs in stage 3

Stage2: packaging tools

source code(from SRPM)

chroot, native build packging tools

Crosstools

The Status of Fedora on RISC-V

FedoraBootable: Yes, OpenSBI + U-Boot/UEFI + GRUB
package management: dnf + rpm
Build system: Koji + Mock
Status: Upgrading Fedora 38
REPO：19950/23118 [86.3%] srpm have been built

Koji system

Openkoji : https://openkoji.iscas.ac.cn/
RISC-V Server Builder
REAL Hardware Soon!
6

The Status of Fedora on RISC-V●Remix Images

Spin: Server/Workstation/Cloud○ WIP Spin: IoT/CoreOS○●

7main package version:○Toolchain(up-to-date for F38)
○gcc-13.1.1-2[DONE]○glibc-2.37.4[DONE]○Binutils 2.39-12[DONE]○ libffi-3.4.4-2(up-to-date)○ java-latest-openjdk-19.0.2.0.7→20 [ONGING]○ perl-5.36.1-497(up-to-date)○ Python 3.11.3-2(up-to-date) → 3.12[building]○ LLVM/Clang 16.0.4-1(up-to-date)○ golang-1.20.4-1(up-to-date)○ rust-1.70.0-1(up-to-date)

The Status of desktop appreciation on RISC-V
Libreoffice 7.5.3.2-2

Thunderbird 102.10.0

firefox-114.0-1

The Status of Server appreciation on RISC-V

Rich Hardware ecosystem

Lichee Pi 4A

SiFive Unmatched PolarFire SoC Icicle Kit

10CanaanKendryte K510

Star64

StarFive VisionFive
V2

Rich Hardware ecosystem: Milk-V Family
Duo [CV1800B]

Pioneer[SG2042]

Mars [JH7110]

M*** [******]

Part IILinux Distros onRISC-V

DebianArch-Linux
Gentoo......

12

Fedora/CentOS stream/RHEL

13

The Status of Linux Distro on RISC-V

Arch-Linux

Bootable: yes, OpenSBI + U-Boot on QEMU and Hardwares
package management: pacman + bsdtar
Build system: Arch Build System(ABS) , but currently using
devtools (systemd-nspawn)
Status: bootable Image

DebianInfo Source:
14

Arch: Felix Yan(晏然), Sequencer(刘玖阳)Debian: https://wiki.debian.org/RISC-V
https://riscv.org/exchange/software/

Bootable: Yes, on QEMU andHardware
package management: apt + deb
Build system: buildd
Status: In maintenance

The Status of Linux Distro on RISC-V

GentooBootable: Yes, OpenSBI + U-Boot on QEMU&hardware
package management: emerge + portage
Build system: portage
Status: bootable Image

openEuler

Bootable: Yes, OpenSBI + U-Boot on
QEMU and Hardwares
package management: dnf + rpm
Build system: OBS, Koji or oepkg
Status: bootable Image
15

Info Source:
Gentoo: https://github.com/dlan17 ， 蓝一勋， 曹野@RIOS
openEuler: openEuler RISC-V SIG， Institute of Software, CAS.

Android on RISC-V
Android Open Source Project（AOSP）
Bootable: Yes, OpenSBI + U-Boot on QEMU and C910
package management: apk
Build system: Android Studio
Status: demo can run on C910
RVI: https://github.com/riscv-android-src
PLCT lab: https://github.com/aosp-riscv
First Patches from Alibaba Cloud Enable
AOSP on RISC-V

Info Source:
16

Android : https://github.com/T-head-Semi/aosp-riscv
https://plctlab.github.io/aosp/create-a-minimal-android-system-for-riscv.html
https://riscv.org/blog/2022/10/first-patches-from-alibaba-cloud-enable-android-open-source-project-on-risc-v-han-mao-and-david-chen-alibaba-could/

Linux software development info for RISC-V

RISC-V East Asia
Biweekly Sync
[中文]RISC-V Open Hours[English]17

Info Source:
https://github.com/cnrv/RISCV-East-Asia-Biweekly-Sync
https://community.riscv.org/risc-v-open-hours/

Part IIIThe softwarecomponent18

The Status of RISC-V Firmware and LinuxOpenSBI
Firmware for RISC-V, upstream main branch,generic platform with the right dtb file.
NO patch required for most of platforms
U-boot
The latest u-boot(upstream, main )with some patches
works fine on RISC-V, can boot some Linux distros.
GRUB2
The GRUB(mainline) without any patch works well on riscv64,
can boot Linux distros.
Linux kernel
The upstream main branch of Linux works well on RISC-V.
We are working with opensource community together on
upstreaming the patches for some platform.
19

Boot flow for Linux on riscv64 [embedded]

M-modeRustSBI
20RISC-V SBI library in Rust, runs
on M or HS mode; good support
for embedded Rust ecosystem.
Info Source:
https://github.com/rustsbi

S-modePart IIII

From IoT to HPC

21

The Status of RISC-V Firmware for PC & Server
UEFI: Unified Extensible Firmware Interface.
Some companies have worked on edk2 based on
HPE’work which incorporates with OpenSBI .
Some real hardware platforms have got edk2 support
since the development stage.

ACPI: Advanced Configuration and Power Interface
Static tables provided by system firmware to the standard
ACPI compliant OS for system info and configuration。
Contributors from Ventana Micro Systems:
Sunil V L
Rahul Pathak
Kumar Sankaran
Mayuresh Chitale
22[PATCH V6 00/21] Add basic ACPI support for RISC-V patchset has
been MERGED into maintainer’s tree since 1 Jun 2023.

The Platfroms have run EDK2 with GRUB on them

And MORE are
under development

23

StarFive VisionFiveV2（JH7110）

The OpenSBI + EDK2 SG2042[Ongoing]

24

The future boot flow for SG2042[EDK2 + GRUB]

25

Acknowledgments
Abner Chang
Gilbert Chen
Al Stone
Andrea BolognaniCharles Wei
DJ Delorie
John Feeney
Mark SalterRichard JonesDavid Abdurachmanov
Alistair Francis
Anup Patel
Atish Kumar Patra

26

Alphabetical Listing by Company Name

Akira Tsukamoto
Drew Fustini
Mikael Frykholm
Stefan O'Rear... and countless other individuals andcompanies, who have contributed to
RISC-V specifications and software
eco-system!

Thank you
Red Hat is the world's leading provider of enterprise
open source software solutions. Award-winning support,

linked in.co m/co mp a ny/r ed ha t
yo u tu b e.co m/u ser /Red H a tV ideo sfa ceb o o k.co m/r ed ha tinc

training, and consulting services makeRed Hat a trusted adviser to the Fortune 500.

27

twitter .co m/Red H a t