An OS for the M5Stack Cardputer handheld with 512KB RAM, letting you write, compile and run Ruby and Python on the device itself.
tsuyoshi-otake/m5stamp-p4-c6-linux
RISC-V NOMMU Linux distribution for M5Stack Stamp-P4 + Stamp-AddOn C6, booting into SoftAP Wi-Fi, SSH and MicroPython.
- Stars
- 34
- Forks
- 2
- Open issues
- 8
- Last commit
- 9 days ago
What is it?
A RISC-V NOMMU Linux 7.2 distribution with a Buildroot userland for the M5Stack Stamp-P4 (ESP32-P4: dual-core RV32IMAC, 32 MiB PSRAM, 16 MiB flash). Wi-Fi comes from the Stamp-AddOn C6 over a 4-bit SDIO link running ESP-Hosted NG firmware; both CPU cores boot by default, and a single-core image can be built with C68_MAXCPUS=1.
The board boots into a WPA2-PSK SoftAP with a per-device SSID (m5-XXXX) and DHCP, plus Dropbear SSH on port 22, BusyBox vi, and MicroPython as python3. /home, /root and /var/lib use a RAM-backed OverlayFS, so changes last until power-off. With the optional USB carrier, the board exposes a 256 KB FAT drive holding config.txt, wpa_supplicant.conf and credentials.txt; saves are validated and written to redundant A/B flash slots without a reboot.
Without an MMU, processes share a 10 MB user pool and run in RISC-V machine mode, so any program can reach kernel memory; Secure Boot and flash encryption are disabled. It is presented as a development board rather than a hardened product.
Key features
- 01NOMMU RISC-V Linux 7.2 kernel with both ESP32-P4 cores online by default (SMP).
- 02Wi-Fi via ESP-Hosted NG firmware on the ESP32-C6, linked over 4-bit SDIO with a selectable 1–40 MHz clock.
- 03Boots into a per-device WPA2-PSK SoftAP with a udhcpd DHCP server on 192.168.4.x.
- 04Dropbear SSH server with per-device passwords, key-only root login and a setuid su that logs every attempt.
- 05MicroPython 1.22.2 as python3, plus Pico-style autorun of main.py, main.sh or a bFLT main from the USB drive.
- 06Optional USB Mass Storage /boot FAT drive for config.txt, wpa_supplicant.conf and credentials, with A/B flash slots and factory reset.
Use cases
- Running Linux command-line tools and MicroPython scripts on an ESP32-P4 dev board.
- Headless wireless deployment over SSH when no display or serial adapter is at hand.
- Editing Wi-Fi and network settings from a USB drive instead of reflashing the board.
- Developing and testing NOMMU RISC-V kernel patches and dual-core SMP behaviour on real hardware.
Quick start
- 1
Open the project's releases page and download a release image
- 2
Flash the image to the Stamp-P4 board and connect over Wi-Fi SoftAP or serial (see docs/troubleshooting.md)
Things to know
- Requires specific hardware: M5Stack Stamp-P4 with Stamp-AddOn C6.
- Licensed under GPL-2.0, a copyleft license.
- The C6 must run ESP-Hosted NG 1.0.6, or it may fail to attach over SDIO.
- Secure Boot and flash encryption are disabled, so physical access exposes the flash contents.
In collections
Topics
FAQ
- What is m5stamp-p4-c6-linux?
- RISC-V NOMMU Linux distribution for M5Stack Stamp-P4 + Stamp-AddOn C6, booting into SoftAP Wi-Fi, SSH and MicroPython. A RISC-V NOMMU Linux 7.2 distribution with a Buildroot userland for the M5Stack Stamp-P4 (ESP32-P4: dual-core RV32IMAC, 32 MiB PSRAM, 16 MiB flash). Wi-Fi comes from the Stamp-AddOn C6 over a 4-bit SDIO link running ESP-Hosted NG firmware; both CPU cores boot by default, and a single-core image can be built with C68_MAXCPUS=1.
- Is m5stamp-p4-c6-linux free to use? What license does it have?
- m5stamp-p4-c6-linux is open source under the GPL-2.0 license. Check the license terms before using it in commercial products.
- Is m5stamp-p4-c6-linux still maintained?
- Actively maintained. The last commit to m5stamp-p4-c6-linux was on Oct 30, 2026.
- What can I use m5stamp-p4-c6-linux for?
- Running Linux command-line tools and MicroPython scripts on an ESP32-P4 dev board. Headless wireless deployment over SSH when no display or serial adapter is at hand. Editing Wi-Fi and network settings from a USB drive instead of reflashing the board. Developing and testing NOMMU RISC-V kernel patches and dual-core SMP behaviour on real hardware.
- How do I install m5stamp-p4-c6-linux?
- Open the project's releases page and download a release image Flash the image to the Stamp-P4 board and connect over Wi-Fi SoftAP or serial (see docs/troubleshooting.md)
- Where can I get m5stamp-p4-c6-linux?
- The source code and installation instructions are on GitHub: https://github.com/tsuyoshi-otake/m5stamp-p4-c6-linux
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A mouse-driven, windowed desktop that runs on ESP32 microcontrollers and is drawn in any ANSI terminal over serial.
A Linux operating system for embedded routers and devices with a fully writable filesystem and package management.
Remote access to Linux devices through a web browser, with a terminal, file transfer and device web UI proxying via a central server.
A lean Python 3 implementation that runs on microcontrollers and other resource-constrained devices, with hardware access modules.
An open-source, 3D-printable mini quadruped robot built on the ESP32 with an OLED face and servo-driven walking.