PLCT Lab, a group working on compilers, runtimes, and emulators, has announced a milestone for its effort to port the Android Open Source project to the free and open-source RISC-V instruction set architecture: a successful minimal boot, with step-by-step instructions for trying it out yourself.

With increasing interest in using the RISC-V instruction set architecture for mobile-centric devices, a major hurdle is a lack of software support. It’s long been possible to boot mainstream Linux kernels on RISC-V, but Android support remains elusive – which is what PLCT Lab is looking to address, by porting the Android Open Source Project (AOSP) to RISC-V.

“The full name of our project is ‘AOSP for RISC-V,'” explains PLCT Lab’s Chen Wang. “The ultimate goal of our project is to port Android on RISC-V. Of course, this goal is huge. But in the short term, we still have a small goal, which is described in one sentence: based on the RISC-V platform, realise the kernel part of Android running on QEMU, and run the Android Shell.”

The initial target, then, is a port of AOSP capable of booting into a command line interface: a root file system with shell, a C library, and operating system kernel all running on RISC-V hardware. That’s the milestone the project has now reached: an AOSP root file system dubbed toybox with mksh and an init system, the Bionic C library, and the Linux kernel with the Android 10 patch set applied, all running atop a 64-bit RISC-V core emulated in QEMU.

“After some work, the above small goal has been initially completed, and at least one of the ‘minimal Android systems’ we defined above can be launched on QEMU,” says Wang. “The related porting and modification have been opened on GitHub. […] You are welcomed to have a try and test, submit PR, or directly participate in our AOSP porting work.”

A full step-by-step guide to setting an Ubuntu 20.04 LTS environment with QEMU, building, and booting the initial AOSP minimal system can be found on the project website, while the source code is available on GitHub.