From 53052857e2e5845cbf78f778d40ccd59f4f2e3ef Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 10 Dec 2025 11:47:25 +1100 Subject: [PATCH] esp8266/boards/ESP8266_GENERIC: Remove OTA board variant. The OTA variant of the ESP8266_GENERIC board was never fully completed in its functionality. It relies on the https://github.com/pfalcon/yaota8266 component which was also never fully finished and has been unmaintained for many years. This commit removes this variant and it's associated build support. It makes it an "old_variant" so the existing historical firmware is still listed on the download page. Signed-off-by: Damien George --- ports/esp8266/Makefile | 10 ---------- ports/esp8266/boards/ESP8266_GENERIC/board.json | 4 +++- ports/esp8266/boards/ESP8266_GENERIC/board.md | 10 ---------- .../boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk | 10 ---------- ports/esp8266/modesp.c | 9 --------- 5 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile index 1c9de01503..abdc9076a0 100644 --- a/ports/esp8266/Makefile +++ b/ports/esp8266/Makefile @@ -208,20 +208,10 @@ erase: reset: echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT) -ifeq ($(BOARD_VARIANT),OTA) -$(FWBIN): $(BUILD)/firmware.elf - $(ECHO) "Create $@" - $(Q)$(ESPTOOL) elf2image $^ - $(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $(BUILD)/firmware-ota.bin - - $(Q)cat $(YAOTA8266)/yaota8266.bin $(BUILD)/firmware-ota.bin > $@ - $(Q)$(PYTHON) $(YAOTA8266)/ota-client/ota_client.py sign $@ -else $(FWBIN): $(BUILD)/firmware.elf $(ECHO) "Create $@" $(Q)$(ESPTOOL) elf2image $^ $(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $@ -endif $(BUILD)/firmware.elf: $(OBJ) $(ECHO) "LINK $@" diff --git a/ports/esp8266/boards/ESP8266_GENERIC/board.json b/ports/esp8266/boards/ESP8266_GENERIC/board.json index 8f2aa1240f..84c4ff4951 100644 --- a/ports/esp8266/boards/ESP8266_GENERIC/board.json +++ b/ports/esp8266/boards/ESP8266_GENERIC/board.json @@ -15,10 +15,12 @@ "thumbnail": "", "url": "https://www.espressif.com/en/products/modules", "variants": { - "OTA": "OTA compatible", "FLASH_1M": "1MiB flash", "FLASH_512K": "512kiB flash", "FLASH_2M_ROMFS": "2MiB flash with ROMFS" }, + "old_variants": { + "OTA": ["OTA compatible", "OTA firmware is no longer supported."] + }, "vendor": "Espressif" } diff --git a/ports/esp8266/boards/ESP8266_GENERIC/board.md b/ports/esp8266/boards/ESP8266_GENERIC/board.md index e8d63fcead..b83d2910cd 100644 --- a/ports/esp8266/boards/ESP8266_GENERIC/board.md +++ b/ports/esp8266/boards/ESP8266_GENERIC/board.md @@ -14,13 +14,3 @@ Note: v1.12-334 and newer (including v1.13) require an ESP8266 module with upgrading from older firmware please backup your files first, and either erase all flash before upgrading, or after upgrading execute `vfs.VfsLfs2.mkfs(bdev)`. - -### OTA builds -Over-The-Air (OTA) builds of the ESP8266 firmware are also provided. - -The first time you use this build you need to flash one of the "initial image" -images using esptool.py as described above. After that, you can update the -firmware over the air using the "OTA update" file in conjunction with the -ota-client script from yaota8266. The "OTA update" files are digitally signed -and will only work with the provided "initial image" files, and vice versa. -(Note: this feature is work-in-progress.) diff --git a/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk b/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk deleted file mode 100644 index 759eab3dc7..0000000000 --- a/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk +++ /dev/null @@ -1,10 +0,0 @@ -LD_FILES = boards/esp8266_ota.ld - -MICROPY_PY_ESPNOW ?= 1 -MICROPY_PY_BTREE ?= 1 -MICROPY_VFS_LFS2 ?= 1 - -# Note: Implicitly uses the port manifest. - -# Configure mpconfigboard.h. -CFLAGS += -DMICROPY_ESP8266_1M diff --git a/ports/esp8266/modesp.c b/ports/esp8266/modesp.c index e1f9d39687..724545202d 100644 --- a/ports/esp8266/modesp.c +++ b/ports/esp8266/modesp.c @@ -159,10 +159,6 @@ static mp_obj_t esp_flash_size(void) { } static MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size); -// If there's just 1 loadable segment at the start of flash, -// we assume there's a yaota8266 bootloader. -#define IS_OTA_FIRMWARE() ((*(uint32_t *)0x40200000 & 0xff00) == 0x100) - extern byte _firmware_size[]; #if MICROPY_VFS_ROM_IOCTL extern uint8_t _micropy_hw_romfs_part0_size; @@ -180,11 +176,6 @@ static MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_user_start_obj, esp_flash_user_start) static mp_obj_t esp_check_fw(void) { MD5_CTX ctx; char *fw_start = (char *)0x40200000; - if (IS_OTA_FIRMWARE()) { - // Skip yaota8266 bootloader - fw_start += 0x3c000; - } - uint32_t size = *(uint32_t *)(fw_start + 0x8ffc); printf("size: %d\n", size); if (size > 1024 * 1024) {