Files
tfaour 474b92a282
Build and push server image / test (push) Successful in 45s
Firmware build check / build-check (push) Successful in 2m50s
Build and push server image / build-and-push (push) Successful in 4m36s
Build and push server image / deploy (push) Failing after 1m34s
Add server-side support for a second panel (13.3in Spectra 6 / EE02) and scaffold its firmware target
Server: Frame.panel_type (new column + migration) is auto-derived from
the device's reported board (X-Frame-Board), never user-set -- the
panel is a property of the hardware, not a picker in the UI.
image_pipeline's packing/render pipeline is parameterized by panel
geometry instead of hardcoded 800x480 globals, with the real confirmed
13.3in geometry (1600x1200) registered alongside the original 7.3in
panel. Existing 7.3in frames are unaffected (column default + board
mapping both resolve to the original panel).

Board identifiers are also renamed (devkit/xiao -> devkit_esp32c6/
xiao_esp32c6, plus new "ee02") since the EE02 board also carries a XIAO
module -- "xiao" alone stopped disambiguating hardware. The server
keeps accepting the legacy bare names indefinitely for already-flashed
devices.

Firmware: scaffolds a third build target (ee02, ESP32-S3 -- a real
chip-target change, not just a same-chip Kconfig variant like xiao) and
a new epd13in3e driver component skeleton. The actual panel init/LUT/
refresh register sequence isn't ported from vendor demo code yet (none
was available), so that component deliberately fails to compile
(#error) rather than risk sending unverified register values to real
hardware -- devkit/xiao are unaffected and build identically to before.
CI's ee02 build step is continue-on-error for the same reason.
2026-08-04 20:08:22 +00:00

60 lines
2.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# One-time (idempotent) environment bootstrap for compiling the
# espresso_frame firmware (firmware/) without Docker -- see this
# skill's SKILL.md for why not Docker, even though that's what CI uses.
# Re-run any time; every step is safe/fast to repeat once already done.
set -euo pipefail
IDF_ROOT="$HOME/.espressif-idf"
IDF_DIR="$IDF_ROOT/esp-idf"
# Matches the espressif/idf:release-v6.0 image CI's
# firmware-build-check.yml/firmware-release-build.yml use -- keep this
# in sync with those workflow files if the project's pinned IDF version
# ever changes.
IDF_BRANCH="release/v6.0"
# 1. OS packages ESP-IDF's own install.sh needs (python3 + venv/pip,
# cmake, ninja, a C toolchain for the odd host-side code generator, git
# for the clone below, flex/bison/gperf for mbedtls/etc.'s generated
# parsers, libusb for esptool's USB/JTAG bits even though this skill
# doesn't flash real hardware). Installed via apt with real root --
# unlike run-server's Chromium bootstrap, this container actually has
# root and a working apt, so no non-root extraction dance is needed
# here.
PKGS="git python3 python3-venv python3-pip cmake ninja-build ccache libusb-1.0-0 wget flex bison gperf build-essential"
missing=()
for pkg in $PKGS; do
dpkg -s "$pkg" >/dev/null 2>&1 || missing+=("$pkg")
done
if [ ${#missing[@]} -gt 0 ]; then
echo "installing OS packages: ${missing[*]}"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y "${missing[@]}"
fi
# 2. ESP-IDF checkout -- shallow, single branch, recursive submodules
# also shallow (~700MB total, vs. several GB for a full clone). Only
# clones once; re-running this script never re-clones or resets it, so
# any local changes you made for debugging survive a re-run.
if [ ! -d "$IDF_DIR/.git" ]; then
echo "cloning esp-idf $IDF_BRANCH into $IDF_DIR ..."
mkdir -p "$IDF_ROOT"
git clone --branch "$IDF_BRANCH" --depth 1 --shallow-submodules --recursive \
https://github.com/espressif/esp-idf.git "$IDF_DIR"
else
echo "esp-idf already cloned at $IDF_DIR"
fi
# 3. Toolchain + Python virtualenv, scoped to esp32c6+esp32s3 only --
# this project's two chip targets (see firmware/README.md's board
# table: devkit/xiao are esp32c6, ee02 is esp32s3). Scoping avoids
# downloading toolchains for every chip ESP-IDF supports, which matters
# given this container's disk headroom. install.sh is already
# idempotent on its own (checks what's present and skips it), so this
# always calls it rather than trying to duplicate that check here --
# a re-run only costs a few seconds once everything's cached.
echo "running esp-idf install.sh esp32c6,esp32s3 (fast if already installed) ..."
(cd "$IDF_DIR" && ./install.sh esp32c6,esp32s3)
echo "setup complete -> $IDF_DIR/export.sh (build.sh sources this for you)"