tvlad1234 / pico-rv32ima

Running Linux on RP2040 with the help of RISC-V emulation
Other
235 stars 18 forks source link
buildroot linux risc-v riscv-emulator riscv32 rp2040

pico-rv32ima

Running Linux on the RP2040

How it works

This project uses CNLohr's mini-rv32ima RISC-V emulator core to run Linux on a Raspberry Pi Pico, using SPI PSRAM chips as system memory. The Linux kernel and root filesystem are stored on an SD card.

Features

Requirements

This project overvolts and overclocks the RP2040! Use at own risk!

How to use

The configuration and pin mapping can be modified in the rv32_config.h file.

The SD card needs to be formatted as FAT16 or FAT32. Prebuilt Linux kernel and filesystem images are provided in this repository. They must be placed in the root of the SD card. If you want to build the image yourself, you need to run make in the linux folder. This will clone the buildroot source tree, apply the necessary config files and build the kernel and root filesystem image.

What it does

On powerup, the board waits for the BOOTSEL button to be pressed. After it has been pressed, the Linux kernel will be copied into RAM. In a few seconds, kernel messages will start streaming on the console. The boot process takes around 30 seconds. The Linux image includes a fork of the c4 compiler/interpreter, the duktape JavaScript interpreter and the Lua interpreter, as well as a variety of Linux utilities and the coremark benchmark.

Pictures