Automated script to build MicroPython for the ESP32

The following script installs esp-idf, the required dependencies and then builds MicroPython for the ESP32.

apt -y update && apt -y install python3 python3-pip cmake
# Install esp-idf
git clone --depth 1 -b v4.4.3 https://github.com/espressif/esp-idf.git /opt/esp-idf
cd /opt/esp-idf && git submodule update --init --recursive && ./install.sh

# Clone micropython
git clone --depth 1 -b v1.19.1 https://github.com/micropython/micropython.git /opt/micropython

# Build micropython
cd /opt/micropython/ && make -C mpy-cross
# Build micropython@esp32
cd /opt/micropython/ports/esp32 && source /opt/esp-idf/export.sh && make submodules && make -j4