When something as exciting as a completely open CPU architecture comes along, it's hard to stop Codethink's engineers from getting involved. We've set up an internal research project with the goal of learning about RISC-V, and we have some interesting results already.
Why is Codethink interested in RISC-V?
The worldwide interest in RISC-V is not because it is a great new chip technology, the interest is because it is a common free and open standard to which software can be ported, and which allows anyone to freely develop their own hardware to run the software. -- History -- RISC-V International
The RISC-V architecture has a clean, modular design based on well-established CPU design principles. With the core specifications stable since 2019, we can now see software and hardware development starting to flourish. RISC-V is developed entirely in the open. (Here's the Github repo, if you don't believe me).
Engineers love open tech because it lets us work effectively, and it's not just about easier troubleshooting. An unprecedented level of customisation will be possible when designing RISC-V products, enabling more efficient manufacturing and operation. This has benefits right across the tech sector, and we're excited to start working with customers on the next generation of digital devices.
As of early 2021, most of the available RISC-V devices are microcontrollers. We want to run a graphical desktop or IVI environment, and so we need some hardware that's a bit more powerful. Our first research goal was to evaluate the available system-on-a-chip offerings and test and improve the software and hardware.
You probably know that we are opinionated about build tools. The lightweight, reproducible bootstrap process we contributed to the Freedesktop SDK should allow us to bring up a desktop-class Linux environment on a RISC-V board in a few short weeks. But did it? Read on for details of how we got on.
Freedesktop SDK on an Icicle
We identified the Icicle developer board, based around Microchip's Polarfire system-on-a-chip as a good starting point for application-class RISC-V hardware.
We're working from home as much as possible, so we've set up each board with a Raspberry Pi as a "remote control" which allows us to reboot and reflash the boards via the network. We also set up each board with a GPU to enable hardware-accelerated graphics.
As this is a developer board we didn't expect to just "plug and play". Our starting point was Microchip's board support package, which is developed on Github. Ben Dooks, who we recently interviewed, has worked with them to report and resolve several issues we found.
In parallel, we began an independent, reproducible OS bootstrap for the RISC-V architecture.
The Freedesktop SDK bootstrap process quickly resulted in a working
riscv toolchain that could produce binaries for the target, and the next stage was a more complete rootfs. Although BuildStream supports cross-compilation, we prefer to native compile when possible because, once you move beyond common embedded Linux components, upstream support for cross-compilation can be unreliable.
One benefit of RISC-V's clean design is that emulating the CPU on a developer laptop is already practical -- in fact, you can even emulate it in your browser. QEMU already has RISC-V support, so we set BuildStream up with
qemu-system-riscv and started building.
The result? Lots of work on the Freedesktop SDK to add support for the new architecture, to the point that we can build and boot a console-only rootfs for the board containing all the usual userland tools. You can try it out right now - see the instructions on the Freedesktop SDK wiki.
Our next goal is to show GNOME's developer preview OS running on a real RISC-V board. As part of that, we'll continue working on the Freedesktop SDK which underpins GNOME OS. The target is to have RISC-V accepted as a supported architecture of the Freedesktop SDK, which will enable the Flatpak ecosystem of Linux apps to support RISC-V officially.
As well as the Icicle board, we've pre-ordered some Hifive Unmatched boards too, and we're hoping the desktop form factor will get us closer to our goal.
Want to get involved? You can try our work in progress build in QEMU, join in with Freedesktop SDK issue 1165, or simply subscribe to our RISC-V newsletter for updates.
Related blog posts:
- Linux Kernel and RISC-V: Meet the Codethings: Ben Dooks talks about Linux kernel and RISC-V >>
- Programming Language: Improving RISC-V Linux support in Rust >>
- Meet the Codethings: Safety-critical systems and the benefits of STPA with Shaun Mooney
- Why Project Managers are essential in an effective software consultancy
- FOSDEM 2021: Devroom for Safety and Open Source
- Meet the Codethings: Ben Dooks talks about Linux kernel and RISC-V
- Here we go 2021: 4 open source events for software engineers and project leaders
- Xmas Greetings from Codethink
- Call for Papers: FOSDEM 2021 Dev Room Safety and Open Source Software
- Building the abseil-hello Bazel project for a different architecture using a dynamically generated toolchain
- Advent of Code: programming puzzle challenges
- Improving performance on Interrogizer with the stm32
- Introducing Interrogizer: providing affordable troubleshooting
- Improving software security through input validation
- More time on top: My latest work improving Topplot
- Cycling around the world
- Orchestrating applications by (ab)using Ansible's Network XML Parser
- My experience of the MIT STAMP workshop 2020
- Red Hat announces new Flatpak Runtime for RHEL
- How to keep your staff healthy in lockdown
- Bloodlight: A Medical PPG Testbed
- Bringing Lorry into the 2020s
- How to use Tracecompass to analyse kernel traces from LTTng
- Fixing Rust's test suite on RISC-V
- The challenges behind electric vehicle infrastructure
- Investigating kernel user-space access
- Consuming BuildStream projects in Bazel: the bazelize plugin
- Improving RISC-V Linux support in Rust
- Creating a Build toolkit using the Remote Execution API
- Trusting software in a pandemic
- The Case For Open Source Software In The Medical Industry
- My experiences moving to remote working
- Impact of COVID-19 on the Medical Devices Industry
- COVID-19 (Coronavirus) and Codethink
- Codethink develops Open Source drivers for Microsoft Azure Sphere MediaTek MT3620
- Codethink partners with Wirepas
- Testing Bazel's Remote Execution API
- Passing the age of retirement: our work with Fortran and its compilers
- Sharing technical knowledge at Codethink
- Using the REAPI for Distributed Builds
- An Introduction to Remote Execution and Distributed Builds
- Gluing hardware and software: Board Support Packages (BSPs)
- Engineering's jack of all trades: an intro to FPGAs
- Bust out your pendrives: Debian 10 is out!
- Why you should attend local open source meet-ups
- Acceptance, strife, and progress in the LGBTIQ+ and open source communities
- Codethink helps York Instruments to deliver world-beating medical brain-scanner
- Codethink open sources part of staff onboarding - 'How To Git Going In FOSS'
- Getting into open source
- How to put GitOps to work for your software delivery
- Open Source Safety Requirements Analysis for Autonomous Vehicles based on STPA
- Codethink engineers develop custom debug solution for customer project
- Codethink contributes to CIP Super Long Term Kernel maintenance
- Codethink creates custom USB 3 switch to support customer's CI/CD pipeline requirements
- Codethink unlocks data analysis potential for British Cycling
- MIT Doctor delivers Manchester masterclass on innovative safety methodology
- Balance for Better: Women in Technology Codethink Interviews
- Introducing BuildGrid
- Configuring Linux to stabilise latency
- GUADEC 2018 Talks
- Hypervisor Not Required
- Full archive