zephyr: Fix up mbed TLS configuration
There are some problems with how mbed TLS is configured in Zephyr.
First, include the makefile stub in the Makefile that uses these
defines. This makes sure the right definitions get made so that our
custom config gets used for all compiled files, rather than a mixed set.
Also, fix up the wrappers on the custom configs so that each is
different, making it easier to detect if multiple configs are being
included.
Lastly, only include the right header in the image validation. The mbed
TLS includes don't seem to want to allow both RSA and ECDSA to be used
(due to the key size), and including the wrong header results in a
compilation error.
diff --git a/boot/zephyr/include/config-boot.h b/boot/zephyr/include/config-boot.h
index 8639932..a81a02f 100644
--- a/boot/zephyr/include/config-boot.h
+++ b/boot/zephyr/include/config-boot.h
@@ -26,8 +26,8 @@
* - RSA or ECDSA signature verification
*/
-#ifndef MBEDTLS_CONFIG_H
-#define MBEDTLS_CONFIG_H
+#ifndef MBEDTLS_CONFIG_BOOT_H
+#define MBEDTLS_CONFIG_BOOT_H
/* TODO: Configure this between app and target. Really, we want the
* config to come from the app. */
@@ -94,4 +94,4 @@
#include "mbedtls/check_config.h"
-#endif /* MBEDTLS_CONFIG_H */
+#endif /* MBEDTLS_CONFIG_BOOT_H */