Linux 5.0 shown to boot on ESP32


ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth.

The ESP32 series employs either a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations, Xtensa LX7 dual-core microprocessor or a single-core RISC-V microprocessor and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power-management modules. ESP32 is created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC using their 40 nm process. It is a successor to the ESP8266 microcontroller. 

There’s little practical application for it, but it may be fun to try, and one developer apparently managed to boot Linux 5.0.0 on a board with an E32 dual-core Xtensa processor connected to 8MB PSRAM and a 2MB SPI flash.

The shortened boot log above shown the bootloader output with E32-D0WD dual-core Xtensa processor eventually booting Linux 5.0.0. But the boot process is somewhat convoluted as the bootloader jumps to “Juice Vm” described as a “small RISC-V virtual machine” which then calls OpenSBI RISC-V Open Source Supervisor Binary Interface which loads the Linux kernel and a small file system. The full boot log and binary images were shared on a Reddit thread and Whycan with the latter in Chinese. The total image size is around 1.5 MB that almost entirely fills the 2MB flash used in the board used for testing. SPI and UART interfaces are clearly supported, but they don’t seem to boot to a serial console just yet.

Good luck finding out what to do with the two binary images provided, as there’s no explanation at all of all this all works. It’s quite confusing, and initially, I even thought it showed Linux booting on ESP32-C3 RISC-V processor since Juice VM is a RISC-V virtual machine which, as a side note, can also be used to boot FreeRTOS, RT-Thread, and other OS. But I was eventually told JuiceVm rv64 virtual machine had been ported to the ESP-IDF with support for ESP32, ESP32-S2, and ESP32-C3.

Since the release of the original ESP32, a number of variants have been introduced and announced.