esp-idf v3: account for optional SHA256 when walking segments
This commit is contained in:
parent
c2abf59c68
commit
58195fbc1e
1 changed files with 6 additions and 1 deletions
|
@ -1613,7 +1613,12 @@ lws_esp32_get_image_info(const esp_partition_t *part, struct lws_esp32_image *i,
|
|||
}
|
||||
hdr += (~hdr & 15) + 1;
|
||||
|
||||
i->romfs = hdr + 4;
|
||||
if (eih.hash_appended)
|
||||
hdr += 0x20;
|
||||
|
||||
// lwsl_notice("romfs estimated at 0x%x\n", hdr);
|
||||
|
||||
i->romfs = hdr + 0x4;
|
||||
spi_flash_read(hdr, &i->romfs_len, sizeof(i->romfs_len));
|
||||
i->json = i->romfs + i->romfs_len + 4;
|
||||
spi_flash_read(i->json - 4, &i->json_len, sizeof(i->json_len));
|
||||
|
|
Loading…
Add table
Reference in a new issue