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
@@ -26,6 +26,7 @@
|
||||
#include "rel.h"
|
||||
#include "web.h"
|
||||
#include "audio.h"
|
||||
#include "ota.h"
|
||||
|
||||
static const char *TAG = "eth";
|
||||
|
||||
@@ -88,6 +89,7 @@ static void start_webserver(void)
|
||||
httpd_register_uri_handler(s_server, &status_uri);
|
||||
web_register(s_server);
|
||||
audio_register(s_server);
|
||||
ota_register(s_server);
|
||||
api_register(s_server);
|
||||
ESP_LOGI(TAG, "HTTP server started on port %d", config.server_port);
|
||||
}
|
||||
@@ -215,6 +217,7 @@ void app_main(void)
|
||||
}
|
||||
ESP_ERROR_CHECK(ret);
|
||||
|
||||
ota_confirm_later();
|
||||
ESP_ERROR_CHECK(store_init());
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
Reference in new issue
Block a user