Boot Linux on ESP32-S3

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Boot Linux on ESP32-S3

Postby rudi ;-) » Wed May 17, 2023 3:29 am

Hi Folks

After a few "ESP" apprenticeship years, I have arrived at my destination:

Booting Linux on an ESP32 directly.

if you want also try Boot Linux directly on an ESP32-S3 you could have a look to the fantastic Wiki by jcmvbkbc

Also there is born a Playground with diverse Things to come - and you perhabs want see too.

Booting Linux on ESP32-S3 -
It's working!
- done!

All the Best for you guys
greetings fly out to friends all over the globe


Best wishes
rudi ;-)
booting_linux_on_esp32-s3.png
booting_linux_on_esp32-s3.png (132.75 KiB) Viewed 87509 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

username
Posts: 536
Joined: Thu May 03, 2018 1:18 pm

Re: Boot Linux on ESP32-S3

Postby username » Thu May 18, 2023 4:24 am

Thanks rudi for the update.
I have to ask... Wonder why they didn't choose 240mhz. looks like they have it set to 160mhz.
Lastly, though it boots, what can we really do with such limited ram?

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Boot Linux on ESP32-S3

Postby rudi ;-) » Sun May 21, 2023 4:24 am

username wrote:
Thu May 18, 2023 4:24 am

I have to ask... Wonder why they didn't choose 240mhz. looks like they have it set to 160mhz.
i heard you, - here you are 240 MHz,

[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 33
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] clocksource: ccount: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7963585194 ns
[ 0.000081] sched_clock: 32 bits at 240MHz, resolution 4ns, wraps every 8947848189ns
[ 0.008099] Calibrating delay loop (skipped)... 240.00 BogoMIPS preset
[ 0.014307] pid_max: default: 4096 minimum: 301
[ 0.019108] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.026465] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.070816] rcu: Hierarchical SRCU implementation.
[ 0.071445] rcu: Max phase no-delay instances is 1000.
[ 0.083606] devtmpfs: initialized


...

the first hello world on the target you know?
it's a cross compiled rootfs,
done!



buildroot login: root
Password:
Jan 1 00:09:18 login[56]: root login on 'console'
~ # helloworld
Hello World

CPU count : 1
CPU list : 0
vendor_id : Tensilica
model : Xtensa LX7.0.12
core ID : LX7_ESP32_S3_MP
build ID : 0x90f1f
config ID : c2f0fffe:23090f1f
byte order : little
cpu MHz : 240.00
bogomips : 480.00
flags : nmi debug ocd density boolean loop nsa minmax sext clamps mac16 mul16 mul32 mul32h fpu s32c1i
physical aregs : 64
misc regs : 4
ibreak : 2
dbreak : 2
num ints : 32
ext ints : 26
int levels : 6
timers : 3
debug level : 6
icache line size: 4
icache ways : 1
icache size : 0
icache flags :
dcache line size: 16
dcache ways : 1
dcache size : 0
dcache flags :
Segmentation fault
~ #


also if too fast, 80MHz - we can switch. WoWZa 8-)


Image
username wrote:
Thu May 18, 2023 4:24 am
Lastly, though it boots, what can we really do with such limited ram?
..we have a switching #PSRAMBANK btw..
also the second CPU is on the way



best wishes
rudi ;-)

ps
you have an ESP32-S3-N8R8 ?
You want try? All things are online if you need.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

username
Posts: 536
Joined: Thu May 03, 2018 1:18 pm

Re: Boot Linux on ESP32-S3

Postby username » Sun May 21, 2023 12:26 pm

awesome! Next time I do my online order I'll pick one up and try.

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Boot Linux on ESP32-S3

Postby rudi ;-) » Mon May 29, 2023 2:21 pm

username wrote:
Sun May 21, 2023 12:26 pm
awesome! Next time I do my online order I'll pick one up and try.
update:
29 May 2023
blinky , it's working fine.

Just in time happens: SDMC / USB Host ( mounting flash drive )
Next driver step: I2C / SPI

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

micropython port on S3Linux port

Postby rudi ;-) » Sun Jul 09, 2023 10:29 am

update:
- native micropython -just for show up- port
- linux port add to the boot partitions bootloader

hi folks

you can use micropython on this linux port

test firmware uploaded

example test:
ESP32-S3 with 16MB quad flash and 8 MB quad psram
example on m5stackCoreS3
- fw for your own test

ESP32-S3 with 8MB quad flash and 8 MB octal psram
example on
- ESP32-S3-DevKit N8R8
- olimex ESP32-S3-DevKit-Lipo OSHW board
- fw for your own test

mpy_on_liosti_showup1.png
mpy_on_liosti_showup1.png (25.68 KiB) Viewed 82541 times

the hello world ( blinky )
mpy_on_liosti.png
mpy_on_liosti.png (32.6 KiB) Viewed 82541 times


