2023-12-27 12:37:22 +01:00
|
|
|
FROM mluis/qemu-esp32:latest
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
ENV IDF_TARGET=esp32
|
2023-07-25 11:53:09 +02:00
|
|
|
|
2023-12-27 12:37:22 +01:00
|
|
|
WORKDIR /root/toxcore
|
2023-07-25 11:53:09 +02:00
|
|
|
|
2023-12-27 12:37:22 +01:00
|
|
|
# Build an initial bootstrap hello world just to compile libsodium and other
|
|
|
|
# system level dependencies.
|
|
|
|
COPY other/docker/esp32/sdkconfig \
|
|
|
|
other/docker/esp32/CMakeLists.txt \
|
|
|
|
/root/toxcore/
|
|
|
|
COPY other/docker/esp32/bootstrap/ \
|
|
|
|
/root/toxcore/main/
|
|
|
|
RUN . /root/esp/esp-idf/export.sh && idf.py build
|
2023-07-25 11:53:09 +02:00
|
|
|
|
2023-12-27 12:37:22 +01:00
|
|
|
# Copy over toxcore sources and build those.
|
|
|
|
COPY third_party/cmp/ /root/toxcore/main/third_party/cmp/
|
|
|
|
COPY toxencryptsave/defines.h /root/toxcore/main/toxencryptsave/
|
|
|
|
COPY toxcore/ /root/toxcore/main/toxcore/
|
|
|
|
COPY other/docker/esp32/main/CMakeLists.txt \
|
|
|
|
/root/toxcore/main/
|
|
|
|
COPY other/docker/esp32/main/*.cc \
|
|
|
|
other/docker/esp32/main/*.h \
|
|
|
|
/root/toxcore/main/other/docker/esp32/main/
|
|
|
|
RUN touch /root/toxcore/main/CMakeLists.txt \
|
|
|
|
&& . /root/esp/esp-idf/export.sh && idf.py build
|
2023-07-25 11:53:09 +02:00
|
|
|
RUN ls -lh build/toxcore.bin \
|
2023-12-27 12:37:22 +01:00
|
|
|
&& sha512sum build/toxcore.bin
|
|
|
|
RUN /root/flash.sh build/toxcore.bin
|
|
|
|
|
|
|
|
COPY other/docker/esp32/qemu-test /root/toxcore/
|
|
|
|
RUN ["/root/toxcore/qemu-test"]
|