feat(v2): OTA firmware update over Ethernet
POST /ota writes the image to the idle app slot and reboots; GET /ota reports the running slot. App rollback is enabled, and a new image confirms itself after 10 s. Adds make ota HOST=<ip>, tools/ota.py and the led-tool --ota update. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d78af1246
commit
6c16998691
8 files changed
+212
-4
No files matched your search
@@ -23,12 +23,13 @@ TTY := $(shell [ -t 0 ] && echo -it)
|
||||
OWNER := $(shell docker info --format '{{.SecurityOptions}}' 2>/dev/null | grep -q rootless && echo 0:0 || echo $$(id -u):$$(id -g))
|
||||
FIX_OWNER = chown -R $(OWNER) /project
|
||||
|
||||
.PHONY: help web build flash monitor flash-monitor log size menuconfig clean fullclean erase test test-driver test-envelope
|
||||
.PHONY: help web build flash ota monitor flash-monitor log size menuconfig clean fullclean erase test test-driver test-envelope
|
||||
|
||||
help:
|
||||
@echo "v2 controller (ESP32-S3):"
|
||||
@echo " make build minify + gzip the web UI, then build the firmware"
|
||||
@echo " make flash flash firmware and web UI to PORT ($(PORT))"
|
||||
@echo " make ota HOST=ip build, then upload the firmware over Ethernet (no USB)"
|
||||
@echo " make monitor serial console on PORT (Ctrl-] to quit)"
|
||||
@echo " make flash-monitor flash, then open the console"
|
||||
@echo " make log [SECS=10] print the console for SECS seconds and exit (no terminal needed)"
|
||||
@@ -52,6 +53,10 @@ build: web
|
||||
flash: build
|
||||
$(DOCKER_RUN) $(DEVICE) $(IDF_IMAGE) bash -c 'idf.py -p $(PORT) flash; rc=$$?; $(FIX_OWNER); exit $$rc'
|
||||
|
||||
ota: build
|
||||
@test -n "$(HOST)" || { echo "usage: make ota HOST=<controller ip>"; exit 1; }
|
||||
python3 $(V2)/tools/ota.py $(HOST) $(V2)/build/led_controller_v2.bin
|
||||
|
||||
monitor:
|
||||
$(DOCKER_RUN) $(TTY) $(DEVICE) $(IDF_IMAGE) idf.py -p $(PORT) monitor
|
||||
|
||||
|
||||
Reference in new issue
Block a user