also the linux port was add to the boot partition bootloader
bootpartitions_up.png
bootpartitions_up.png (75.11 KiB) Viewed 82541 times

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Boot Linux on ESP32-S3

Postby rudi ;-) » Wed Jul 12, 2023 1:55 pm

update
======

WIFI on S3 Linux - your wireless connect

by using a small customized expanded ESP-Hosted

ping @ESPRESSIF
... done! 8-)

best wishes
rudi ;-)

Image
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Boot Linux on ESP32-S3

Postby rudi ;-) » Thu Jul 27, 2023 7:58 pm

update:
=======
"SPECIALCLIENT ONLY" engineering WROOM sized ESP32-S3 ( without castellated holes )
Image



ESP32-S3-WoWZa with
- N256R256
- N512R512
- N1GR1G
with castellated holes
pin compatible with ESP32-S2-SOLO, ESP32-S3-WROOM soon available for more testing and setups for Xtensa S3 Linux and ESP-IDF as well.

Image


we get 256Mbit, 512Mbit and 1Gbit PSRAM Option now. the ESP32-S3 supports 1GB ( one giga byte ) PSRAM
as soon as possible the market has more as 1Gbit ( 128 mega byte ) available, i will update here :)
we are technical on market stand available now by 1/8 from what ESP32-S3 would be can do in one off-package.

JFYI: ESP32-S3 supports up to 1 GB off-package flash and 1 GB off-package RAM. If VDD_SPI is used to supply
power, make sure to select the appropriate off-package flash and RAM according to the power voltage on
VDD_SPI (1.8 V/3.3 V). It is recommended to add a zero-ohm series resistor on the SPI communication lines to
lower the driving current, reduce interference to RF, adjust timing, and better shield from interference.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: Boot Linux on ESP32-S3

Postby rudi ;-) » Thu Aug 10, 2023 10:18 am

update:

Remote Build by ESP32-S3 SSH Client which runs #jcmvbkbc #esp32s3 #linux #esp32 S3 port

10. Aug 2023

the YT Video shows all steps:
( JFYI: i did the same technic ( remote compile on an NFS/SSH Server ) june/2016 for the ESP8266
whats not new is - but new is, the Linux SSH client on the ESP32-S3 MCU can trigger this by self on demand
showing simple things by second SSH client which can be " a script" :D i hope you get the idea behind -
there is also now a 100GB NFS Share mountet which we use as executable space for the ESP32-S3 - and that is amazing!
we can run example 2 different mpy versions same time, the one from S3Linux userspace, and the second from the
"100GB Developer/cloud live compilation" - we see live the change of each compilation, not need any more,
rebuild rootfs ( userspace ) 100x and reflash ESP32-S3 - we do simple the Develop in the mounted CLOUD SPACE. :mrgreen:

  • remote build by ESP32-S3 SSH client which runs #jcmvbkbc #esp32s3 #linux #esp32 S3 port
  • ESP32-S3 runs #jcmvbkbc #esp32s3 #linux #esp32 S3 port which has also wifi and SSH support.
  • on the ESP32-S3 also runs native "posix" micropython and LUA ..
  • we connect from a PC by an SSH Client the ESP32-S3 (150) which runs a SSH Server.
  • the ESP32-S3 is also connected over wifi to the internet
  • we connect on ESP32-S3 ssh client internet timeserver and update local time on ESP32-S3.
  • we connect then cloud and mount the cloud to the ESP32-S3 as a shared folder which has 100GB space .
  • we serve to the cloud developer folder and cat the hi.c file.
  • we connect also a second putty ssh connection to the ESP32-S3 ssh server.
  • then we connect with the second ssh client on ESP32-S3 to the Developer Server (67) and serve to the cloud developer folder.
  • now we crosscompile the hi.c and run on the first ssh client the build
  • we do this moretime and patch also
  • last but not least ESP32-S3 runs binary build micropython from cloud share in the first ESP32-S3 client and also lua from ESP32-S3 userspace in the second SSH client same time..

( LUA YT Video ) also Micropyton installed
Image


NFS Client runs on S3Linux and mounts a NFS Share (100GB) over WiFi

Image


local console runs on wifi ssh server, 2 ssh clients connected per wifi and runs micropython port.
is this the world's first micropython server on a MCU?


run example 2 different mpy versions same time, the one from S3Linux userspace, and the second from the
"100GB Developer/cloud live compilation"
double_mpy.png
double_mpy.png (282.68 KiB) Viewed 78500 times

Image

txs_.png
txs_.png (399.8 KiB) Viewed 78500 times
best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

yokonav
Posts: 2
Joined: Mon Aug 21, 2023 3:34 am

Re: Boot Linux on ESP32-S3

Postby yokonav » Mon Aug 21, 2023 3:44 am

Hi,

What are the steps to include micropython and lua when using the jcmvbkbc/rebuild-esp32s3-linux-wifi.sh script?

Thanks!

Who is online

Users browsing this forum: No registered users and 35 guests