Skip to content

Commit

Permalink
riscv/espressif/bootloader/mcuboot: Sign image with MCUBoot version
Browse files Browse the repository at this point in the history
Add version signature to MCUBoot compatible image on espressif RISC-V architecture

Signed-off-by: Davi Diogo  <[email protected]>
  • Loading branch information
engdavidiogo authored and pkarashchenko committed Nov 13, 2024
1 parent 3ae822c commit d6a73a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions arch/risc-v/src/common/espressif/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/espressif/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6a73a4

Please sign in to comment.