@@ -30,7 +30,7 @@ RUN apt-get install -y -qq \
3030 bison \
3131 gperf \
3232 libncurses5-dev \
33- make
33+ make
3434
3535RUN mkdir /tools
3636WORKDIR /tools
@@ -96,6 +96,27 @@ RUN mkdir xtensa-esp32-elf-gcc && \
9696 curl -s -L "https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_2_0-esp32-2019r1-rc2-linux-amd64.tar.xz" \
9797 | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ
9898
99+ RUN apt-get install -y -qq --no-install-recommends \
100+ git bison gperf python python-pip python-setuptools make cmake ninja-build ccache libffi-dev libssl-dev libusb-1.0
101+ RUN git clone --depth 1 --shallow-submodules --recursive https://github.com/espressif/esp-idf.git
102+ # This is unfortunatly going to re-download some of the same toolchains, but will only be used in the context of esp-idf
103+ RUN bash -c "\
104+ cd esp-idf && \
105+ ./install.sh"
106+
107+ # We run this is generate the default bootloader and partition table binaries
108+ RUN bash -c "\
109+ cd esp-idf && \
110+ source ./export.sh && \
111+ cd examples/get-started/hello_world && \
112+ make defconfig && \
113+ echo " CONFIG_ESPTOOLPY_FLASHMODE_DOUT=y" >> sdkconfig && \
114+ idf.py bootloader partition_table"
115+
116+ RUN mkdir /tools/blobs
117+ RUN cp /tools/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader.bin /tools/blobs/
118+ RUN cp /tools/esp-idf/examples/get-started/hello_world/build/partition_table/partition-table.bin /tools/blobs/
119+
99120
100121# ##############################################################################
101122# Final Docker image used for running CI system. This includes all toolchains
@@ -109,6 +130,8 @@ RUN dpkg --add-architecture i386
109130RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
110131 git \
111132 build-essential \
133+ gcc \
134+ gcc-multilib \
112135 wget \
113136 libx11-dev \
114137 libxext-dev \
@@ -117,6 +140,7 @@ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
117140 libc6-dev-i386 \
118141 libx11-dev:i386 \
119142 libxext-dev:i386 \
143+ linux-libc-dev:i386 \
120144 curl \
121145 gettext \
122146 libcurl4-openssl-dev \
@@ -161,6 +185,8 @@ ENV PATH="/tools/riscv64-unknown-elf-gcc/bin:$PATH"
161185# ESP32 toolchain
162186COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp32-elf-gcc/ xtensa-esp32-elf-gcc/
163187ENV PATH="/tools/xtensa-esp32-elf-gcc/bin:$PATH"
188+ RUN mkdir -p /tools/blobs/esp32core
189+ COPY --from=nuttx-toolchain-esp32 /tools/blobs/* /tools/blobs/esp32core/
164190RUN pip3 install esptool
165191
166192ENTRYPOINT [ "/bin/bash" ]
0 commit comments