mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
2 more checks to disable in order to use OTA for non APP data partitions
This commit is contained in:
parent
9647840b68
commit
1d38ce7b88
@ -452,10 +452,13 @@ esp_err_t esp_https_ota_get_img_desc(esp_https_ota_handle_t https_ota_handle, es
|
||||
|
||||
const int app_desc_offset = sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t);
|
||||
esp_app_desc_t *app_info = (esp_app_desc_t *) &handle->ota_upgrade_buf[app_desc_offset];
|
||||
if(handle->update_partition->type == ESP_PARTITION_TYPE_APP)
|
||||
{
|
||||
if (app_info->magic_word != ESP_APP_DESC_MAGIC_WORD) {
|
||||
ESP_LOGE(TAG, "Incorrect app descriptor magic");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(new_app_info, app_info, sizeof(esp_app_desc_t));
|
||||
return ESP_OK;
|
||||
@ -528,10 +531,13 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
|
||||
return ESP_FAIL;
|
||||
}
|
||||
#endif // CONFIG_ESP_HTTPS_OTA_DECRYPT_CB
|
||||
if(handle->update_partition->type == ESP_PARTITION_TYPE_APP)
|
||||
{
|
||||
err = esp_ota_verify_chip_id(data_buf);
|
||||
if (err != ESP_OK) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
return _ota_write(handle, data_buf, binary_file_len);
|
||||
case ESP_HTTPS_OTA_IN_PROGRESS:
|
||||
data_read = esp_http_client_read(handle->http_client,
|
||||
|
Loading…
Reference in New Issue
Block a user