Skip to content

Commit 09ef1c4

Browse files
committed
zephyr: Reconfigure to use local tinycrypt
Disable the Zephyr-provided Tinycrypt, and use our local copy. This avoids problems with changing version across different Zephyr releases. Signed-off-by: David Brown <david.brown@linaro.org>
1 parent fecda2d commit 09ef1c4

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ CFLAGS += -DMCUBOOT_SIGN_RSA -DMCUBOOT_USE_MBED_TLS
1515
# ECDSA P-256
1616
#CONF_FILE = boot/zephyr/prj-p256.conf
1717
#CFLAGS += -DMCUBOOT_SIGN_EC256 -DMCUBOOT_USE_TINYCRYPT
18+
#NEED_TINYCRYPT = y
19+
#export NEED_TINYCRYPT
1820

1921
# Enable this option to have the bootloader verify the signature of
2022
# the primary image upon every boot. Without it, signature

boot/zephyr/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ obj-y += flash_map.o hal_flash.o os.o
88
obj-y += keys.o
99

1010
obj-y += ../bootutil/src/
11+
12+
obj-$(NEED_TINYCRYPT) += ../../ext/tinycrypt/lib/source/
13+
include $(PROJECT)/ext/tinycrypt/lib/source/Makefile.inc

boot/zephyr/prj-p256.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CONFIG_MAIN_STACK_SIZE=10240
77
CONFIG_MBEDTLS=y
88
CONFIG_MBEDTLS_BUILTIN=y
99
CONFIG_MBEDTLS_CFG_FILE="config-asn1.h"
10-
CONFIG_TINYCRYPT=y
11-
CONFIG_TINYCRYPT_ECC_DSA=y
12-
CONFIG_TINYCRYPT_SHA256=y
10+
# CONFIG_TINYCRYPT is not set
11+
# CONFIG_TINYCRYPT_ECC_DSA is not set
12+
# CONFIG_TINYCRYPT_SHA256 is not set
1313

1414
### mbedTLS wants a heap
1515
CONFIG_HEAP_MEM_POOL_SIZE=16384

ext/tinycrypt/lib/source/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Zephyr makefile.
2+
# subdir-ccflags-y += -I$(PROJECT)/ext/tinycrypt/lib/include
3+
4+
obj-y += ecc.o ecc_dsa.o sha256.o utils.o
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# vim: ft=make
2+
3+
subdir-ccflags-$(NEED_TINYCRYPT) += -I$(PROJECT)/ext/tinycrypt/lib/include

0 commit comments

Comments
 (0)