Commit 913a3851 authored by Sebastian Bøe's avatar Sebastian Bøe Committed by David Brown
Browse files

boot: zephyr: Detect invalid Kconfig'uration earlier

Instead of detecting an invalid Kconfiguration during CMake
Configure-time we detect it where it belongs, in Kconfig.

Signed-off-by: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent b94bda03
Loading
Loading
Loading
Loading
−9
Changes for boot/zephyr/CMakeLists.txt: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -106,15 +106,6 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256)
  target_sources(app PRIVATE "${TINYCRYPT_DIR}/source/sha256.c")
  target_sources(app PRIVATE "${TINYCRYPT_DIR}/source/utils.c")

  # When building for ECDSA, we use our own copy of mbedTLS, so the Zephyr
  # one must not be enabled or the MBEDTLS_CONFIG_FILE macros will collide.
  if(DEFINED CONFIG_MBEDTLS)
	  message(FATAL_ERROR "\

CONFIG_MBEDTLS should not be enabled. \
Try adding CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y to your prj.conf, \
delete the build folder and build from scratch.")
  endif()
  # Since here we are not using Zephyr's mbedTLS but rather our own, we need
  # to set MBEDTLS_CONFIG_FILE ourselves. When using Zephyr's copy, this
  # variable is set by its Kconfig in the Zephyr codebase.
+4
Changes for boot/zephyr/Kconfig: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ config BOOT_USE_TINYCRYPT
	bool
	# Hidden option
	default n
	# When building for ECDSA, we use our own copy of mbedTLS, so the
	# Zephyr one must not be enabled or the MBEDTLS_CONFIG_FILE macros
	# will collide.
	depends on ! MBEDTLS
	help
	  Use TinyCrypt for crypto primitives.