One of the developers behind the Juice VM RISC-V virtual machine has used it to achieve something previously considered, if not impossible, then at least extremely challenging: booting the Linux 5.0 kernel on an Espressif ESP32 microcontroller.
Working with an ESP32 DevKit v1 development board, which hosts an ESP-WROOM-32 module, developer Xiaohui added 2MB of external flash storage and 8MB of external pseudo-static RAM (PSRAM) — then set about porting a virtual machine that provides an environment for software compiled for the RV64IMASU instruction set architecture, to the board.
Once Juice VM, a project launched in 2020 with a view to creating as compact a virtual machine as possible, was ported to the ESP32, Xiaohui worked on getting it to boot Linux — successfully, impressively enough.
The resulting firmware, which includes the OpenSBI RISC-V supervisor, Linux 5.0, and a file system, weighted in at 4.6MB — but compressed to 1.5MB for loading onto the 2MB of flash added to the board.
Xiaohui explains that the Juice VM was ported through ESP-IDF, and is now compatible with chips in the ESP32, ESP32-S2, and ESP32-C3 families — the latter the only one which includes a RISC-V core as its primary processor.
A video demonstrating the boot process has been uploaded to video sharing site Bilibili, while further discussion can be found on Whycan.com. Firmware files for the ESP32 have been uploaded to the Juice VM GitHub repository — though under an unspecified license.