From 2824b20d7d7d2bf8d1ac19a20635cff235ee6ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 14 Mar 2022 20:04:33 +0200 Subject: [PATCH] Initial commit --- .drone.yml | 2 ++ Dockerfile | 8 ++++++++ README.md | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e7b5dfa --- /dev/null +++ b/.drone.yml @@ -0,0 +1,2 @@ +kind: template +load: docker.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d9b3477 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM larsks/esp-open-sdk +RUN yum install -y libffi-devel +RUN git clone --depth 1 -b v1.18 https://github.com/micropython/micropython.git /src +WORKDIR /src/mpy-cross +RUN make +WORKDIR /src/ports/esp8266 +RUN make submodules && make +CMD make && cp build-GENERIC/firmware-combined.bin /build/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..4045b88 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +This Docker image drastically simplifies building MicroPython binaries for ESP8266 microcontrollers with +[frozen modules](https://docs.micropython.org/en/latest/reference/manifest.html#freezing-source-code) +-- that is flashable MicroPython images that include your payload as bytecode so they're easy to deploy +and even more importantly free up precious RAM for ESP8266. + +Place your source code under `modules/` and the Docker image should pick them +up and bundle them into the resulting firmware image placed under `build/` + +``` +docker run --rm -v $PWD/modules:/src/ports/esp8266/modules -v $PWD/build:/build harbor.k-space.ee/k-space/micropython-esp8266 +```