[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 <utzig@apache.org>
This commit is contained in:
Fabio Utzig 2019-06-14 08:56:41 -03:00 committed by Fabio Utzig
parent eadbf58850
commit af1e02e347
1 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,8 @@ main(void)
assert(rc == 0); assert(rc == 0);
#endif #endif
#if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || MYNEWT_VAL(CRYPTO) #if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || \
MYNEWT_VAL(CRYPTO) || MYNEWT_VAL(HASH)
/* initialize uart/crypto without os */ /* initialize uart/crypto without os */
os_dev_initialize_all(OS_DEV_INIT_PRIMARY); os_dev_initialize_all(OS_DEV_INIT_PRIMARY);
os_dev_initialize_all(OS_DEV_INIT_SECONDARY); os_dev_initialize_all(OS_DEV_INIT_SECONDARY);