Inconsistency between bootloader and OTA update code?

aschweiz
Posts: 22
Joined: Wed Nov 30, 2016 1:57 pm

Inconsistency between bootloader and OTA update code?

Postby aschweiz » 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

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Inconsistency between bootloader and OTA update code?

Postby ESP_igrr » Wed Nov 30, 2016 9:09 pm

Hi Andreas,
Thanks for reporting this. Yes, this may be a bug. I'll check with the team how this was supposed to work.

Who is online

Users browsing this forum: No registered users and 7 guests