mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
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 <damien@micropython.org>
This commit is contained in:
@@ -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 $@"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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.)
|
||||
|
||||
@@ -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
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user