Live data from Hacker News

Linux on ESP32

github.com

11–20 of 53 posts

Re: Linux on ESP32

#11
post #6
post #3

How can it run when there is no MMU? Isn't this like rewriting a large part of the kernel?

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...

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.

Re: Linux on ESP32

#12
post #6
post #3

How can it run when there is no MMU? Isn't this like rewriting a large part of the kernel?

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...

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.

Re: Linux on ESP32

#15
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.

Re: Linux on ESP32

#17

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 informat…

On the other hand this shows that it is possible and gives a floor for performance.

Re: Linux on ESP32

#18
post #11
post #6

Earlier quoted context omitted.

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...

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.

Sv32 is what every 32-bit RISC-V CPU with an MMU uses. It is a full MMU. You can run Linux on it.

Re: Linux on ESP32

#19
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 )

Re: Linux on ESP32

#20
post #3

How can it run when there is no MMU? Isn't this like rewriting a large part of the kernel?

There is actually precedent for nommu Linux, though it obviously has tradeoffs.

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
Post reply on HN