From 654ff2e7c3d2085ef801b04766ed48761cd71cb1 Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Mon, 26 Jul 2021 19:20:16 +0200 Subject: [PATCH] Deploy script - set correct hashes with esptool --- firmware/deploy.py | 72 ++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/firmware/deploy.py b/firmware/deploy.py index 0662eac..e4a4bda 100644 --- a/firmware/deploy.py +++ b/firmware/deploy.py @@ -1,19 +1,14 @@ import struct -import locale from collections import namedtuple from datetime import datetime import subprocess from distutils.version import StrictVersion -import subprocess +from esptool import LoadFirmwareImage # required to get hash and checksum right import os -#locale.setlocale(locale.LC_ALL, 'en_US') +# locale.setlocale(locale.LC_ALL, 'en_US') -# sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t) -APP_DESC_OFFSET = 32 - -# sizeof(esp_app_desc_t) -APP_DESC_SIZE = 256 +APP_DESC_SIZE = 256 # sizeof(esp_app_desc_t) APP_DESC_STRUCT = "