Page 1 of 1

Inconsistency between bootloader and OTA update code?

Posted: Wed Nov 30, 2016 2:38 pm
by aschweiz
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

Re: Inconsistency between bootloader and OTA update code?

Posted: Wed Nov 30, 2016 9:09 pm
by ESP_igrr
Hi Andreas,
Thanks for reporting this. Yes, this may be a bug. I'll check with the team how this was supposed to work.