This document discusses porting the Alpine Linux distribution and EVE operating system to RISC-V processors. It provides an overview of RISC-V and describes how Alpine Linux and EVE-OS are well-suited for edge computing workloads due to their small footprint and use of containers. The document then outlines the steps taken to port Alpine Linux and its packages to RISC-V, including getting key packages like libunwind to build and working with the Alpine community. It concludes by encouraging more development of software for the emerging RISC-V server platforms.
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
1. Brought to you by
RISC-V on Edge: Porting EVE
and Alpine Linux to RISC-V
Roman Shaposhnik, CHO and Founder, Zededa
Kathy Giori, Ecosystem Engagement Lead, Zededa
2. Roman Shaposhnik Kathy Giori
CHO and Founder, Zededa QoDP, Zededa
■ Supreme hacking guru
■ Ex-wrestler but still all-around nice guy
■ Intellect and interests well beyond tech
■ Craft brew aficionado
■ End-user advocate
■ EE, so breaks sw :)
■ FOSS zealot
■ Bike, hike, row, ...
4. RISC-V Overview
■ RISC-V is the 5th evolution of the
open RISC architecture that has
been used to teach chip design in
academic (mostly university)
settings for decades
● https://riscv.org/about/history/
■ Industry/universities established
the RISC-V Foundation in 2015 to
collaborate around the RISC-V ISA
specification and extensions
5. RISC-V Potential - New But Growing Quickly!
■ Mostly MCU class chipsets so far, but server class coming in 2022
■ Upstream Linux kernel development can start early on in chip design/devel
■ Niche customizations can optimize for cost, energy efficiency, size, perf, ...
Image source: https://riscv.org/exchange/
7. Bad News: Hardware Monoculture is Tough
■ x86 is still extremely dominant
● Docker Hub tells the real story of how much server-side ARM is out there
■ Outside of x86 and ARM
● OpenPOWER
● MIPS, etc.
■ “Just porting UNIX” aka ”C” is no longer enough
● Java ecosystem
● Golang ecosystem
● Rust ecosystem
● Ruby, Python, Perl, etc.
● And then there are things like LuaJIT!
■ Efforts like Linaro are also not the answer
8. Good News: “Cloud Native” + Specialized OSes
■ We don’t need to wait for Red Hat & Co to give us everything
■ Cloud native
● Everything is a container
● Your infrastructure is immutable
● Container orchestration platform manages the lifecycle
■ Specialized OSes
● CoreOS
● ChromeOS
● AWS, GCP, Azure host OSes
● EVE-OS
■ An OS is no longer a gigantic integration point
● ...and thus we can do everything one container at a time
12. containerd
IoT Edge Compute Hardware
Open
API
Partition A Partition B EVE managed, workload-centric storage
EVE services
EVE Controller
Disk overhead: 500M
RAM overhead: 500M
CPU overhead: 1core
Hypervisor (Xen, KVM, ACRN)
Dom 0 (2021: multiple Dom0s)
Dom 2
Dom
1
EVE Controller
15. EVE-OS Turns Your Edge Nodes Into a Cloud
EVE is an open edge computing engine and open API that
simplifies the development, orchestration, and security of
cloud-native applications on distributed edge hardware.
■ EVE-OS supports containers, VMs, and unikernels
■ Open APIs abstract away complexity and prevent
proprietary vendor lock-in
● Any centralized orchestration controller can take advantage
of the EVE-OS foundation
■ The flexible, open foundation enables edge
deployment IT staff to choose their favorite
hardware, applications, and clouds
EVE
Controller
(EVC)
18. OSes No Longer Needed as Integration Hubs
■ Alpine Linux: Just enough OS for any occasion
■ Immutable infrastructure vs. server state maintenance
● I want my packages to be glorified tarballs, not mine $BTC in their install scripts
● I want my init to get out of the way (let’s face it, I’ll be running kubelet or ... anyway)
20. Good Taste in Core Components: Focus on Small
■ Friends don’t let friends use GNU libc
■ Busybox userland, no-nonsense init system
Ubuntu Desktop
4.5GB
Alpine Linux
140MB
21. Not Obsessed by Cross-Compile, But Still Easily
Bootstrappable
■ RISC-V port was a pleasant surprise
■ No perimeter physical security
■ Awesome selection of entry points, from container rootfs all the way to
no-nonsense hardware bootstrap and iPXE boots
22. How We Leveraged Alpine to Build EVE-OS
■ Alpine packages are to Linux what Maven central is to Java
● It would be nice to keep historic versions around though
23. Alpine Packages are Composed Inside of OCI
Container Images
■ EVE-OS’s unit of integration is an OCI container image
■ Sometimes we rebuild, but thanks to abuild it is super easy
■ Leverages Docker registry for OCI container image management
24. Leveraging Linuxkit and Containerd
■ OCI containers are then composed by linuxkit
● linuxkit is a build tool + collection of software based on Alpine
● EVE-OS’s final image is less than 250MB in size
■ At runtime everything is orchestrated by containerd
● OS is immutable (but malleable), user containers are not
Source: https://containerd.io/
28. Summary: Porting Alpine to RISC-V
■ Got all the packages needed for EVE-OS
■ Have Alpine running on BeagleV Beta (discontinued) and on Nezha
■ Alpine community pitched in and now Edge is available for riscv64
■ alpine:edge docker image now supports riscv64
■ Upstream kernel is still a pain
■ A few packages still require work
■ libunwind & co.
■ Postgres and atomics
30. It is Time to Start Caring About Server RISC-V
■ RISC-V is no longer about qemu: SBCs are available and servers are
coming ‘22
■ RISC-V vs. ARM will be an interesting battle to watch on the server side
■ RISC-V is open and you can make sure the ISA matches your software needs
■ Wholesale porting of the entire open source ecosystem is not going to happen
overnight, but we can leverage next generation OSes like EVE-OS today
■ What will your project to bring to RISC-V?
■ … ScyllaDB?