blob: 2fc4ddb11bc3b3e4ee34ccbb64d8a99c05bea284 [file] [log] [blame]
Soby Mathew5d708002017-05-10 11:49:58 +01001#
Gilad Ben-Yossefa6e53422019-09-15 13:29:29 +03002# Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
Soby Mathew5d708002017-05-10 11:49:58 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include drivers/auth/mbedtls/mbedtls_common.mk
8
9# The algorithm is RSA when using Cryptocell crypto driver
10TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_RSA
11
12# Needs to be set to drive mbed TLS configuration correctly
13$(eval $(call add_define,TF_MBEDTLS_KEY_ALG_ID))
14
Gilad Ben-Yossefa6e53422019-09-15 13:29:29 +030015$(eval $(call add_define,KEY_SIZE))
16
Soby Mathew5d708002017-05-10 11:49:58 +010017# CCSBROM_LIB_PATH must be set to the Cryptocell SBROM library path
18ifeq (${CCSBROM_LIB_PATH},)
19 $(error Error: CCSBROM_LIB_PATH not set)
20endif
21
Gilad Ben-Yossef6fbe0fc2019-05-14 14:47:36 +030022CRYPTOCELL_VERSION ?= 712
23ifeq (${CRYPTOCELL_VERSION},712)
24 CCSBROM_LIB_FILENAME := cc_712sbromx509
25else
26 $(error Error: CRYPTOCELL_VERSION set to invalid version)
27endif
28
29CRYPTOCELL_SRC_DIR := drivers/auth/cryptocell/${CRYPTOCELL_VERSION}/
Soby Mathew5d708002017-05-10 11:49:58 +010030
Gilad Ben-Yossef6fbe0fc2019-05-14 14:47:36 +030031CRYPTOCELL_SOURCES := ${CRYPTOCELL_SRC_DIR}/cryptocell_crypto.c \
32 ${CRYPTOCELL_SRC_DIR}/cryptocell_plat_helpers.c
33
34TF_LDFLAGS += -L$(CCSBROM_LIB_PATH)
35LDLIBS += -l$(CCSBROM_LIB_FILENAME)
Soby Mathew5d708002017-05-10 11:49:58 +010036
Gilad Ben-Yosseffbb88a32019-05-14 10:48:18 +030037BL1_SOURCES += ${CRYPTOCELL_SOURCES}
38BL2_SOURCES += ${CRYPTOCELL_SOURCES}