diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2018-11-05 21:06:50 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2018-11-14 15:32:01 +0100 |
commit | e789ada3f9c0e021452d6d933b284388a1e0f88f (patch) | |
tree | 7aeb40a3da15185e42ea21c42516c9b45e7a7843 /core/core.mk | |
parent | 98bd5fe350beee300c8292874158c5c95c69d59f (diff) |
core: switch to mbedtls for bignum
Adds a mpi_desc.c wrapper to LTC in order to enable usage of bignum
(mpi) routines from mbedtls.
CFG_MBEDTLS_MPI=y (default y) builds the bignum routines for mbedtls and
also enables their usage in LTC and by that replaces libmpa for
privileged mode usage.
User mode TAs still use libmpa.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/core.mk')
-rw-r--r-- | core/core.mk | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/core.mk b/core/core.mk index c9e82b97..37906792 100644 --- a/core/core.mk +++ b/core/core.mk @@ -83,13 +83,24 @@ libname = utils libdir = lib/libutils include mk/lib.mk +CFG_CRYPTOLIB_NAME ?= tomcrypt +CFG_CRYPTOLIB_DIR ?= core/lib/libtomcrypt + +CFG_CORE_MBEDTLS_MPI ?= y +ifeq ($(CFG_CORE_MBEDTLS_MPI)_$(CFG_CRYPTOLIB_NAME),y_tomcrypt) +# We're compiling mbedtls too, but with a limited configuration which only +# provides the MPI routines +libname = mbedtls +libdir = lib/libmbedtls +include mk/lib.mk +else libname = mpa libdir = lib/libmpa include mk/lib.mk +endif + base-prefix := -CFG_CRYPTOLIB_NAME ?= tomcrypt -CFG_CRYPTOLIB_DIR ?= core/lib/libtomcrypt libname = $(CFG_CRYPTOLIB_NAME) libdir = $(CFG_CRYPTOLIB_DIR) include mk/lib.mk |