Skip to content

Commit 5305285

Browse files
committed
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 <[email protected]>
1 parent 9274f80 commit 5305285

File tree

5 files changed

+3
-40
lines changed

5 files changed

+3
-40
lines changed

ports/esp8266/Makefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,20 +208,10 @@ erase:
208208
reset:
209209
echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT)
210210

211-
ifeq ($(BOARD_VARIANT),OTA)
212-
$(FWBIN): $(BUILD)/firmware.elf
213-
$(ECHO) "Create $@"
214-
$(Q)$(ESPTOOL) elf2image $^
215-
$(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $(BUILD)/firmware-ota.bin
216-
217-
$(Q)cat $(YAOTA8266)/yaota8266.bin $(BUILD)/firmware-ota.bin > $@
218-
$(Q)$(PYTHON) $(YAOTA8266)/ota-client/ota_client.py sign $@
219-
else
220211
$(FWBIN): $(BUILD)/firmware.elf
221212
$(ECHO) "Create $@"
222213
$(Q)$(ESPTOOL) elf2image $^
223214
$(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $@
224-
endif
225215

226216
$(BUILD)/firmware.elf: $(OBJ)
227217
$(ECHO) "LINK $@"

ports/esp8266/boards/ESP8266_GENERIC/board.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
"thumbnail": "",
1616
"url": "https://www.espressif.com/en/products/modules",
1717
"variants": {
18-
"OTA": "OTA compatible",
1918
"FLASH_1M": "1MiB flash",
2019
"FLASH_512K": "512kiB flash",
2120
"FLASH_2M_ROMFS": "2MiB flash with ROMFS"
2221
},
22+
"old_variants": {
23+
"OTA": ["OTA compatible", "OTA firmware is no longer supported."]
24+
},
2325
"vendor": "Espressif"
2426
}

ports/esp8266/boards/ESP8266_GENERIC/board.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,3 @@ Note: v1.12-334 and newer (including v1.13) require an ESP8266 module with
1414
upgrading from older firmware please backup your files first, and either
1515
erase all flash before upgrading, or after upgrading execute
1616
`vfs.VfsLfs2.mkfs(bdev)`.
17-
18-
### OTA builds
19-
Over-The-Air (OTA) builds of the ESP8266 firmware are also provided.
20-
21-
The first time you use this build you need to flash one of the "initial image"
22-
images using esptool.py as described above. After that, you can update the
23-
firmware over the air using the "OTA update" file in conjunction with the
24-
ota-client script from yaota8266. The "OTA update" files are digitally signed
25-
and will only work with the provided "initial image" files, and vice versa.
26-
(Note: this feature is work-in-progress.)

ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_OTA.mk

Lines changed: 0 additions & 10 deletions
This file was deleted.

ports/esp8266/modesp.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ static mp_obj_t esp_flash_size(void) {
159159
}
160160
static MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
161161

162-
// If there's just 1 loadable segment at the start of flash,
163-
// we assume there's a yaota8266 bootloader.
164-
#define IS_OTA_FIRMWARE() ((*(uint32_t *)0x40200000 & 0xff00) == 0x100)
165-
166162
extern byte _firmware_size[];
167163
#if MICROPY_VFS_ROM_IOCTL
168164
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)
180176
static mp_obj_t esp_check_fw(void) {
181177
MD5_CTX ctx;
182178
char *fw_start = (char *)0x40200000;
183-
if (IS_OTA_FIRMWARE()) {
184-
// Skip yaota8266 bootloader
185-
fw_start += 0x3c000;
186-
}
187-
188179
uint32_t size = *(uint32_t *)(fw_start + 0x8ffc);
189180
printf("size: %d\n", size);
190181
if (size > 1024 * 1024) {

0 commit comments

Comments
 (0)