jcmvbkbc / linux-xtensa

Linux port for xtensa architecture. None of these branches are stable.
Other
139 stars 27 forks source link

Booting Linux on ESP32-S3 with U-Boot #19

Open zap8600 opened 2 months ago

zap8600 commented 2 months ago

Would it be possible to get a proper bootloader like U-Boot onto the ESP32-S3 and boot Linux with it?

jcmvbkbc commented 2 months ago

It would, but why would anybody want that?

zap8600 commented 2 months ago

I'm interested in trying to create drivers for the ESP32-S3's hardware without the need of ESP-IDF or without anything that ESP-IDF does getting in the way. I do also want to check out developing for bare-metal Xtensa on the ESP32-S3.

max1220 commented 2 months ago

Developing your own drivers will be hard for the Wifi part, which requires closed-source firmware that interacts with FreeRTOS(or at least tries to; You could possibly stub out the required FreeRTOS functions). The Wifi hardware is not documented. I think in some ways the ESP-IDF makes creating new drivers for Linux easier - You can just create a small binding between FreeRTOS and Linux via the IPC mechanism, instead of a full driver. If you actually just want working drivers, don't re-implement them yourself, just use the ESP-IDF drivers in Linux via the IPC, and write a Linux "stub" driver. But if you just want to learn about embedded programming I guess you could just try to port u-boot! Learning is guaranteed :P

zap8600 commented 2 months ago

I will learn, which is what I'm aiming for! I want to see if I can get U-Boot to replace the main app entirely so that only the bare minimum of ESP-IDF would be needed.