Flash encryption with internal key generation boots with "invalid header"
Posted: Wed Oct 09, 2024 2:33 pm
Hi,
I'm struggling to write for the first time some ESP32-S3 chips with a firmware, bootloader, ... that are configured to use flash encryption in development mode with UART encryption still enabled and internal key generation.
I do quite a basic programming:
- I'm flashing with esptool (write_partition) some partitions in the ESP32-S3 (plain text),
- Then I use idf.py flash so it flashes the bootloader, ota-initial, firmware and partition table.
It reboots, then takes a while to encrypt the flash as expected, during the process I have an error that does not look blocking saying that the second OTA partition is empty:
I'm using esp-idf 5.2.3 on an ESP32-S3 chip.
Does anyone have any idea of what I'm doing wrong?
Thank you!
I'm struggling to write for the first time some ESP32-S3 chips with a firmware, bootloader, ... that are configured to use flash encryption in development mode with UART encryption still enabled and internal key generation.
I do quite a basic programming:
- I'm flashing with esptool (write_partition) some partitions in the ESP32-S3 (plain text),
- Then I use idf.py flash so it flashes the bootloader, ota-initial, firmware and partition table.
It reboots, then takes a while to encrypt the flash as expected, during the process I have an error that does not look blocking saying that the second OTA partition is empty:
When it finally reboots, it looks like nothing has been encrypted or is badly encrypted:esp_image: image at 0x410000 has invalid magic byte (nothing flashed here?)
It works well afterward when I use idf.py encrypted-flash.invalid header: 0x8630e3ac
...
I'm using esp-idf 5.2.3 on an ESP32-S3 chip.
Does anyone have any idea of what I'm doing wrong?
Thank you!