Linux on ESP32(github.com)
71 pointsby boveykingJul 28, 2026

8 Comments

boveykingJul 28, 2026
Have a try.
RochusJul 29, 2026
How can it run when there is no MMU? Isn't this like rewriting a large part of the kernel?
yjftsjthsd-hAug 1, 2026
There is actually precedent for nommu Linux, though it obviously has tradeoffs.
stevefan1999Aug 1, 2026
Yeah, nommu Linux basically cannot run normal ELF since there is no virtual memory which is needed for relative addressing and relocations. You are mostly left with classical formats like AT&T a.out only
derefrAug 1, 2026
You wouldn’t be able to guarantee execution of arbitrary ELF, but couldn’t you intentionally build non-PIC-compiled ELF executables where the section base addresses as defined in the header must match the MMU region “slots” the host provides?
peterusAug 1, 2026
This is for the recently released ESP32-S31 which does have a MMU, unlike the ESP32-S3.

The author has more details in this reddit post: https://eddrit.com/r/esp32/comments/1vait52/mmu_linux_on_the... And the docs section of the repo: https://github.com/GrieferPig/esp32-s31-linux/tree/main/docs...

RochusAug 1, 2026
Thanks for the links. This doesn't seem to be a true RISC-V MMU (according to the Sv32 specification) integrated into the CPU core itself, but just a peripheral designed for memory mapped SPI flash and PSRAM. So as far as I understand there is no true process isolation with page faults and dynamic paging.
RohansiAug 1, 2026
Sv32 is what every 32-bit RISC-V CPU with an MMU uses. It is a full MMU. You can run Linux on it.
RochusAug 1, 2026
Sure, but what the S31 calls "MMU" is not an Sv32 MMU; therefore my comment.
RohansiAug 1, 2026
The documentation states:

> Compliant with RISC-V Sv32 virtual memory scheme

https://documentation.espressif.com/esp32-s31_datasheet_en.p...

RochusAug 1, 2026
Ok, I see. The S3’s "MMU" is just an external-memory mapper, not a virtual-memory MMU. The S31 apparently has both, that mapper plus an architectural CPU-side Sv32 MMU; that offers a lot of interesting possibilities.
chrswAug 1, 2026
The Microchip PIC32MZ MCU has an MMU as well. But not with wireless options in a 8x8 QFN80 package like this ESP32-S31. That's pretty small. No flash though.
yjftsjthsd-hAug 1, 2026
> In mainline linux, XIP support on RISC-V was removed, so 6.12 was used instead which has proper XIP support.

Doesn't that put it in an awkward position relying on a dead end feature?

NeywinyAug 1, 2026
What I remember was they said it could come back if people needed it but it was broken for looking (months, years) at a time. So even if they didn't remove it, 6.12 might be the last working version with it anyway
IzmakiAug 1, 2026
Everything is untested or WIP. What is the news here, sorry?
jubilantiAug 1, 2026
The news is: vibe coder vibe coded this and got their agents to upvote it.
NooneAtAll3Aug 1, 2026
his*
jagged-chiselAug 1, 2026
Is that a critical correction? Is a gender neutral pronoun somehow unacceptable?
kogasa240pAug 1, 2026
Looks interesting but wouldn't something like netBSD be a better fit?
Joel_MckayAug 1, 2026
Most ESP chips use FreeRTOS, and flash page caching support in hardware.

Unlike Multi-core Application processors which are a better fit for OS like BSD or Linux. =3

AurornisAug 1, 2026
Obviously vibecoded but interesting nevertheless. The agent left everything marked as untested in the README but the output snippets toward the bottom imply that it got something working enough to log in and run some commands.

Nobody is going to mistake this for a carefully crafted port of Linux but it at least serves as a proof of concept.

The real downside of the vibecoding is that we don’t get any helpful information about what it took to get it done with thoughtful analysis from a human. Just a chunk of code in a GitHub repo with some half-coherent README. There’s a docs folder, but the documentation about the MMU part just says that there are two MMUs across a couple lines of notes. Okay, great.

IgorPartolaAug 1, 2026
On the other hand this shows that it is possible and gives a floor for performance.
voakbasdaAug 1, 2026
Given the context of a vibe-coded project, would it be reasonable to assume the example outputs are outright hallucinations, without seeing indisputable evidence to the contrary?

Sad that’s where my mind goes, but this is what the world has been training me to believe. And these doubts now eclipse the skepticism that I developed toward things that humans posted on the internet.

Lies, damn lies, and LLMs.

piterrroAug 1, 2026
When can we run doom on it?
tyingqAug 1, 2026
The responses all seem a little harsh. If you poke through the user's history, this kind of thing isn't new for them, going back to pre-LLM-could-do-this days.

I think the docs are light because the primary goal for them is not to provide everyone with a well documented linux on esp-32-s31 guide, but rather this that they shared:

"I'm currently working on a hackable music player and I used to prototype with the OG esp32, and tbh if I wasn't for Bluetooth audio I'd move on to S3 already" ( from the links in this comment https://news.ycombinator.com/item?id=49134987 )

ofalkaedAug 1, 2026
It takes no effort to play LLM or not, you don't need to know anything about the topic or put anytime into reading and understanding the submission, just find that em-dash and you can turn every discussion into meta slop.
tyingqAug 1, 2026
I also think an LLM isn't going to just spit this all out and viola, it boots. I imagine there were many rounds of jtag debug, copy/paste into the LLM prompt, with enough human knowledge/context to say the right thing, suggest some existing implementation snippet, etc.