etc:users:jcmvbkbc:linux-xtensa:esp32s3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
etc:users:jcmvbkbc:linux-xtensa:esp32s3 [2023/09/23 21:22] – jcmvbkbc | etc:users:jcmvbkbc:linux-xtensa:esp32s3 [2024/06/09 05:06] (current) – update bootloader instructions to wifi-enabled version jcmvbkbc | ||
---|---|---|---|
Line 4: | Line 4: | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
* https:// | * https:// | ||
Scripts with all steps below: https:// | Scripts with all steps below: https:// | ||
+ | |||
+ | ===== Details ===== | ||
+ | |||
+ | * [[.: | ||
+ | * [[.: | ||
+ | * [[.: | ||
+ | * [[.: | ||
+ | * [[.: | ||
===== Things that work ===== | ===== Things that work ===== | ||
- | * WiFi. Use the script that builds firmware based on esp-hosted. | + | * WiFi. Use the script that builds firmware based on esp-hosted. |
* Writing to FLASH and using ESP FLASH partition table. Driver based on linux IPC sends FLASH-related requests to the firmware. Default configuration has an etc partition that is flashed with /etc file system and mounted at boot time. The file system is writable and it can be used to store things like wpa_supplicant.conf, | * Writing to FLASH and using ESP FLASH partition table. Driver based on linux IPC sends FLASH-related requests to the firmware. Default configuration has an etc partition that is flashed with /etc file system and mounted at boot time. The file system is writable and it can be used to store things like wpa_supplicant.conf, | ||
+ | * USB serial. It is visible as the / | ||
+ | * GPIO, including interrupts. Software I2C over GPIO and software SPI over GPIO. | ||
+ | * hardware SPI. Tested clock speed up to 20MHz with SD card. | ||
+ | * clock frequency detection. CPU, XTAL and APB clocks may be preset by the bootloader, the kernel will understand and use preset frequencies without additional configuration. | ||
* ssh server and ssh client. There' | * ssh server and ssh client. There' | ||
* mounting NFS shares. | * mounting NFS shares. | ||
- | * running executable code from outside the rootfs, e.g. from /etc or from NFS mounts. | + | * running executable code from outside the rootfs, e.g. from /etc or from NFS mounts. |
- | * USB serial. It is visible | + | * passing command line from bootloader to the kernel. Bootloader reads the file / |
- | * passing command line from bootloader to the kernel. Bootloader reads the file / | + | * strace (a one-line fix is needed for the mainline strace to correctly handle the initial exec). |
+ | * perf stat (heavy patching is needed to build it for nommu). -D1 is needed to properly enable events (perf relies on ability to run code after the fork but before the exec in the child process to manage events on systems with mmu, -D1 looks like a good workaround for nommu case). | ||
+ | * c++ exceptions, c cleanup routines, forced stack unwinding, unwinding over signal frames. | ||
+ | * TLS and NPTL. Some corner cases still need attention though. | ||
===== Things that don't work ===== | ===== Things that don't work ===== | ||
- | * c++ exceptions. Not yet. | + | * 193 failing tests in the gcc testsuite, 340 failing tests in the g++ testsuite. This is now mostly on par with the regular xtensa ELF toolchain. |
- | * NPTL. Not yet. | + | * mmap with MAP_FIXED flag. By design of the nommu linux, but it seems to me that it doesn' |
- | * mmap with MAP_FIXED flag. By design of the nommu linux, but it seems to me that it doesn' | + | |
* tcpdump and libpcap in general. It tries to mmap the packet socket and it's missing a few things (mm/nommu.c doesn' | * tcpdump and libpcap in general. It tries to mmap the packet socket and it's missing a few things (mm/nommu.c doesn' | ||
* bluetooth. It requires heavy userspace support that includes dbus which wants fork. Looks like it can be worked around, but the amount of bloat is discouraging. | * bluetooth. It requires heavy userspace support that includes dbus which wants fork. Looks like it can be worked around, but the amount of bloat is discouraging. | ||
+ | * perf record. It requires mmapping perf events and the kernel code somewhat relies on the presence of mmu. I've tried to add a workaround, but something is still missing. | ||
===== Building/ | ===== Building/ | ||
Line 60: | Line 75: | ||
$ CT_PREFIX=`pwd`/ | $ CT_PREFIX=`pwd`/ | ||
$ popd | $ popd | ||
- | </ | ||
- | |||
- | It doesn' | ||
- | < | ||
- | ... | ||
- | [INFO ] Installing final gcc compiler: done in 572.47s (at 29:47) | ||
- | [INFO ] ================================================================= | ||
- | [INFO ] Checking dynamic linker symlinks | ||
- | [EXTRA] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | [ERROR] | ||
- | ... | ||
</ | </ | ||
Line 89: | Line 80: | ||
< | < | ||
- | $ git clone https:// | + | $ git clone https:// |
$ nice make -C buildroot O=`pwd`/ | $ nice make -C buildroot O=`pwd`/ | ||
$ buildroot/ | $ buildroot/ | ||
Line 100: | Line 91: | ||
< | < | ||
- | $ git clone https:// | + | $ git clone https:// |
- | $ pushd esp-idf | + | $ pushd esp-hosted/ |
+ | $ cmake . | ||
+ | $ cd esp-idf | ||
$ . export.sh | $ . export.sh | ||
- | $ cd examples/get-started/ | + | $ cd ../network_adapter |
$ idf.py set-target esp32s3 | $ idf.py set-target esp32s3 | ||
$ cp sdkconfig.defaults.esp32s3 sdkconfig | $ cp sdkconfig.defaults.esp32s3 sdkconfig |
etc/users/jcmvbkbc/linux-xtensa/esp32s3.1695493358.txt.gz · Last modified: 2023/09/23 21:22 by jcmvbkbc