Secure boot invalid header: 0xffffffff error.

Vaibhav02
Posts: 32
Joined: Wed Sep 04, 2024 8:09 am

Secure boot invalid header: 0xffffffff error.

Postby Vaibhav02 » Mon Jun 09, 2025 9:57 am

I have read flash encryption and secure boot documentation of esp idf. But there are different documentations. I tried this but I brick my 3 devices.

Now I am trying this on qume.

This says that my secure boot signing is successful.

Code: Select all

vaibhav@Amset8:~/esp32_secure_boot/hello_world$ espsecure.py signature_info_v2 bootloader-signed.bin
espsecure.py v4.9.dev8
Signature block 0 is valid (RSA).
Public key digest for block 0: d1 30 2b a7 2c e3 d3 e1 33 2f 98 e1 11 29 b0 f8 9e e4 51 9b 2c 86 6e 2c 2f 51 e5 78 40 8a 7b 90
Signature block 1 absent/invalid. Skipping checking next blocks.
vaibhav@Amset8:~/esp32_secure_boot/hello_world$ espsecure.py signature_info_v2 build/bootloader/bootloader.bin
espsecure.py v4.9.dev8
Signature block 0 is valid (RSA).
Public key digest for block 0: d1 30 2b a7 2c e3 d3 e1 33 2f 98 e1 11 29 b0 f8 9e e4 51 9b 2c 86 6e 2c 2f 51 e5 78 40 8a 7b 90
Signature block 1 absent/invalid. Skipping checking next blocks.
vaibhav@Amset8:~/esp32_secure_boot/hello_world$ espsecure.py signature_info_v2 build/hello_world.bin
espsecure.py v4.9.dev8
Signature block 0 is valid (RSA).
Public key digest for block 0: d1 30 2b a7 2c e3 d3 e1 33 2f 98 e1 11 29 b0 f8 9e e4 51 9b 2c 86 6e 2c 2f 51 e5 78 40 8a 7b 90
Signature block 1 absent/invalid. Skipping checking next blocks.
The Partition Table :

Code: Select all

Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0xe000,24K,
phy_init,data,phy,0x14000,4K,
factory,app,factory,0x20000,1M,
*******************************************************************************
The Build config:

Code: Select all

Executing action: all (aliases: build)
Running ninja in directory /home/vaibhav/esp32_secure_boot/hello_world/build
Executing "ninja all"...
[1/4] cd /home/vaibhav/esp32_secure_boot/hello_world/build/esp-idf/esptool_py && /home/vaibhav/.espressif/python_env/...llo_world/build/partition_table/partition-table.bin /home/vaibhav/esp32_secure_boot/hello_world/build/hello_world.bi
hello_world.bin binary size 0x31000 bytes. Smallest app partition is 0x100000 bytes. 0xcf000 bytes (81%) free.
[1/2] cd /home/vaibhav/esp32_secure_boot/hello_world/build/bootloader/esp-idf/esptool_py && /home/vaibhav/.espressif/...izes.py --offset 0xd000 bootloader 0x1000 /home/vaibhav/esp32_secure_boot/hello_world/build/bootloader/bootloader.bi
Bootloader binary size 0xb000 bytes. 0x1000 bytes (8%) free.
[2/2] cd /home/vaibhav/esp32_secure_boot/hello_world/build/bootloader/esp-idf/esptool_py && /home/vaibhav/.espressif/...izes.py --offset 0xd000 bootloader 0x1000 /home/vaibhav/esp32_secure_boot/hello_world/build/bootloader/bootloader.bi
Bootloader binary size 0xb000 bytes. 0x1000 bytes (8%) free.
[4/4] Completed 'bootloader'
Project build complete. To flash, run:
 idf.py flash
or
 idf.py -p PORT flash
or
 python -m esptool --chip esp32 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size keep --flash_freq 40m 0xd000 build/partition_table/partition-table.bin 0x20000 build/hello_world.bin
or from the "/home/vaibhav/esp32_secure_boot/hello_world/build" directory
 python -m esptool --chip esp32 -b 460800 --before default_reset --after no_reset write_flash "@flash_args"
As per the documentation we have to use the esptool.py command to proceed with the next step , but this command is for hardware but i want its QEMU emulator altenative, Suggest me if you have encountered this type of problem.

Code: Select all

esptool.py --chip esp32 -b 460800 --before default_reset --after no_reset write_flash \
  0x1000 bootloader-signed.bin \
  0xd000 build/partition_table/partition-table.bin \
  0x20000 hello_world-signed.bin
Which command should i use for QEMU?

Who is online

Users browsing this forum: Barkrowler and 2 guests