From e2a20e1631ad8f135d530949912140821ae1634e Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 19 Oct 2022 11:23:00 +0700 Subject: [PATCH] tools: Docker: add QEMU with xtensa chip support Closes https://github.com/espressif/esp-idf-ci-action/issues/22 --- tools/docker/Dockerfile | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 447cb76f846..ccfd7f9fd66 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -80,7 +80,27 @@ ENV IDF_PYTHON_CHECK_CONSTRAINTS=no # Ccache is installed, enable it by default ENV IDF_CCACHE_ENABLE=1 -COPY entrypoint.sh /opt/esp/entrypoint.sh +# Install QEMU runtime dependencies +RUN : \ + && apt-get update && apt-get install -y -q \ + libglib2.0-0 \ + libpixman-1-0 \ + && rm -rf /var/lib/apt/lists/* \ + && : + +# Install QEMU +ARG QEMU_VER=esp-develop-20220919 +ARG QEMU_DIST=qemu-${QEMU_VER}.tar.bz2 +ARG QEMU_SHA256=f6565d3f0d1e463a63a7f81aec94cce62df662bd42fc7606de4b4418ed55f870 +RUN : \ + && wget --no-verbose https://github.com/espressif/qemu/releases/download/${QEMU_VER}/${QEMU_DIST} \ + && echo "${QEMU_SHA256} *${QEMU_DIST}" | sha256sum --check --strict - \ + && tar -xf ${QEMU_DIST} -C /opt \ + && rm ${QEMU_DIST} \ + && : +ENV PATH=/opt/qemu/bin:${PATH} + +COPY entrypoint.sh /opt/esp/entrypoint.sh ENTRYPOINT [ "/opt/esp/entrypoint.sh" ] CMD [ "/bin/bash" ]