Skip to content
Risc-V journey thru containers and new projects
Shell Dockerfile Go
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
OpenFaaS Add OpenFaaS sample functions Aug 1, 2019 Add reference to Qemu atomic bug. Jun 3, 2019 Remove examples, move to carlosedp/go-playground Aug 19, 2019 Dockerd is upstream Jul 3, 2019 Add podman pack link Jul 1, 2019

Risc-V bring-up tracker

The objective of this repository is to track the progress and pre-requisites to allow containers and Go applications on Risc-V.

There is a companion article available on

This page is also linked from

If you like this project and others I've been contributing and would like to support me, please check-out my Patreon page!


Risc-V Virtual Machine, pre-built Go and Docker

To make the development easier, there is a Qemu virtual machine based on Debian with developer tools already installed.

The VM pack can be downloaded here. For more information, check the readme.

The prebuilt Go 1.13 tarball can be downloaded here.

To run Go on this VM, download both files and install with:

# Copy the tarball to the VM
scp -P 22222 go-1.13dev-riscv.tar.gz root@localhost:

# In the VM, unpack (in root dir for example)
tar vxf go-1.13dev-riscv.tar.gz

# Link the files
rmdir /usr/local/go
ln -sf /root/riscv-go/ /usr/local/go

# Add to your PATH
export PATH="/usr/local/go/bin:$PATH"

# Addto bashrc
echo "export PATH=/usr/local/go/bin:$PATH" >> ~/.bashrc

To run Docker on your Risc-V environment, get the pack here and use the script.

To test it out after install, just run docker run -d -p 8080:8080 carlosedp/echo-riscv and then curl http://localhost:8080.

There is also a Podman package. Check more info on

Building Go on your Risc-V VM or SBC

Golang is still not upstreamed so to build it from source, you will need a machine to do the initial bootstrap, copy this bootstraped tree to your Risc-V host or VM and then build the complete Go distribution. This bootstrap host can be a Windows, Mac or Linux.

# On bootstrap Host
git clone
cd riscv-go/src
GOOS=linux GOARCH=riscv64 ./bootstrap.bash
# Copy the generated boostrap pack to the VM/SBC
scp -P 22222 ../../go-linux-riscv64-bootstrap.tbz root@localhost: # In case you use the VM provided above

Now on your Risc-V VM/SBC, clone the repository, export the path and bootstrap path you unpacked and build/test:

# On Risc-V Host
tar vxf go-linux-riscv64-bootstrap.tbz
git clone
cd riscv-go
export GOROOT_BOOTSTRAP=$HOME/go-linux-riscv64-bootstrap
export PATH="$(pwd)/misc/riscv:$(pwd)/bin:$PATH"
cd src
GOGC=off ./make.bash                            # Builds go on $HOME/riscv-go/bin that can be added to your path
GOGC=off  GO_TEST_TIMEOUT_SCALE=10 ./run.bash   # Tests the build
# Pack built Golang into a tarball
cd ..
sudo tar -cvf go-1.13dev-riscv.tar --transform s/^riscv-go/go/ --exclude=pkg/obj --exclude .git riscv-go

Now you can use this go build for testing/developing other projects.

Go Dependencies

Core Golang

Go Libraries

External deps

Docker and pre-reqs

To build a complete container environment, check the document.

Libseccomp (

Builds fine with PR 134 even without Kernel support.

Runc (

  • Upstreamed / Works
  • CGO (to build nsenter)
  • Support buildmode=pie
  • Add riscv64 to libcontainer/system/syscall_linux_64.go
  • After upstreaming, update x/sys and x/net modules
  • libseccomp-dev
  • apparmor - ($ sudo aa-status -> apparmor module is not loaded.)
  • Add to CI

Crun (

No changes required, builds fine even without Kernel support for seccomp. Depends on libseccomp.

  • Upstreamed / Works
  • libseccomp
  • Add to CI

Containerd (


Docker cli (

  • Upstreamed / Works
  • Update x/sys and x/net modules in vendor. PR
  • Add to CI

Docker daemon

  • Upstreamed / Works
  • PR - Update dependencies
  • PR - Remove CGO dependency
  • Update x/sys and x/net modules in vendor.
  • Update etcd-io/bbolt in vendor.
  • Update in vendor
  • Update in vendor
  • Update in vendor
  • Update in vendor
  • Add to CI

Dependency lib PRs:

docker-init (

No changes required. Just build and copy tini-static to /usr/local/bin/docker-init

  • Upstreamed / Works


No changes required.

  • Upstreamed / Works

Alternative is run dockerd as: sudo dockerd --userland-proxy=false


Podman - libpod (


Base Container Images

Additional projects / libraries


OpenFaaS is already upstreamed but still does not build images for Risc-V so I've built them and pushed to my DockerHub as links below. Here are the instructions to deploy OpenFaaS on your Risc-V host or VM.

The PRs do not add functionality to cross-build the images for Risc-V yet since the base images still don't support the architecture. Check the script to build the images manually.


Faas-cli (

Faas-swarm (

FaaS (

No changes required.

  • Add to CI

Nats-streaming-server (

Nats-queue-worker (

No changes required.

  • Add to CI

Sample Functions

Bbolt (

Pty (


Build with go build ., run with ETCD_UNSUPPORTED_ARCH=riscv64 ./etcd.


Dependencies for kubelet:

  • Upstreamed / Works
  • x/net
  • x/sys
  • bbolt
  • runc/libcontainers -> CGO
  • cadvisor/accelerators/nvidia -> depends on CGO
  • ???

Prometheus (

Already builds successfully with make build after updating modules.

Promu (

Already builds successfully.

AlertManager (

Already builds successfully with make build.


Repository mirror:

  • Upstreamed / Works
  • Update config.guess and config.sub to newer version. Posted to mailing list.


  • Upstreamed / Works
  • LXC build successfully
  • SQLite config update to build successfully
  • CGO to build storage backends

Go-Jsonnet (

Github Hub tool (

Labstack Echo Framework (

Labstack Gommon (


Inlets (

Gin web framework (

go-isatty (

Dependency for Gin Framework



You can’t perform that action at this time.