mynewt: Make sysinit() call configurable
In same cases (loging, hash, crypto) main function called
newt tool generated sysinit() function to create
uart device and crypto.
Now user can specify that sysinit should be called for
other cases if needed. This can be useful if some other
package should be included in the build and it has
package initialization function.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
diff --git a/boot/mynewt/src/main.c b/boot/mynewt/src/main.c
index a054fa9..f5c7d5f 100755
--- a/boot/mynewt/src/main.c
+++ b/boot/mynewt/src/main.c
@@ -229,7 +229,7 @@
#endif
#if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || \
- MYNEWT_VAL(CRYPTO) || MYNEWT_VAL(HASH)
+ MYNEWT_VAL(CRYPTO) || MYNEWT_VAL(HASH) || MYNEWT_VAL(BOOT_MYNEWT_SYSINIT)
/* initialize uart/crypto without os */
os_dev_initialize_all(OS_DEV_INIT_PRIMARY);
os_dev_initialize_all(OS_DEV_INIT_SECONDARY);