1
0
Fork 0
forked from nuttx/nuttx-update

riscv/espressif/bootloader/mcuboot: Sign image with MCUBoot version

Add version signature to MCUBoot compatible image on espressif RISC-V architecture

Signed-off-by: Davi Diogo  <eng.davidiogo@gmail.com>
This commit is contained in:
Davi Diogo 2024-11-13 11:02:29 -03:00 committed by Petro Karashchenko
parent 3ae822c098
commit d6a73a46e8
2 changed files with 6 additions and 1 deletions

View file

@ -197,6 +197,11 @@ config ESPRESSIF_ESPTOOL_TARGET_SECONDARY
endchoice
config ESPRESSIF_MCUBOOT_SIGN_IMAGE_VERSION
string "Sign image version"
depends on ESPRESSIF_BOOTLOADER_MCUBOOT
default "1.0.0"
config ESPRESSIF_APP_MCUBOOT_HEADER_SIZE
int "Application image header size (in bytes)"
default 32

View file

@ -91,7 +91,7 @@ ifeq ($(CONFIG_ESPRESSIF_BOOTLOADER_MCUBOOT),y)
APP_IMAGE := nuttx.bin
FLASH_APP := $(APP_OFFSET) $(APP_IMAGE)
IMGTOOL_ALIGN_ARGS := --align 4
IMGTOOL_SIGN_ARGS := --pad $(VERIFIED) $(IMGTOOL_ALIGN_ARGS) -v 0 -s auto \
IMGTOOL_SIGN_ARGS := --pad $(VERIFIED) $(IMGTOOL_ALIGN_ARGS) -v $(CONFIG_ESPRESSIF_MCUBOOT_SIGN_IMAGE_VERSION) -s auto \
-H $(CONFIG_ESPRESSIF_APP_MCUBOOT_HEADER_SIZE) --pad-header \
-S $(CONFIG_ESPRESSIF_OTA_SLOT_SIZE)
else ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)