Hi,
I managed to remove ~100KBytes off the ESP32 MicroPython image, which is nice if you want OTA upgrades and a file system that's larger than a megabyte. Also good for 2-MB systems.
I did this by removing support for PPP, IPv6, FAT, Ethernet, network loopback, threading, zlib and json. Dropping IPv6 support requires some annoying #ifdef hacks in ESP-IDF.
Be aware that flashing this image trashes your file system, as the partition layout changes.
Available at https://github.com/smurfix/micropython/tree/shrink, plus https://github.com/smurfix/micropython/esp-idf etc.
ESP32 OTA image shrinkage
Re: ESP32 OTA image shrinkage
If the btree module is still included: that one consumes about 20k.