Inconsistency between bootloader and OTA update code?
Posted: Wed Nov 30, 2016 2:38 pm
Hi,
I'm trying to boot from the factory partition.
It seems the bootloader and the OTA code make different assumptions about when to boot from the factory partition:
- The OTA code (specifically, the function esp_ota_set_boot_partition) seems to assume that by erasing the otadata partition, it can select the factory partition. (See the comment "if set boot partition to factory bin ,just format ota info partition" in esp_ota_ops.c)
- The 2nd stage bootloader code (specifically, the function bootloader_main) detects erased ota_seq values (0xFFFFFFFF), "fixes" them to 01/00 and selects the ota_0 partition for booting.
Thus, if I select the factory partition for booting, the chip boots from the ota_0 partition instead.
Could you please verify this?
Thank you and greetings
Andreas
I'm trying to boot from the factory partition.
It seems the bootloader and the OTA code make different assumptions about when to boot from the factory partition:
- The OTA code (specifically, the function esp_ota_set_boot_partition) seems to assume that by erasing the otadata partition, it can select the factory partition. (See the comment "if set boot partition to factory bin ,just format ota info partition" in esp_ota_ops.c)
- The 2nd stage bootloader code (specifically, the function bootloader_main) detects erased ota_seq values (0xFFFFFFFF), "fixes" them to 01/00 and selects the ota_0 partition for booting.
Thus, if I select the factory partition for booting, the chip boots from the ota_0 partition instead.
Could you please verify this?
Thank you and greetings
Andreas