boot/mcuboot: Default to Tinycrypt as crypto backend
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
794cfd0c5c
commit
ea5eb0c1d0
@ -22,6 +22,15 @@ config MCUBOOT_ENABLE_LOGGING
|
||||
---help---
|
||||
Enable MCUboot's logging infrastructure.
|
||||
|
||||
choice
|
||||
prompt "Cryptographic backend"
|
||||
default MCUBOOT_USE_TINYCRYPT
|
||||
|
||||
config MCUBOOT_USE_TINYCRYPT
|
||||
bool "TinyCrypt"
|
||||
|
||||
endchoice # Cryptographic backend
|
||||
|
||||
config MCUBOOT_BOOTLOADER
|
||||
bool "MCUboot bootloader application"
|
||||
default n
|
||||
|
@ -31,4 +31,11 @@ CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboo
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include}
|
||||
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include}
|
||||
|
||||
# It allows import of MCUboot's crypto backend library headers.
|
||||
|
||||
ifeq ($(CONFIG_MCUBOOT_USE_TINYCRYPT),y)
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/ext/tinycrypt/lib/include/}
|
||||
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/ext/tinycrypt/lib/include/}
|
||||
endif
|
||||
|
||||
endif
|
||||
|
@ -73,6 +73,16 @@ ifneq ($(CONFIG_MCUBOOT_WATCHDOG),)
|
||||
CSRCS += mcuboot/boot/nuttx/src/watchdog/watchdog.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_MCUBOOT_USE_TINYCRYPT),)
|
||||
CSRCS += mcuboot/ext/tinycrypt/lib/source/aes_encrypt.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/aes_decrypt.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/ctr_mode.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/hmac.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/ecc_dh.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/sha256.c \
|
||||
mcuboot/ext/tinycrypt/lib/source/utils.c
|
||||
endif
|
||||
|
||||
$(MCUBOOT_TARBALL):
|
||||
$(Q) echo "Downloading MCUboot-$(MCUBOOT_VERSION)"
|
||||
$(Q) curl -O -L https://github.com/mcu-tools/mcuboot/archive/$(MCUBOOT_TARBALL)
|
||||
@ -89,4 +99,4 @@ distclean::
|
||||
$(call DELFILE, $(MCUBOOT_TARBALL))
|
||||
$(call DELDIR, $(MCUBOOT_UNPACK))
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
include $(APPDIR)/Application.mk
|
||||
|
Loading…
Reference in New Issue
Block a user