Skip to content

Commit af1e02e

Browse files
committed
[MYNEWT] Allow initialization of HASH when enabled
The Mynewt HASH HW driver can be used to do the sha256 validation in the bootloader instead of relying on mbedTLS/tinycrypt. When enabled it must be initialized before boot_go (and boot_img_validate) is run, so this does the extra checking and runs initialization when required. Signed-off-by: Fabio Utzig <[email protected]>
1 parent eadbf58 commit af1e02e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boot/mynewt/src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ main(void)
218218
assert(rc == 0);
219219
#endif
220220

221-
#if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || MYNEWT_VAL(CRYPTO)
221+
#if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || \
222+
MYNEWT_VAL(CRYPTO) || MYNEWT_VAL(HASH)
222223
/* initialize uart/crypto without os */
223224
os_dev_initialize_all(OS_DEV_INIT_PRIMARY);
224225
os_dev_initialize_all(OS_DEV_INIT_SECONDARY);

0 commit comments

Comments
 (0)