Running Linux with kernel 6.3 on Open Source Hardware board with ESP32-S3!


Few days ago I spotted on Twitter that there is possible to run Linux on ESP32-S3.

It was good timing as our new EUR 12.00 ESP32-S3-DevKit-Lipo board just hit the mass production, so I got one board and try to replicate the results.

  • ESP32-S3-WROOM1 with 8MB RAM and 8MB Flash
  • Reset and Boot buttons
  • USB-C port with USB-OTG for JTAG debugging and programming
  • USB-C port with CH340X for serial UART for programming and debugging
  • LiPo charger and battery connector
  • pUEXT connector for connecting UEXT modules
  • GPIOs available on dual row connector 0.1″ step

I used clean freshly installed Ubuntu 22.04LTS on small box and try to reproduce the script here.

I had to run it dozen of times and it always ended with this or that missing, then it seems to complete, but didn’t program anything to ESP32-S3.

Later I try this with the same result!

I asked on Twitter for help and Rudi (@eMbeddedHome) quickly built binary file just for flashing on ESP32-S3-DevKit-LiPo.

This time everything went smoothly and the board boot normally.

So I will have to keep digging what I do wrong.

$ free -m 

reports 3MB free for user apps out of total 7MB

The access to the GPIO is possible via devmem direct write to ESP32-S3 registers:

devmem 0x60004020 32 1  
sleep 0.5
devmem 0x60004020 32 0
sleep 0.5
devmem 0x60004020 32 1
sleep 0.5
devmem 0x60004020 32 0
sleep 0.5

Also it seems micropython has “unix” version which could be run on this device!

https://github.com/micropython/micropython/tree/master/ports/unix

8 Comments (+add yours?)

  1. Jodaille
    Jun 29, 2023 @ 15:41:13

    Reply

  2. OliMex Observer
    Jul 03, 2023 @ 12:19:09

    It’s 2023 .. we must assume these later model ESP32s are pre-infected with APT41 type malware during manufacturing (in the microcode to initialize the chip or in the chip itself). The older model ESP32 were also vulnerable to a hardware-glitching technique that had advisors suggesting the chips be pulled from service and recycled with a different supplier.

    (Same goes for Allwinner, Rockchip and AMLogic and all other chips fabricated in mainland China where they have almost a billion consumers for these devices, but only if they are infected or infectable, per CCP rules.)

    Reply

  3. Jodaille
    Jul 03, 2023 @ 16:25:29

    Alright, thank you 🙂

    Reply

  4. ucTier
    Aug 18, 2023 @ 18:56:12

    hello !
    fine, i bought ESP32-S3-DevKit-Lipo and would try to use it, But I do not dfound anywhere a info, how i ccan flash the olix*.bin on the module – help, please. Using Linux, no windows avaialble !

    Reply

    • ucTier
      Aug 18, 2023 @ 20:01:07

      meanwhile i tried with esptool, with:
      esptool erase_flash
      esptool.py v2.8
      Found 1 serial ports
      Serial port /dev/ttyACM0
      Connecting…
      Detecting chip type…
      /dev/ttyACM0 failed to connect: Unexpected UART datecode value 0x03700000. Failed to autodetect chip type.

      and it seems I have to hold button1, while press resetbutton.
      where do i find a new esptool that works with the device?

      Reply

      • ucTier
        Aug 20, 2023 @ 20:52:58

        meanwhile i found this: https://adafruit.github.io/Adafruit_WebSerial_ESPTool/
        with which i can connect the esp and download the bin-file …
        … but when i connect after reboot with cutecom, i only get this one
        single line / message:
        “[0;32mI (590) esp_psram: SPI SRAM memory test OK[0m␊” …
        .. so how can i connect this linux shell on the esp32-S3 ?

  5. Kabron
    Oct 15, 2023 @ 16:07:43

    What is Linux password?

    Reply

Leave a comment