-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes: * Currently builds against https://github.com/duncandrennan/esp-idf.git which has ESP-IDF v4.3.1 (latest stable release that supports ESP32-C3) * rom.bin/elf are copied from esp32 folder and most likely not correct
- Loading branch information
1 parent
6255d3d
commit c5e5291
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
FROM ubuntu:bionic-20190807 | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \ | ||
apt-utils autoconf bison build-essential flex gawk gdb-multiarch git gperf help2man \ | ||
libexpat-dev libncurses5-dev libtool-bin \ | ||
python python-dev python-git python-pyelftools python-serial python-six python-yaml \ | ||
python3 python3-dev python3-git python3-pyelftools python3-serial python3-six python3-yaml \ | ||
software-properties-common texinfo unzip wget zip && \ | ||
apt-get clean | ||
|
||
RUN cd /tmp && \ | ||
git clone https://github.com/rojer/fsync-stub && \ | ||
cd /tmp/fsync-stub && ./install.sh && \ | ||
rm -rf /tmp/fsync-stub | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q \ | ||
python-click python3-click \ | ||
python-cryptography python3-cryptography \ | ||
python-future python3-future \ | ||
python-pkg-resources python3-pkg-resources \ | ||
python-pyparsing python3-pyparsing \ | ||
python-setuptools python3-setuptools \ | ||
python-pip python3-pip \ | ||
rsync && \ | ||
apt-get clean | ||
|
||
RUN pip install reedsolo bitstring ecdsa | ||
|
||
RUN useradd -d /opt/Espressif -m -s /bin/bash user && chown -R user /opt | ||
|
||
ARG TOOLCHAIN_VERSION | ||
RUN cd /opt/Espressif && wget -q https://dl.espressif.com/dl/$TOOLCHAIN_VERSION.tar.gz && \ | ||
tar xzf $TOOLCHAIN_VERSION.tar.gz && \ | ||
rm $TOOLCHAIN_VERSION.tar.gz | ||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/Espressif/riscv32-esp-elf/bin | ||
ADD ct_path.sh /etc/profile.d | ||
|
||
ARG DOCKER_TAG | ||
RUN git clone -j 8 --branch $DOCKER_TAG --depth 1 --recursive --shallow-submodules https://github.com/duncandrennan/esp-idf.git /opt/Espressif/esp-idf | ||
RUN cd /opt/Espressif/esp-idf && git tag v$DOCKER_TAG | ||
ENV IDF_PATH=/opt/Espressif/esp-idf | ||
|
||
# Apply submodule patches. | ||
#RUN cd $IDF_PATH && ./patch_submodules.sh | ||
|
||
# Pre-build configuration tools | ||
RUN cd $IDF_PATH/tools/kconfig && make conf-idf | ||
|
||
ADD rom.bin rom.elf /opt/Espressif/rom/ | ||
|
||
ADD mgos_fw_meta.py mklfs mkspiffs mkspiffs8 /usr/local/bin/ | ||
ADD serve_core/ /opt/serve_core/ | ||
RUN ln -s /opt/serve_core/serve_core.py /usr/local/bin/serve_core.py | ||
|
||
ARG DOCKER_TAG | ||
ENV MGOS_TARGET_GDB /opt/Espressif/riscv32-esp-elf/bin/riscv32-esp-elf-gdb | ||
ENV MGOS_SDK_REVISION $DOCKER_TAG | ||
ENV MGOS_SDK_BUILD_IMAGE docker.io/mgos/esp32c3-build:$DOCKER_TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DOCKERFILES = esp32c3-build | ||
SPIFFS_CONFIG_PATH = /vfs-fs-spiffs/include/esp32 | ||
TOOLCHAIN_VERSION = riscv32-esp-elf-gcc8_4_0-esp-2021r2-linux-amd64 | ||
DOCKER_FLAGS = --build-arg=TOOLCHAIN_VERSION=$(TOOLCHAIN_VERSION) \ | ||
--build-arg=DOCKER_TAG=$(DOCKER_TAG) | ||
|
||
include ../docker.mk | ||
|
||
docker-pre-build-esp32c3-build: mgos_fw_meta.py serve_core mklfs mkspiffs mkspiffs8 | ||
|
||
clean: clean-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export PATH="$PATH:/opt/Espressif/riscv32-esp-elf/bin" | ||
export SDK_PATH=/opt/Espressif/esp-idf |
Binary file not shown.
Binary file not shown.