• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
3#
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
15$(eval $(call add_define,KEY_SIZE))
16
17# 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
22CRYPTOCELL_VERSION ?= 712
23ifeq (${CRYPTOCELL_VERSION},712)
24  CCSBROM_LIB_FILENAME := cc_712sbromx509
25else ifeq (${CRYPTOCELL_VERSION},713)
26  CCSBROM_LIB_FILENAME	:= cc_713bsv
27else
28  $(error Error: CRYPTOCELL_VERSION set to invalid version)
29endif
30
31CRYPTOCELL_SRC_DIR	:= drivers/auth/cryptocell/${CRYPTOCELL_VERSION}/
32
33CRYPTOCELL_SOURCES	:= ${CRYPTOCELL_SRC_DIR}/cryptocell_crypto.c \
34			   ${CRYPTOCELL_SRC_DIR}/cryptocell_plat_helpers.c
35
36TF_LDFLAGS		+= -L$(CCSBROM_LIB_PATH)
37LDLIBS			+= -l$(CCSBROM_LIB_FILENAME)
38
39BL1_SOURCES		+= ${CRYPTOCELL_SOURCES}
40BL2_SOURCES		+= ${CRYPTOCELL_SOURCES}
41