Skip to content
Risc-V journey thru containers and new projects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
echo-sample
Qemu-VM.md
Readme.md
build-env.md

Readme.md

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.

Virtual machine and pre-built Docker

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

The pack can be downloaded here and there is a readme for it.

If you want to run Docker on your Risc-V environment, get the pack here and use the install.sh script.

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

Building Go on your Risc-V VM or SBC

First checkout and bootstrap Go Risc-V tree into a host that has Go installed (could be Mac, Linux):

git clone https://github.com/4a6f656c/riscv-go
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:

tar vxf go-linux-riscv64-bootstrap.tbz
git clone https://github.com/4a6f656c/riscv-go
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

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


Main dependencies

Pending upstream

PR submitted

Already upstreamed


Docker containers and pre-reqs

To build a complete container environment, check the build-env.md document.

Libseccomp

Builds fine with PR 134 even without Kernel support.

Runc

  • CGO (to build nsenter)
  • buildmode=pie support
  • 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.)

Crun (https://github.com/giuseppe/crun)

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

  • libseccomp

Containerd (https://github.com/containerd/containerd/)

Docker

Docker cli (github.com/docker/cli)

Already builds successfully

  • Update x/sys and x/net modules in vendor. PR

Docker daemon

  • PR https://github.com/moby/moby/pull/39423 - Update dependencies
  • PR https://github.com/moby/moby/pull/39327 - Remove CGO dependency
  • Update x/sys and x/net modules in vendor.
  • Update etcd-io/bbolt in vendor.
  • Update github.com/vishvananda/netns in vendor
  • Update github.com/vishvananda/netlink in vendor
  • Update github.com/ishidawataru/sctp in vendor
  • Update github.com/docker/libnetwork in vendor

Dependency lib PRs:

docker-init (https://github.com/krallin/tini)

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

docker-proxy

No changes required. https://github.com/docker/libnetwork/cmd/proxy

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

Podman - libpod (https://github.com/containers/libpod)


Additional projects / libraries

ETCD

Dependencies:

Kubernetes

Dependencies for kubelet:

  • x/net
  • x/sys
  • bbolt
  • runc/libcontainers -> CGO
  • cadvisor/accelerators/nvidia -> github.com/mindprince/gonvml -> CGO
  • ???

Prometheus

Already builds successfully

Promu

Already builds successfully

SQlite

Repository mirror: https://github.com/CanonicalLtd/sqlite

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

LXD

  • LXC build successfully
  • SQLite config update to build successfully
  • CGO to build storage backends

github.com/google/go-jsonnet

Repository on: https://github.com/google/go-jsonnet

github.com/github/hub

github.com/labstack/echo

github.com/labstack/gommon

VNDR (https://github.com/LK4D4/vndr)

Inlets (https://github.com/alexellis/inlets)


Community

References

You can’t perform that action at this time.