From 35db52938c2e55382b7d56f0f1b70463832084ab Mon Sep 17 00:00:00 2001 From: Pieter Geelen Date: Sun, 22 Jun 2025 16:42:35 +0200 Subject: [PATCH] Nearly working --- Dockerfile | 24 ++++++++++++++++++++++++ Taskfile.yml | 18 +++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9d23c31 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + sudo git curl wget python3 python3-pip cmake ninja-build \ + python3-venv python3-serial libffi-dev libssl-dev \ + libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* + +# Install Task binary +RUN curl -sL https://taskfile.dev/install.sh | sh -s -- -d -b /usr/local/bin + +# Set workspace +WORKDIR /workspace + +# Copy your Taskfile and required scripts +COPY . . + +# Pre-pull ESP-IDF so we avoid repeating this +RUN task buildFirmware || true + +CMD ["cp", "-r", "/workspace/esp-idf/examples/openthread/ot_rcp/build", "/out"] + diff --git a/Taskfile.yml b/Taskfile.yml index d694a3b..d9fca97 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -28,9 +28,21 @@ tasks: dir: esp-idf/examples/openthread/ot_rcp interactive: true cmds: - - idf.py set-target esp32h2 - - idf.py menuconfig # this opens an interactive tool to create settings, make sure to save the options. This set the bootloader settings, essential for compilation - - idf.py build + - echo "Injecting sdkconfig.defaults..." + - | + cat << 'EOF' > sdkconfig.defaults + CONFIG_IDF_TARGET="esp32h2" + CONFIG_OPENTHREAD_RCP=y + CONFIG_OPENTHREAD_NCP=n + CONFIG_OPENTHREAD_NCP_SPI_ENABLE=n + CONFIG_OPENTHREAD_NCP_UART_ENABLE=n + CONFIG_BT_ENABLED=n + CONFIG_WIFI_ENABLED=n + CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y + CONFIG_PARTITION_TABLE_CUSTOM=y + EOF + - > + bash -c "source ../../../export.sh && idf.py -DSDKCONFIG_DEFAULTS=\"sdkconfig.defaults\" set-target esp32h2 build" _flash_firmware_from_build: internal: true