Linux on S31

Moderator: bongjiajun

GrieferPig
Posts: 1
Joined: Sat Jun 27, 2026 1:49 pm

Linux on S31

Postby GrieferPig » Sun Jul 05, 2026 5:59 am

Just want to show that MMU linux on s31 is possible: https://github.com/GrieferPig/esp32-s31-linux

Both OpenSBI and Linux are patched to accomodate for S31's CLIC-centric (I presume?) interrupt architecture and XIP support. Not much are usable atm, but it reaches init and shell.

You can download the kernel, bootloader and OpenSBI on the Release page: https://github.com/GrieferPig/esp32-s31 ... ag/initial

Some outputs:

Code: Select all

~ # grep -E '^isa|^mmu' /proc/cpuinfo
isa             : rv32imafc_zicntr_zicsr_zifencei_zca_zcf_zbb
mmu             : sv32
~ # free -h
              total        used        free      shared  buff/cache   available
Mem:          14.7M        3.0M        8.9M           0        2.8M        8.2M
Swap:             0           0           0
~ # coremark | grep teration
Iterations/Sec   : 8.278146
Iterations       : 110

hehongbo
Posts: 3
Joined: Sat Jul 04, 2026 11:18 am

Re: Linux on S31

Postby hehongbo » Mon Jul 06, 2026 3:59 pm

Holy shit, why are u so fast :o
I am still struggling with u-boot

andylinpersonal
Posts: 33
Joined: Wed Jan 19, 2022 2:21 am

Re: Linux on S31

Postby andylinpersonal » Wed Jul 08, 2026 10:10 am

For such an XIP kernel and constrained 16MiB device, we can skip u-boot entirely and jump into kernel from OpenSBI directly.
But u-boot may be useful to load a normal kernel from external device if later s31 SoC comes with larger PSRAM.

eriksl
Posts: 260
Joined: Thu Dec 14, 2023 3:23 pm
Location: Netherlands

Re: Linux on S31

Postby eriksl » Thu Jul 30, 2026 5:05 pm

How do you handle the (too) simple MMU v.s. the required virtual memory of Unix/Linux?

Sprite
Espressif staff
Espressif staff
Posts: 10658
Joined: Thu Nov 26, 2015 4:08 am

Re: Linux on S31

Postby Sprite » Fri Jul 31, 2026 1:14 am

How do you handle the (too) simple MMU v.s. the required virtual memory of Unix/Linux?
S31 has a fully-fledged Sv32 MMU.

eriksl
Posts: 260
Joined: Thu Dec 14, 2023 3:23 pm
Location: Netherlands

Re: Linux on S31

Postby eriksl » Fri Jul 31, 2026 9:33 am

Yeah I read it one minute later! Nice!

andylinpersonal
Posts: 33
Joined: Wed Jan 19, 2022 2:21 am

Re: Linux on S31

Postby andylinpersonal » Fri Aug 21, 2026 8:34 am

Official Linux for S31 has been released !!

Who is online

Users browsing this forum: No registered users and 1 guest