Merge branch 'bugfix/bootloader_dev_zero_app_count_v3.1' into 'release/v3.1'
bootloader: Fix issue - bs->app_count is zero but ota_data have valid entry (backport v3.1) See merge request idf/esp-idf!2847
This commit is contained in:
commit
ef38eb0323
1 changed files with 2 additions and 2 deletions
|
@ -210,8 +210,8 @@ int bootloader_utility_get_selected_boot_partition(const bootloader_state_t *bs)
|
||||||
bootloader_munmap(ota_select_map);
|
bootloader_munmap(ota_select_map);
|
||||||
|
|
||||||
ESP_LOGD(TAG, "OTA sequence values A 0x%08x B 0x%08x", sa.ota_seq, sb.ota_seq);
|
ESP_LOGD(TAG, "OTA sequence values A 0x%08x B 0x%08x", sa.ota_seq, sb.ota_seq);
|
||||||
if(sa.ota_seq == UINT32_MAX && sb.ota_seq == UINT32_MAX) {
|
if ((sa.ota_seq == UINT32_MAX && sb.ota_seq == UINT32_MAX) || (bs->app_count == 0)) {
|
||||||
ESP_LOGD(TAG, "OTA sequence numbers both empty (all-0xFF)");
|
ESP_LOGD(TAG, "OTA sequence numbers both empty (all-0xFF) or partition table does not have bootable ota_apps (app_count=%d)", bs->app_count);
|
||||||
if (bs->factory.offset != 0) {
|
if (bs->factory.offset != 0) {
|
||||||
ESP_LOGI(TAG, "Defaulting to factory image");
|
ESP_LOGI(TAG, "Defaulting to factory image");
|
||||||
return FACTORY_INDEX;
|
return FACTORY_INDEX;
|
||||||
|
|
Loading…
Reference in a new issue