aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2020-07-10 13:31:29 +0100
committerTamas Ban <tamas.ban@arm.com>2020-09-24 12:49:54 +0000
commitb3d78827a5c148ad334d739ac76d67c745172109 (patch)
tree86a61a29b5333820b92561755c5e4a92220fe759 /lib
parent8efad884d1a54395dfafb54fd0b10c7ee32d68fb (diff)
downloadtrusted-firmware-m-b3d78827a5c148ad334d739ac76d67c745172109.tar.gz
Build: Convert CC312 buildsystem to modern cmake
Adds cmake files inside the lib/ext/cryptocell-312-runtime directory. Removes previous make based buildsystem. WARNING: This change will not build in isolation, it requires _all_ other cmake changes to successfully build. It is split out only for clarity of changes. Change-Id: I305048674bfb30ace0a2390196674ba162c229ba Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext/cryptocell-312-runtime/CMakeLists.txt80
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/CMakeLists.txt10
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/CMakeLists.txt130
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/CMakeLists.txt45
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/CMakeLists.txt22
-rw-r--r--lib/ext/cryptocell-312-runtime/host/CMakeLists.txt72
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/Makefile208
-rwxr-xr-xlib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile342
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/Makefile23
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/Makefile18
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/project_cmpu.mk107
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_util.c10
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/Makefile18
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/project_dmpu.mk84
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_sbromlib/Makefile16
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/pal/Makefile21
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/pal/freertos/Makefile19
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/pal/linux/Makefile17
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/pal/no_os/Makefile17
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/pal/project_pal.mk57
-rwxr-xr-xlib/ext/cryptocell-312-runtime/host/src/tests/TestAL/Makefile252
-rwxr-xr-xlib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/Makefile98
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/Makefile27
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/cmpu_integration_test.mk60
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/Makefile27
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/dmpu_integration_test.mk59
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/Makefile29
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/run_integration_test.mk141
-rw-r--r--lib/ext/cryptocell-312-runtime/shared/CMakeLists.txt45
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/Makefile111
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/Makefile47
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/lib/Makefile38
-rwxr-xr-xlib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/Makefile56
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/Makefile38
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/Makefile47
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/Makefile49
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/lib/Makefile38
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/Makefile21
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/Makefile48
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/lib/Makefile38
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/Makefile48
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/lib/Makefile38
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/Makefile48
-rw-r--r--lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/lib/Makefile38
44 files changed, 405 insertions, 2352 deletions
diff --git a/lib/ext/cryptocell-312-runtime/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/CMakeLists.txt
new file mode 100644
index 000000000..cf0be8715
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/CMakeLists.txt
@@ -0,0 +1,80 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+cmake_minimum_required(VERSION 3.13)
+
+project("CC312 Runtime Library" LANGUAGES C ASM)
+
+cmake_policy(SET CMP0076 NEW)
+cmake_policy(SET CMP0079 NEW)
+
+if (NOT DEFINED CC312_LIB_TARGET)
+ set(CC312_LIB_TARGET cc312)
+endif()
+if (NOT DEFINED CC312_PAL_TARGET)
+ set(CC312_PAL_TARGET cc312_pal)
+endif()
+if (NOT DEFINED CC312_CDMPU_TARGET)
+ set(CC312_CDMPU_TARGET cc312_cdmpu)
+endif()
+
+add_library(${CC312_LIB_TARGET} STATIC)
+# The extra libraries don't change much, so if we've already got one just ignore
+# it. it's still possible to create multiple targets by altering the name
+# variable.
+if(NOT TARGET ${CC312_PAL_TARGET})
+ add_library(${CC312_PAL_TARGET} STATIC EXCLUDE_FROM_ALL)
+endif()
+if(NOT TARGET ${CC312_CDMPU_TARGET})
+ add_library(${CC312_CDMPU_TARGET} STATIC EXCLUDE_FROM_ALL)
+endif()
+
+add_subdirectory(codesafe)
+add_subdirectory(host)
+add_subdirectory(shared)
+
+########################## LIB #################################################
+
+target_compile_definitions(${CC312_LIB_TARGET}
+ PRIVATE
+ DLLI_MAX_BUFF_SIZE=0x10000
+ USE_MBEDTLS_CRYPTOCELL
+ CC_MNG_MIN_BACKUP_SIZE_IN_BYTES=512
+ CC_PAL_MAX_LOG_LEVEL=3
+ PUBLIC
+ CC_IOT
+)
+target_link_libraries(${CC312_LIB_TARGET}
+ PRIVATE
+ ${CC312_PAL_TARGET}
+)
+
+########################## PAL #################################################
+
+target_compile_definitions(${CC312_PAL_TARGET}
+ PRIVATE
+ CC_TRNG_MODE=0
+ CC_PAL_MAX_LOG_LEVEL=3
+ PUBLIC
+ CC_IOT
+)
+
+########################## CDMPU ###############################################
+
+target_link_libraries(${CC312_CDMPU_TARGET}
+ PRIVATE
+ ${CC312_PAL_TARGET}
+)
+
+target_compile_definitions(${CC312_CDMPU_TARGET}
+ PRIVATE
+ DLLI_MAX_BUFF_SIZE=0x10000
+ USE_MBEDTLS_CRYPTOCELL
+ CC_MNG_MIN_BACKUP_SIZE_IN_BYTES=512
+ PUBLIC
+ CC_IOT
+)
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/codesafe/CMakeLists.txt
new file mode 100644
index 000000000..04f498e06
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/codesafe/CMakeLists.txt
@@ -0,0 +1,10 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+add_subdirectory(src/crypto_api)
+add_subdirectory(src/mbedtls_api)
+# add_subdirectory(src/secure_boot_debug)
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/CMakeLists.txt
new file mode 100644
index 000000000..a4252574b
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/CMakeLists.txt
@@ -0,0 +1,130 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+########################## LIB #################################################
+
+target_include_directories(${CC312_LIB_TARGET}
+ PRIVATE
+ common
+ cc3x_sym/driver
+ cc3x_sym/api
+ pki/poly
+ pki/ec_wrst
+ ec_wrst
+ ec_wrst/ecc_domains
+ rsa
+ pki/srp
+ pki/ec_edw
+ pki/ec_mont
+ pki/common
+ pki/rsa
+ rnd_dma/local
+ rnd_dma
+)
+
+target_sources(${CC312_LIB_TARGET}
+ PRIVATE
+ cc3x_sym/api/mbedtls_cc_chacha.c
+ cc3x_sym/api/mbedtls_cc_chacha_poly.c
+ cc3x_sym/api/mbedtls_cc_chacha_poly.c
+ cc3x_sym/api/mbedtls_cc_ecies.c
+ cc3x_sym/api/mbedtls_ccm_internal.c
+ cc3x_sym/api/mbedtls_cc_poly.c
+ cc3x_sym/api/mbedtls_cc_poly.c
+ cc3x_sym/api/mbedtls_cc_sha512_t.c
+ cc3x_sym/api/mbedtls_cc_srp.c
+ cc3x_sym/api/mbedtls_cc_srp.c
+ cc3x_sym/driver/aesccm_driver.c
+ cc3x_sym/driver/aes_driver.c
+ cc3x_sym/driver/aesgcm_driver.c
+ cc3x_sym/driver/bypass_driver.c
+ cc3x_sym/driver/chacha_driver.c
+ cc3x_sym/driver/driver_common.c
+ cc3x_sym/driver/hash_driver.c
+ cc3x_sym/driver/srp_driver.c
+ common/cc_common_conv_endian.c
+ common/cc_common_math.c
+ ec_edw/cc_ec_edw.c
+ ec_edw/cc_ec_edw.c
+ ec_mont/cc_ec_mont.c
+ ec_mont/cc_ec_mont.c
+ ec_wrst/cc_ecdh.c
+ ec_wrst/cc_ecdsa_sign.c
+ ec_wrst/cc_ecdsa_verify.c
+ ec_wrst/cc_ecpki_build_priv.c
+ ec_wrst/cc_ecpki_build_publ.c
+ ec_wrst/cc_ecpki_domain.c
+ ec_wrst/cc_ecpki_kg.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp192k1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp192r1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp224k1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp224r1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp256k1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp256r1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp384r1.c
+ ec_wrst/ecc_domains/cc_ecpki_domain_secp521r1.c
+ ffc_domain/cc_ffc_domain.c
+ kdf/cc_kdf.c
+ pki/common/pka.c
+ pki/common/pki.c
+ pki/common/pki_modular_arithmetic.c
+ pki/ec_edw/ec_edw.c
+ pki/ec_edw/ec_edw_domain_25519.c
+ pki/ec_edw/pka_ec_edw.c
+ pki/ec_edw/pka_ec_edw.c
+ pki/ec_mont/ec_mont.c
+ pki/ec_mont/ec_mont_domain_curve25519.c
+ pki/ec_mont/pka_ec_mont.c
+ pki/ec_mont/pka_ec_mont.c
+ pki/ec_wrst/ec_wrst.c
+ pki/ec_wrst/ec_wrst_dsa.c
+ pki/ec_wrst/ec_wrst_genkey.c
+ pki/ec_wrst/pka_ec_wrst.c
+ pki/ec_wrst/pka_ec_wrst.c
+ pki/ec_wrst/pka_ec_wrst_dsa_verify.c
+ pki/ec_wrst/pka_ec_wrst_smul_no_scap.c
+ pki/poly/poly.c
+ pki/rsa/rsa_genkey.c
+ pki/rsa/rsa_private.c
+ pki/rsa/rsa_public.c
+ pki/srp/srp.c
+ rnd_dma/cc_rnd_common.c
+ rnd_dma/llf_rnd.c
+ rnd_dma/llf_rnd_fetrng.c
+ rsa/cc_rsa_build.c
+ rsa/cc_rsa_kg.c
+ rsa/cc_rsa_oaep.c
+ rsa/cc_rsa_pkcs_ver15_util.c
+ rsa/cc_rsa_prim.c
+ rsa/cc_rsa_pss21_util.c
+ rsa/cc_rsa_schemes.c
+ rsa/cc_rsa_sign.c
+ rsa/cc_rsa_verify.c
+ rsa/cc_rsa_verify.c
+)
+
+########################## CDMPU ###############################################
+
+target_include_directories(${CC312_CDMPU_TARGET}
+ PRIVATE
+ common
+ cc3x_sym/driver
+ cc3x_sym/api
+ rnd_dma
+ rnd_dma/local
+)
+
+target_sources(${CC312_CDMPU_TARGET}
+ PRIVATE
+ cc3x_sym/api/mbedtls_ccm_internal.c
+ cc3x_sym/driver/aesccm_driver.c
+ cc3x_sym/driver/aes_driver.c
+ cc3x_sym/driver/driver_common.c
+ common/cc_common_conv_endian.c
+ rnd_dma/llf_rnd.c
+ rnd_dma/llf_rnd_fetrng.c
+)
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/CMakeLists.txt
new file mode 100644
index 000000000..34866187d
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/CMakeLists.txt
@@ -0,0 +1,45 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+target_include_directories(${CC312_LIB_TARGET}
+ PRIVATE
+ .
+)
+
+target_sources(${CC312_LIB_TARGET}
+ PRIVATE
+ aes_alt.c
+ cc_ecp_internal.c
+ ccm_alt.c
+ chacha20_alt.c
+ chachapoly_alt.c
+ cmac_alt.c
+ dhm_alt.c
+ ecdh_alt.c
+ ecdsa_alt.c
+ ecdsa_edwards.c
+ ecp_common.c
+ gcm_alt.c
+ mbedtls_common.c
+ mbedtls_hash_common.c
+ poly1305_alt.c
+ rsa_alt.c
+ sha1_alt.c
+ sha256_alt.c
+ trng_api.c
+)
+
+target_include_directories(${CC312_CDMPU_TARGET}
+ PRIVATE
+ .
+)
+
+target_sources(${CC312_CDMPU_TARGET}
+ PRIVATE
+ ccm_alt.c
+ mbedtls_common.c
+)
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/CMakeLists.txt
new file mode 100644
index 000000000..1071bdd1d
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/CMakeLists.txt
@@ -0,0 +1,22 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+target_sources(${CC312_LIB_TARGET}
+ PRIVATE
+ cc3x_verifier/bootimagesverifier_base_single.c
+ cc3x_verifier/bootimagesverifier_parser.c
+ cc3x_verifier/bootimagesverifier_swcomp.c
+ common/common_cert_parser.c
+ common/common_cert_verify.c
+ crypto_driver/rsa_exp.c
+ crypto_driver/rsa_pki_pka.c
+ crypto_driver/rsa_pki_pka.c
+ crypto_driver/rsa_verify.c
+ platform/common/cc3x/secureboot_base_swimgverify.c
+ platform/nvm/cc3x_nvm_rt/nvm_otp.c
+ secure_boot_gen/secureboot_base_func.c
+)
diff --git a/lib/ext/cryptocell-312-runtime/host/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/host/CMakeLists.txt
new file mode 100644
index 000000000..cbbcc01b6
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/host/CMakeLists.txt
@@ -0,0 +1,72 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+target_include_directories(${CC312_LIB_TARGET}
+ PUBLIC
+ src/cc3x_lib
+ src/cc3x_productionlib/common
+ src/cc_mng
+ src/hal
+)
+
+target_sources(${CC312_LIB_TARGET}
+ PRIVATE
+ src/cc3x_lib/cc_lib.c
+ src/cc3x_lib/cc_rng_plat.c
+ src/cc3x_lib/cc_util_cmac.c
+ src/cc3x_lib/mbedtls_cc_util_asset_prov.c
+ src/cc3x_productionlib/cmpu/cmpu_llf_rnd.c
+ src/cc_mng/mbedtls_cc_mng.c
+ src/cc_mng/mbedtls_cc_mng_int.c
+ src/hal/cc3x/cc_hal.c
+ src/utils/mbedtls_cc_util_key_derivation.c
+)
+
+########################## PAL #################################################
+
+target_include_directories(${CC312_PAL_TARGET}
+ PRIVATE
+ src/hal
+)
+
+target_sources(${CC312_PAL_TARGET}
+ PRIVATE
+ src/pal/cc_pal_trng.c
+ src/pal/no_os/cc_pal_abort_plat.c
+ src/pal/no_os/cc_pal_apbc.c
+ src/pal/no_os/cc_pal_buff_attr.c
+ src/pal/no_os/cc_pal.c
+ src/pal/no_os/cc_pal_dma.c
+ src/pal/no_os/cc_pal_interrupt_ctrl.c
+ src/pal/no_os/cc_pal_mem.c
+ src/pal/no_os/cc_pal_memmap.c
+ src/pal/no_os/cc_pal_mutex.c
+ src/pal/no_os/cc_pal_pm.c
+)
+
+########################## CDMPU ###############################################
+
+target_include_directories(${CC312_CDMPU_TARGET}
+ PUBLIC
+ src/cc3x_productionlib/dmpu
+ src/cc3x_productionlib/cmpu
+ src/cc3x_productionlib/common
+)
+
+target_sources(${CC312_CDMPU_TARGET}
+ PRIVATE
+ src/cc3x_lib/cc_rng_plat.c
+ src/cc3x_productionlib/cmpu/cmpu.c
+ src/cc3x_productionlib/cmpu/cmpu_derivation.c
+ src/cc3x_productionlib/cmpu/cmpu_llf_rnd.c
+ src/cc3x_productionlib/common/prod_crypto_driver.c
+ src/cc3x_productionlib/common/prod_util.c
+ src/cc3x_productionlib/dmpu/dmpu.c
+ src/cc_mng/mbedtls_cc_mng.c
+ src/cc_mng/mbedtls_cc_mng_int.c
+ src/hal/cc3x/cc_hal.c
+)
diff --git a/lib/ext/cryptocell-312-runtime/host/src/Makefile b/lib/ext/cryptocell-312-runtime/host/src/Makefile
deleted file mode 100644
index 3e7538d50..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/Makefile
+++ /dev/null
@@ -1,208 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# "Root" Makefile for Host domain
-# This makefile invokes the relevant target specific makefile to build it (e.g., cclib)
-
-HOST_PROJ_ROOT ?= ../
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-# List of known modules in host and shared domains
-ifeq ($(PROJ_PRD), softcrys)
-HOST_COMPONENTS = softcrys
-HOST_COMPONENTS += tests
-else
-HOST_COMPONENTS = cc_driver/$(CC_TYPE)/$(REE_OS) moc_ipsec/$(REE_OS) cc_ll_test
-HOST_COMPONENTS += tests sblib cc7x_sbromlib cc7x_sbromx509lib cc3x_sbromlib cc3x_lib cc3x_productionlib teelib cc7x_teelib tztrng_lib
-APPS = cmpu dmpu
-endif
-HOST_COMPONENTS += $(foreach app,$(APPS),apps/$(app))
-ifneq ($(filter $(CROSS_COMPILE),arm-dsm- armcc),$(CROSS_COMPILE))
-SHARED_COMPONENTS += libtom gmssl
-endif
-
-
-ifneq ($(PROJ_NAME),) # proj.cfg found
-
-ifneq ($(PLATFORM_IS_ANDROID),1)
-default: release
-
-$(info PROJ_NAME=$(PROJ_NAME))
-release: $(foreach target,$(PROJ_TARGETS),release_$(target))
-
-# Generic release rules recipes
-$(foreach module,$(filter-out cc_driver/public/linux ,$(HOST_COMPONENTS)),release_$(module)): release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -C $*
-
-# Exception for cc_driver/public/linux : requires Makefile.setup
-release_cc_driver/public/linux: release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -C $* -f Makefile.setup
-
-# Exception for host/src/pal/linux64/driver
-release_pal/linux64/driver: release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -C $* -f Makefile.setup
-
-# Similar recipes for shared components
-$(foreach module,$(SHARED_COMPONENTS),release_$(module)): release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -C $(SHARED_SRCDIR)/$* -f Makefile.host
-
-
-# Dependencies for known targets
-release_cclib: $(if $(filter $(PROJ_TARGETS),cc_driver/$(CC_TYPE)/$(REE_OS)),release_cc_driver/$(CC_TYPE)/$(REE_OS))
-
-#else
-
-# Similar recipes for shared components
-#$(foreach module,$(SHARED_COMPONENTS),release_$(module)): release_%:
-# @$(ECHO) [REL SHARED_COMP AND] $*
-# @$(MAKE) -C $(SHARED_SRCDIR)/$* -f Makefile.host
-
-
-# Tests dependencies (depends on PROJ_TARGETS)
-ifneq ($(filter $(CROSS_COMPILE),arm-dsm- armcc),$(CROSS_COMPILE))
-release_tests: release_libtom release_gmssl $(if $(NO_PAL_COMPILATION), , release_pal)
-endif
-
-else #($(PLATFORM_IS_ANDROID),1)
-default: release_tests
- @export NDK_MODULE_PATH=$(PWD)/.. ; $(ANDROID_NDK_PATH)/ndk-build NDK_PROJECT_PATH=$(PWD) APP_BUILD_SCRIPT=$(PWD)/Android.mk APP_ABI=$(CC_NDK_APP_ABI)
-
-# Similar recipes for shared components
-$(foreach module,$(SHARED_COMPONENTS),release_$(module)): release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -C $(SHARED_SRCDIR)/$* -f Makefile.host
-
-release_tests: $(if $(PROJ_TESTS),release_libtom $(if $(NO_PAL_COMPILATION), , release_pal),)
-
-endif #($(PLATFORM_IS_ANDROID),1)
-
-ifneq ($(PLATFORM_IS_ANDROID),1)
-# Target installation rules
-# Default location of NFS root for target
-TARGET_ROOT ?= ~/work/nfsroot
-# Default location of work area on target
-TARGET_WORK_DIR ?= $(TARGET_DIR)
-target_install: $(if $(filter $(PROJ_TESTS),tee4sos),install_driver)
-target_install: $(if $(filter pal/linux64/driver cc_driver/$(CC_TYPE)/$(REE_OS),$(PROJ_TARGETS)),install_driver) $(call DEPENDENCY_ON_EXISTENCE_OF,$(TARGET_ROOT)/$(TARGET_WORK_DIR)/dat)
- @$(if $(wildcard $(RELEASE_EXEDIR)/*),$(ECHO) [CP] $(foreach fl,$(wildcard $(RELEASE_EXEDIR)/*),$(notdir $(fl))) --\> $(TARGET_ROOT)/$(TARGET_WORK_DIR)/)
- @$(if $(wildcard $(RELEASE_EXEDIR)/*),$(CP) $(RELEASE_EXEDIR)/* $(TARGET_ROOT)/$(TARGET_WORK_DIR)/)
- @$(if $(wildcard $(RELEASE_LIBDIR)/*.so),$(ECHO) [CP] $(foreach fl,$(wildcard $(RELEASE_LIBDIR)/*.so),$(notdir $(fl))) --\> $(TARGET_ROOT)/$(TARGET_WORK_DIR)/)
- @$(if $(wildcard $(RELEASE_LIBDIR)/*.so),$(CP) $(RELEASE_LIBDIR)/*.so $(TARGET_ROOT)/$(TARGET_WORK_DIR)/)
- @$(if $(wildcard $(RELEASE_DATDIR)/*),$(ECHO) [CP] $(foreach fl,$(wildcard $(RELEASE_DATDIR)/*),$(notdir $(fl))) --\> $(TARGET_ROOT)/$(TARGET_WORK_DIR)/dat/)
- @$(if $(wildcard $(RELEASE_DATDIR)/*),$(CP) $(RELEASE_DATDIR)/* $(TARGET_ROOT)/$(TARGET_WORK_DIR)/dat/)
-
-$(TARGET_ROOT)/$(TARGET_WORK_DIR)/dat:
- $(MKDIR) $@
-
-# Driver release rules are special due to modules location
-MODULES_DIRS = $(notdir $(wildcard $(RELEASE_LIBDIR)/modules/*))
-TARGET_MODULES_DIR = $(foreach moddir,$(MODULES_DIRS),$(TARGET_ROOT)/lib/modules/$(moddir))
-RELEASE_FW_DIR = $(RELEASE_LIBDIR)/firmware
-TARGET_FW_DIR = $(TARGET_ROOT)/lib/firmware
-
-ifeq ($(PROJ_PRD),cc3x)
-release_pal: release_%
- @$(ECHO) [REL] PAL TEE_OS[$(TEE_OS)]
- @$(MAKE) -C pal
-else
-release_pal:
- @$(ECHO)
-endif
-
-install_driver: $(MODULES_DIRS:%=install_driver_%) install_fw
-
-$(MODULES_DIRS:%=install_driver_%): install_driver_%: $(call DEPENDENCY_ON_EXISTENCE_OF,$(TARGET_ROOT)/lib/modules/%)
- @$(if $(shell ls $(RELEASE_LIBDIR)/modules/$*/),$(ECHO) [CP] $(foreach fl,$(shell ls $(RELEASE_LIBDIR)/modules/$*/),$*/$(fl)) --\> $(TARGET_ROOT)/lib/modules/$*/ )
- @$(if $(shell ls $(RELEASE_LIBDIR)/modules/$*/),$(CP) $(foreach fl,$(shell ls $(RELEASE_LIBDIR)/modules/$*/),$(RELEASE_LIBDIR)/modules/$*/$(fl)) $(TARGET_ROOT)/lib/modules/$*/ )
-
-install_fw: $(call DEPENDENCY_ON_EXISTENCE_OF,$(TARGET_FW_DIR))
- @$(if $(wildcard $(RELEASE_FW_DIR)/*),$(ECHO) [CP] $(foreach fl,$(wildcard $(RELEASE_FW_DIR)/*),$(notdir $(fl))) --\> $(TARGET_FW_DIR)/ )
- @$(if $(wildcard $(RELEASE_FW_DIR)/*),$(CP) $(wildcard $(RELEASE_FW_DIR)/*) $(TARGET_FW_DIR)/)
-
-
-$(TARGET_MODULES_DIR) $(TARGET_FW_DIR):
- @$(ECHO) [MKDIR] $@
- @$(call exec_logged,$(MKDIR) $@ )
-
-else #($(PLATFORM_IS_ANDROID),1)
-target_install:
- @export NDK_MODULE_PATH=$(PWD)/.. ; $(ANDROID_NDK_PATH)/ndk-build NDK_PROJECT_PATH=$(PWD) APP_BUILD_SCRIPT=$(PWD)/Android.mk APP_ABI=$(CC_NDK_APP_ABI) target_install
-
-endif #($(PLATFORM_IS_ANDROID),1)
-
-.PHONY: all target_install install_driver install_driver_% install_fw release_% clean_%
-
-endif # proj.cfg exists
-###########################################
-
-### Common rules (with or without proj.cfg) ###
-
-ifneq ($(PLATFORM_IS_ANDROID),1)
-# "clean" target only cleans host component
-# (shared components are "quasi-static" external components that we do not wish
-# to re-build each time. Use distclean for deeper clean which includes shared
-# components
-clean: $(foreach target,$(PROJ_TARGETS),clean_$(target))
-
-
-# Clean only intermediate build files (leave released files)
-clean_intermediate: $(foreach target,$(PROJ_TARGETS),clean_intermediate_$(target))
-
-clean_shared: $(foreach target,$(SHARED_COMPONENTS),$(if $(wildcard $(SHARED_SRCDIR)/$(target)),clean_$(target)))
-
-$(foreach module,$(filter-out cc_driver/public/linux,$(HOST_COMPONENTS)),clean_$(module)): clean_%:
- @$(ECHO) [CLN] $*
- @$(MAKE) -s -C $* clean
-
-$(foreach module,$(filter-out cc_driver/public/linux,$(HOST_COMPONENTS)),clean_intermediate_$(module)): clean_intermediate_%:
- @$(ECHO) [CLN-INT] $*
- @$(MAKE) -s -C $* clean_intermediate
-
-# Exception for cc_driver/public/linux : requires Makefile.setup
-clean_cc_driver/public/linux: clean_%:
- @$(ECHO) [CLN] $*
- @$(MAKE) -s -C $* -f Makefile.setup clean
-
-# cleaning host/src/pal/linux64/driver
-clean_pal/linux64/driver: clean_%:
- @$(ECHO) [CLN] $*
- @$(MAKE) -s -C $* -f Makefile.setup clean
-
-# cleaning host/src/pal
-clean_pal:
- @$(ECHO) [CLN] PAL
- @$(MAKE) -s -C pal clean
-
-clean_intermediate_cc_driver/public/linux: clean_intermediate_%:
- @$(ECHO) [CLN-INT] $*
- @$(MAKE) -s -C $* -f Makefile.setup clean_intermediate
-
-$(foreach module,$(SHARED_COMPONENTS),clean_$(module)): clean_%:
- @$(ECHO) [CLN] $*
- @$(MAKE) -s -C $(SHARED_SRCDIR)/$* -f Makefile.host clean
-
-distclean: clean clean_shared clrconfig
- @$(ECHO) [REL-CLN] $(RELEASE_EXEDIR)
- @$(RMDIR) $(RELEASE_EXEDIR)
- @$(ECHO) [REL-CLN] $(RELEASE_LIBDIR)
- @$(RMDIR) $(RELEASE_LIBDIR)
- @$(ECHO) [REL-CLN] $(RELEASE_INCDIR)
- @$(RMDIR) $(RELEASE_INCDIR)
- @$(ECHO) [REL-CLN] $(RELEASE_DATDIR)
- @$(RMDIR) $(RELEASE_DATDIR)
- -@$(RMDIR) tests/*/proj_integration_tests.cfg
-
-else #($(PLATFORM_IS_ANDROID),1)
-clean distclean:
- @export NDK_MODULE_PATH=$(PWD)/.. ; $(ANDROID_NDK_PATH)/ndk-build NDK_PROJECT_PATH=$(PWD) APP_BUILD_SCRIPT=$(PWD)/Android.mk APP_ABI=$(CC_NDK_APP_ABI) $@
-endif #($(PLATFORM_IS_ANDROID),1)
-
-.PHONY: clean clean_intermediate clean_% distclean
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile
deleted file mode 100755
index 2608f2180..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile
+++ /dev/null
@@ -1,342 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-HOST_PROJ_ROOT ?= ../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-API_DIR = $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api
-DRV_DIR = $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/driver
-MBEDTLS_ALT_DIR = $(CODESAFE_SRCDIR)/mbedtls_api
-MBEDTLS_ALT_API = $(SHARED_INCDIR)/mbedtls
-MBEDTLS_ALT_API_TESTS = $(SHARED_SRCDIR)/mbedtls/tests
-MBEDTLS_ROOT = $(HOST_SRCDIR)/../../mbedtls
-SOFTCRYS_API = $(HOST_SRCDIR)/softcrys/softcrys_api
-CC_API = $(SHARED_INCDIR)/crypto_api
-CC_API_3x = $(SHARED_INCDIR)/crypto_api/$(PROJ_PRD)
-MANAGEMENT_API = $(HOST_SRCDIR)/cc_mng
-MANAGEMENT_INCLUDES = $(SHARED_INCDIR)/cc_mng
-UTILS_API = $(HOST_SRCDIR)/utils
-SBROM_DIR = $(CODESAFE_SRCDIR)/secure_boot_debug
-
-#TESTS_COMMON_API = $(HOST_SRCDIR)/tests/common
-
-
-TARGET_LIBS = cc_312
-
-ifeq ($(PKA_DEBUG),1)
-CFLAGS_EXTRA += -DPKA_DEBUG
-endif
-
-
-
-PUBLIC_INCLUDES += $(CC_API_3x)/cc_aes_defs_proj.h
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/mbedtls_api/mbedtls_ccm_common.h $(CC_API)/cc_ecpki_types.h $(CC_API_3x)/cc_pka_defs_hw.h
-PUBLIC_INCLUDES += $(CC_API)/cc_kdf.h $(CC_API)/cc_hash_defs.h# not to document
-PUBLIC_INCLUDES += $(CC_API)/cc_error.h $(CC_API)/cc_aes_defs.h
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_cc_sha512_t.h
-PUBLIC_INCLUDES += $(CC_API_3x)/cc_rnd_common.h
-
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_cc_ecies.h
-PUBLIC_INCLUDES += $(HOST_LIBDIR)/cc_lib.h $(HOST_LIBDIR)/mbedtls_cc_sbrt.h $(HOST_LIBDIR)/mbedtls_cc_util_asset_prov.h
-PUBLIC_INCLUDES += $(CC_API)/$(PROJ_PRD)/cc_hash_defs_proj.h
-PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/sha1_alt.h $(MBEDTLS_ALT_API)/sha256_alt.h $(MBEDTLS_ALT_API)/aes_alt.h
-PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/ccm_alt.h $(MBEDTLS_ALT_API)/gcm_alt.h $(MBEDTLS_ALT_API)/rsa_alt.h
-PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/config-cc312.h $(MBEDTLS_ALT_API)/config-cc312-mps2-freertos.h $(MBEDTLS_ALT_API)/config-cc312-mps2-no-os.h
-PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/cmac_alt.h $(MBEDTLS_ALT_API)/dhm_alt.h $(MBEDTLS_ALT_API)/chacha20_alt.h $(MBEDTLS_ALT_API)/poly1305_alt.h $(MBEDTLS_ALT_API)/chachapoly_alt.h
-PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/cc_ecc_internal.h $(CC_API_3x)/mbedtls_cc_ecdsa_edwards.h $(CC_API_3x)/mbedtls_cc_ecdh_edwards.h
-
-PUBLIC_INCLUDES += $(MANAGEMENT_INCLUDES)/mbedtls_cc_mng.h $(MANAGEMENT_INCLUDES)/mbedtls_cc_mng_error.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_key_derivation.h $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_key_derivation_defs.h $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_defs.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_util/cc_util_error.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_regs.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_bitops.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_host.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_nvm.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_reg_common.h
-PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/cc_mng/mbedtls_cc_mng_int.h
-PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/hal/cc_hal_plat.h
-
-PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/cc3x_productionlib/common/prod_hw_defs.h
-PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/cc3x_productionlib/common/prod_util.h
-
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_general_defs.h $(SHARED_INCDIR)/proj/cc3x/cc_ecpki_domains_defs.h $(SHARED_INCDIR)/proj/cc3x/cc_sram_map.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_pka_hw_plat_defs.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_otp_defs.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_production_asset.h
-
-#FFCDH
-PUBLIC_INCLUDES += $(CC_API)/cc_ffcdh.h $(CC_API)/cc_ffc_domain.h $(CC_API)/cc_ffcdh_error.h $(CC_API)/cc_ffc_domain_error.h
-
-#INCDIRS_EXTRA += $(TESTS_COMMON_API)
-#external DMA chacha include
-ifeq ($(CC_CONFIG_CC_CHACHA_POLY_SUPPORT),1)
-ifeq ($(CC_CONFIG_SUPPORT_EXT_DMA),1)
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_chacha_ext_dma.h
-endif
-endif
-
-ifeq ($(CC_CONFIG_SUPPORT_EXT_DMA),1)
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_aes_ext_dma.h
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_hash_ext_dma.h
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_ext_dma_error.h
-endif
-
-#lib sources
-SOURCES_cc_312 = cc_lib.c cc_hal.c
-SOURCES_cc_312 += bypass_driver.c aes_driver.c aesccm_driver.c
-SOURCES_cc_312 += aesgcm_driver.c driver_common.c
-SOURCES_cc_312 += mbedtls_cc_sha512_t.c
-
-#external DMA
-ifeq ($(CC_CONFIG_SUPPORT_EXT_DMA),1)
-SOURCES_cc_312 += aes_driver_ext_dma.c mbedtls_aes_ext_dma.c hash_driver_ext_dma.c mbedtls_hash_ext_dma.c
-endif
-
-ifeq ($(CC_CONFIG_CC_CHACHA_POLY_SUPPORT),1)
-ifeq ($(CC_CONFIG_SUPPORT_EXT_DMA),1)
-SOURCES_cc_312 += mbedtls_chacha_ext_dma.c chacha_driver_ext_dma.c
-endif
-endif
-
-#mbedtls_api
-SOURCES_cc_312 += sha1_alt.c sha256_alt.c mbedtls_hash_common.c aes_alt.c mbedtls_common.c ccm_alt.c gcm_alt.c trng_api.c mbedtls_ccm_internal.c
-SOURCES_cc_312 += rsa_alt.c ecp_common.c cc_ecp_internal.c ecdsa_alt.c ecdh_alt.c ecdsa_edwards.c
-SOURCES_cc_312 += cmac_alt.c dhm_alt.c chacha20_alt.c poly1305_alt.c chachapoly_alt.c
-##SOURCES_cc_312 += platform_alt.c
-
-#management
-SOURCES_cc_312 += mbedtls_cc_mng.c mbedtls_cc_mng_int.c
-
-
-#SB_RT
-ifeq ($(CC_CONFIG_SUPPORT_SB_RT),1)
-CFLAGS_EXTRA += -DCC_SB_SUPPORT_SB_RT
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/secure_boot_debug/platform/common/cc3x/secureboot_defs.h
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/secure_boot_debug/secure_boot_gen/secureboot_gen_defs.h
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/secure_boot_debug/secure_boot_gen/secureboot_basetypes.h
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/secure_boot_debug/platform/pal/cc3x/cc_pal_sb_plat.h
-PUBLIC_INCLUDES += $(CODESAFE_SRCDIR)/secure_boot_debug/cc3x_verifier/bootimagesverifier_def.h
-SOURCES_cc_312 += mbedtls_cc_sbrt.c sbrt_int_func.c bootimagesverifier_parser.c nvm_otp.c
-SOURCES_cc_312 += bootimagesverifier_swcomp.c secureboot_base_swimgverify.c
-SOURCES_cc_312 += rsa_verify.c rsa_exp.c rsa_pki_pka.c
-SOURCES_cc_312 += bootimagesverifier_base_single.c bsv_aes_driver.c bsv_hash_driver.c
-SOURCES_cc_312 += common_cert_verify.c secureboot_base_func.c
-ifeq ($(CC_CONFIG_SB_X509_CERT_SUPPORTED),0)
-SOURCES_cc_312 += common_cert_parser.c
-else #x509 files
-CFLAGS_EXTRA += -DCC_SB_X509_CERT_SUPPORTED -DCC_SB_SUPPORT_IOT
-SOURCES_cc_312 += cc3x_sb_x509_parser.c
-SOURCES_cc_312 += util_asn1_parser.c util_x509_parser.c sb_x509_cert_parser.c cc3x_sb_x509_ext_parser.c cc_pal_x509_verify.c
-INCDIRS_EXTRA += $(SBROM_DIR)/util $(SHARED_INCDIR)/sbrom $(SBROM_DIR)/platform/pal $(SBROM_DIR)/x509_cert_parser $(SBROM_DIR)/x509_verifier
-endif #CC_CONFIG_SB_X509_CERT_SUPPORTED
-endif #CC_CONFIG_SUPPORT_SB_RT
-
-#util
-SOURCES_cc_312 += cc_util_cmac.c cc_hash_info.c mbedtls_cc_util_key_derivation.c mbedtls_cc_util_asset_prov.c
-
-# Asymmetric sources
-#common PKA functions
-SOURCES_cc_312 += pki.c pka.c
-#KDF
-SOURCES_cc_312 += cc_kdf.c
-
-#RSA and dependent functions
-
-ifeq ($(RSA_KG_NO_RND),1)
- CFLAGS+= -DRSA_KG_NO_RND
- SOURCES_cc_312 += rsa_kg_debug_data.c
-endif
-
-SOURCES_cc_312 += cc_rsa_info.c cc_rsa_build.c
-SOURCES_cc_312 += cc_rsa_oaep.c cc_rsa_schemes.c cc_rsa_pkcs_ver15_util.c cc_rsa_pss21_util.c cc_rsa_prim.c cc_rsa_verify.c
-SOURCES_cc_312 += cc_rsa_kg.c cc_rsa_sign.c
-SOURCES_cc_312 += rsa_public.c rsa_private.c rsa_genkey.c
-# ffcdh
-SOURCES_cc_312 += cc_ffc_domain.c
-
-
-ifeq ($(CC_CONFIG_CC_CHACHA_POLY_SUPPORT),1)
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_cc_chacha.h $(CC_API_3x)/mbedtls_cc_chacha_error.h
-PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_cc_poly.h $(CC_API_3x)/mbedtls_cc_poly_error.h $(CC_API_3x)/mbedtls_cc_chacha_poly.h $(CC_API_3x)/mbedtls_cc_chacha_poly_error.h
-SOURCES_cc_312 += chacha_driver.c mbedtls_cc_chacha.c mbedtls_cc_chacha_poly.c mbedtls_cc_poly.c poly.c
-endif
-
-
-#ECC(Canonic) CC
-SOURCES_cc_312 += cc_ecpki_info.c
-SOURCES_cc_312 += cc_ecpki_build_publ.c cc_ecpki_build_priv.c cc_ecdsa_verify.c cc_ecdsa_sign.c
-SOURCES_cc_312 += cc_ecpki_kg.c cc_ecdh.c mbedtls_cc_ecies.c ec_wrst_genkey.c
-#ECC(Canonic) LLF
-SOURCES_cc_312 += pki_modular_arithmetic.c
-SOURCES_cc_312 += pka_ec_wrst.c pka_ec_wrst_dsa_verify.c
-SOURCES_cc_312 += ec_wrst.c ec_wrst_dsa.c cc_ecpki_domain.c
-SOURCES_cc_312 += cc_ecpki_domain_secp192r1.c
-SOURCES_cc_312 += cc_ecpki_domain_secp192k1.c cc_ecpki_domain_secp224r1.c cc_ecpki_domain_secp224k1.c cc_ecpki_domain_secp256r1.c
-SOURCES_cc_312 += cc_ecpki_domain_secp256k1.c cc_ecpki_domain_secp384r1.c cc_ecpki_domain_secp521r1.c
-
-#rng
-SOURCES_cc_312 += cc_rnd_common.c llf_rnd.c cc_rng_plat.c cc_common_math.c cc_common_conv_endian.c
-ifeq ($(CC_CONFIG_TRNG_MODE),0)
- # FE TRNG
- $(info FE TRNG: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
- SOURCES_cc_312 += llf_rnd_fetrng.c
- CFLAGS_EXTRA += -DCC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE)
-else ifeq ($(CC_CONFIG_TRNG_MODE),1)
- # TRNG90B
- $(info TRNG90B: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
- SOURCES_cc_312 += llf_rnd_trng90b.c
- CFLAGS_EXTRA += -DCC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE)
-else
- $(error illegal TRNG: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
-endif
-
-# hash + hmac HW driver
-SOURCES_cc_312 += hash_driver.c
-CFLAGS += -DMD5_HASH_EXCLUDED
-CFLAGS += -DCC_KEYGEN_MAX_SIZE=$(CC_RSA_MAX_KEY_GENERATION_SIZE_BITS)
-
-ifeq ($(CC_CONFIG_SUPPORT_ECC_SCA_SW_PROTECT), 1)
- SOURCES_cc_312 += pka_ec_wrst_smul_scap.c
-else
- SOURCES_cc_312 += pka_ec_wrst_smul_no_scap.c
-endif
-
-
-ifeq ($(LIB_PERF),1)
-CFLAGS += -DLIB_PERF
-endif
-
-ifeq ($(DEBUG),1)
-CFLAGS += -DDEBUG
-endif
-
-ifeq ($(PKA_DEBUG),1)
-SOURCES_cc_312 += pki_dbg.c
-CFLAGS += -DPKA_DEBUG
-endif
-
-# always suppose to support smaller PKA and have the IOT flag
-CFLAGS_EXTRA += -DCC_IOT -DCC_SUPPORT_PKA_64_16
-
-
-# Include directories
-ifeq ($(TEE_OS),freertos)
-include $(HOST_SRCDIR)/../Makefile.freertos
-endif
-
-ifeq ($(TEE_OS),mbedos)
-include $(HOST_SRCDIR)/../Makefile.mbedos
-endif
-
-INCDIRS_EXTRA += $(HOST_SRCDIR)/pal/$(TEE_OS)
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api $(CODESAFE_DIR)/src/crypto_api/cc3x_sym/driver $(SHARED_DIR)/hw/include $(SHARED_INCDIR)/cc_util $(SHARED_INCDIR)/crypto_api/$(PROJ_PRD)
-INCDIRS_EXTRA += $(SHARED_INCDIR) $(SHARED_INCDIR)/pal $(SHARED_INCDIR)/pal/$(TEE_OS) $(HOST_PROJ_ROOT)/src/hal $(HOST_PROJ_ROOT)/src/pal $(HOST_PROJ_ROOT)/src/pal/$(TEE_OS)
-INCDIRS_EXTRA += $(SHARED_INCDIR)/crypto_api
-INCDIRS_EXTRA += $(HOST_INCDIR) $(CODESAFE_SRCDIR)/crypto_api/common $(SHARED_INCDIR)/trng/
-#INCDIRS_EXTRA += $(HOST_SRCDIR)/softcrys/hash_common
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/rnd_dma $(CODESAFE_SRCDIR)/crypto_api/rnd_dma/local
-#pka, rsa and ecc directories
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/pki/common $(CODESAFE_SRCDIR)/crypto_api/pki/ec_wrst $(CODESAFE_SRCDIR)/crypto_api/pki/rsa $(CODESAFE_SRCDIR)/crypto_api/pki/poly
-
-# ffc_domain and ffcdh directories
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/ffc_domain $(CODESAFE_SRCDIR)/crypto_api/ffcdh
-
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/rsa $(CODESAFE_SRCDIR)/crypto_api/ec_wrst $(CODESAFE_SRCDIR)/crypto_api/ec_wrst/ecc_domains
-
-#mbedtls headers
-INCDIRS_EXTRA += $(MBEDTLS_ROOT)/include/mbedtls $(MBEDTLS_ROOT)/include
-INCDIRS_EXTRA += $(UTILS_API) $(MANAGEMENT_API)
-INCDIRS_EXTRA += $(UTILS_API)
-INCDIRS_EXTRA += $(MBEDTLS_ALT_DIR)
-
-#SBROM
-INCDIRS_EXTRA += $(SBROM_DIR)/secure_boot_gen $(SBROM_DIR)/common
-INCDIRS_EXTRA += $(SBROM_DIR)/platform/common/cc3x $(SBROM_DIR)/platform/pal/cc3x $(SBROM_DIR)/platform/stage/rt/cc3x
-INCDIRS_EXTRA += $(SBROM_DIR)/secure_debug/cc3x $(SBROM_DIR)/crypto_driver $(SBROM_DIR)/crypto_driver/reg
-INCDIRS_EXTRA += $(SBROM_DIR)/cc3x_verifier $(HOST_SRCDIR)/cc3x_sbromlib
-INCDIRS_EXTRA += $(SBROM_DIR)/platform/nvm $(SBROM_DIR)/platform/nvm/cc3x_nvm_rt
-
-CFLAGS_EXTRA += -DDLLI_MAX_BUFF_SIZE=$(DLLI_MAX_BUFF_SIZE)
-CFLAGS_EXTRA += -DFW_VER_MAJOR=$(FW_VER_MAJOR) -DFW_VER_MINOR=$(FW_VER_MINOR) -DFW_VER_PATCH=$(FW_VER_PATCH)
-CFLAGS_EXTRA += -DCC_HW_VERSION=$(CC_HW_VERSION)
-
-# define flag for non supported RND_DMA
-ifeq ($(CC_CONFIG_RND_TEST_MODE),CC_RND_TEST_MODE)
-CFLAGS_EXTRA += -DCC_RND_TEST_MODE
-endif
-
-ifeq ($(CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES),)
- #default
- CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES = 8192
-endif
-
-ifeq ($(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES),)
- #default
- CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES = 512
-endif
-
-CFLAGS_EXTRA += -DCC_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES=$(CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES)
-CFLAGS_EXTRA += -DCC_MNG_MIN_BACKUP_SIZE_IN_BYTES=$(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES)
-CFLAGS_EXTRA += -DCC_SB_CERT_VERSION_MAJOR=$(CC_CONFIG_SB_CERT_VERSION_MAJOR)
-CFLAGS_EXTRA += -DCC_SB_CERT_VERSION_MINOR=$(CC_CONFIG_SB_CERT_VERSION_MINOR)
-
-
-# List of drivers to enable/disable
-DRIVERS = AES
-CFLAGS_EXTRA += $(foreach driver,$(DRIVERS),$(if $(FW_ENABLE_$(driver)_DRIVER),-DENABLE_$(driver)_DRIVER=$(FW_ENABLE_$(driver)_DRIVER)))
-
-
-ifeq ($(CC_CONFIG_SUPPORT_SRP),1)
- PUBLIC_INCLUDES += $(CC_API_3x)/mbedtls_cc_srp.h $(CC_API_3x)/mbedtls_cc_srp_error.h
- VPATH += $(CODESAFE_SRCDIR)/crypto_api/pki/srp
- INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/pki/srp
- SOURCES_cc_312 += mbedtls_cc_srp.c srp_driver.c srp.c
-endif
-
-# EC Montgomery and EC Edwards includes and files
-
-#EC_MONT
-
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/ec_mont $(CODESAFE_SRCDIR)/crypto_api/pki/ec_mont
-SOURCES_cc_312 += cc_ec_mont.c ec_mont.c pka_ec_mont.c
-SOURCES_cc_312 += ec_mont_domain_curve25519.c
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/ec_mont $(CODESAFE_SRCDIR)/crypto_api/pki/ec_mont
-#EC_EDW
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/ec_edw $(CODESAFE_SRCDIR)/crypto_api/pki/ec_edw
-SOURCES_cc_312 += cc_ec_edw.c ec_edw.c pka_ec_edw.c
-SOURCES_cc_312 += ec_edw_domain_25519.c
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/ec_edw $(CODESAFE_SRCDIR)/crypto_api/pki/ec_edw
-
-
-
-
-# We should flatten the components source trees to avoid long search paths...
-VPATH += $(HOST_SRCDIR)/hal/$(PROJ_PRD) $(UTILS_API) $(MANAGEMENT_API)
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api $(CODESAFE_DIR)/src/crypto_api/cc3x_sym/driver $(CODESAFE_SRCDIR)/crypto_api/kdf $(CODESAFE_SRCDIR)/crypto_api/rnd_dma
-VPATH += $(SHARED_SRCDIR)/proj/$(PROJ_PRD) $(CODESAFE_SRCDIR)/crypto_api/common
-#pka, rsa, dh, ffcdh etc. directories
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/pki/common $(CODESAFE_SRCDIR)/crypto_api/pki/ec_wrst $(CODESAFE_SRCDIR)/crypto_api/pki/rsa
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/rsa/ $(CODESAFE_SRCDIR)/crypto_api/ec_wrst $(CODESAFE_SRCDIR)/crypto_api/ec_wrst/ecc_domains
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/dh $(CODESAFE_SRCDIR)/crypto_api/pki/poly
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/ffcdh $(CODESAFE_SRCDIR)/crypto_api/ffc_domain
-VPATH += $(MBEDTLS_ALT_DIR)
-#sbrom
-VPATH += $(SBROM_DIR)/cc3x_verifier $(SBROM_DIR)/crypto_driver $(SBROM_DIR)/secure_boot_gen $(SBROM_DIR)/common
-VPATH += $(SBROM_DIR)/platform/common/cc3x $(SBROM_DIR)/platform/nvm/cc3x_nvm_rt $(HOST_SRCDIR)/cc3x_sbromlib
-VPATH += $(SBROM_DIR)/x509_cert_parser $(SBROM_DIR)/util $(SBROM_DIR)/platform/pal
-
-# SCA protection flag
-ifeq ($(CC_CONFIG_SUPPORT_ECC_SCA_SW_PROTECT), 1)
- CFLAGS_EXTRA += -DCC_SUPPORT_ECC_SCA_SW_PROTECT
-endif
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
-ifeq ($(DEBUG),1)
-CFLAGS += -DTEST_DEBUG
-endif
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/Makefile
deleted file mode 100644
index 270e11d0f..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-SUB_DIRS = cmpu dmpu
-OS = no_os
-
-all: $(foreach sub_dir,$(SUB_DIRS),do_$(sub_dir))
-
-clean: $(foreach sub_dir,$(SUB_DIRS),clean_$(sub_dir))
-
-clean_%:
- @make -C $* clean
-
-do_%:
- @make -C $*
-
-.PHONY: all clean clean_% do_%
-
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/Makefile
deleted file mode 100644
index 754f1b7fc..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for cmpu utility
-HOST_PROJ_ROOT ?= ../../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-#overwriting the OS defined in the config
-OS = no_os
-export
-
-include project_cmpu.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/project_cmpu.mk b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/project_cmpu.mk
deleted file mode 100644
index 245482be2..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/project_cmpu.mk
+++ /dev/null
@@ -1,107 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-TARGET_LIBS = cmpu
-
-SOURCES_cmpu = cmpu.c
-SOURCES_cmpu += cmpu_llf_rnd.c
-SOURCES_cmpu += cmpu_derivation.c
-SOURCES_cmpu += prod_crypto_driver.c
-SOURCES_cmpu += prod_util.c
-SOURCES_cmpu += cc_hal.c
-SOURCES_cmpu += aes_driver.c
-SOURCES_cmpu += driver_common.c
-SOURCES_cmpu += aesccm_driver.c
-SOURCES_cmpu += ccm_alt.c
-SOURCES_cmpu += mbedtls_ccm_internal.c
-SOURCES_cmpu += mbedtls_common.c
-SOURCES_cmpu += mbedtls_cc_mng_int.c
-SOURCES_cmpu += cc_common_conv_endian.c
-SOURCES_cmpu += cc_rng_plat.c
-SOURCES_cmpu += llf_rnd.c
-
-#pal sources:
-SOURCES_cmpu += cc_pal.c
-SOURCES_cmpu += cc_pal_mutex.c
-SOURCES_cmpu += cc_pal_memmap.c
-SOURCES_cmpu += cc_pal_dma.c
-SOURCES_cmpu += cc_pal_pm.c
-SOURCES_cmpu += cc_pal_interrupt_ctrl.c
-SOURCES_cmpu += cc_pal_buff_attr.c
-SOURCES_cmpu += cc_pal_mem.c
-SOURCES_cmpu += cc_pal_abort_plat.c
-SOURCES_cmpu += cc_pal_trng.c
-
-ifeq ($(DEBUG),1)
- SOURCES_cmpu += cc_pal_log.c
-endif
-
-ifeq ($(CC_CONFIG_TRNG_MODE),0)
- # FE TRNG
- $(info FE TRNG: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
- SOURCES_cmpu += llf_rnd_fetrng.c
- CFLAGS_EXTRA += -DCC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE)
-else ifeq ($(CC_CONFIG_TRNG_MODE),1)
- # TRNG90B
- $(info TRNG90B: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
- SOURCES_cmpu += llf_rnd_trng90b.c
- CFLAGS_EXTRA += -DCC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE)
-else
- $(error illegal TRNG: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
-endif
-
-ifeq ($(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES),)
- #default
- CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES = 512
-endif
-
-VPATH += ../common
-VPATH += $(HOST_SRCDIR)/pal
-VPATH += $(HOST_SRCDIR)/pal/$(OS)
-VPATH += $(HOST_SRCDIR)/hal/cc3x
-VPATH += $(HOST_SRCDIR)/cc3x_lib
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/rnd_dma
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/driver
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/common
-VPATH += $(CODESAFE_SRCDIR)/mbedtls_api
-VPATH += $(HOST_SRCDIR)/cc_mng
-
-PUBLIC_INCLUDES += $(SHARED_DIR)/include/crypto_api/cc_error.h
-PUBLIC_INCLUDES += cc_cmpu.h ../common/cc_prod.h ../common/cc_prod_error.h
-PUBLIC_INCLUDES += cmpu_derivation.h cmpu_llf_rnd.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_mng/mbedtls_cc_mng.h
-
-INCDIRS_EXTRA += $(HOST_SRCDIR)/pal/$(OS)
-INCDIRS_EXTRA += $(SHARED_DIR)/$(CC_TEE_HW_INC_DIR)
-INCDIRS_EXTRA += ../common
-INCDIRS_EXTRA += $(SHARED_DIR)/include/crypto_api
-INCDIRS_EXTRA += $(SHARED_DIR)/include/pal
-INCDIRS_EXTRA += $(SHARED_DIR)/include/pal/$(OS)
-INCDIRS_EXTRA += $(SHARED_DIR)/include/mbedtls
-INCDIRS_EXTRA += $(SHARED_DIR)/include/proj/$(PROJ)
-INCDIRS_EXTRA += $(SHARED_DIR)/../mbedtls/include
-INCDIRS_EXTRA += $(SHARED_DIR)/../mbedtls/include/mbedtls
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc3x_lib
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc_mng
-INCDIRS_EXTRA += $(SHARED_INCDIR)/cc_mng
-INCDIRS_EXTRA += $(SHARED_INCDIR)/trng
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/rnd_dma/local/
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/rnd_dma
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/common
-INCDIRS_EXTRA += $(SHARED_INCDIR)/crypto_api/$(PROJ_PRD)
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/driver
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/mbedtls_api
-
-CFLAGS += -DCC_TEE -DCC_IOT# used for register defines
-CFLAGS_EXTRA += -DDLLI_MAX_BUFF_SIZE=$(DLLI_MAX_BUFF_SIZE)
-CFLAGS_EXTRA += -DCC_MNG_MIN_BACKUP_SIZE_IN_BYTES=$(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES)
-
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_util.c b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_util.c
index 361d2486b..74172c893 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_util.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -23,14 +23,6 @@
#include "prod_util.h"
-// These are empty mutexs - no mutexes are needed in production pahse
-CC_PalMutex CCSymCryptoMutex;
-CC_PalMutex CCSymCryptoMutex;
-CC_PalMutex CCAsymCryptoMutex;
-CC_PalMutex CCRndCryptoMutex;
-CC_PalMutex *pCCRndCryptoMutex;
-CC_PalMutex CCApbFilteringRegMutex;
-
/**
* @brief This function
*
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/Makefile
deleted file mode 100644
index f51797cf4..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for cmpu utility
-HOST_PROJ_ROOT ?= ../../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-#overwriting the OS defined in the config
-OS = no_os
-export
-
-include project_dmpu.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/project_dmpu.mk b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/project_dmpu.mk
deleted file mode 100644
index e51422b8c..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/project_dmpu.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-TARGET_LIBS = dmpu
-
-SOURCES_dmpu = dmpu.c
-SOURCES_dmpu += prod_crypto_driver.c
-SOURCES_dmpu += prod_util.c
-SOURCES_dmpu += cc_hal.c
-SOURCES_dmpu += aes_driver.c
-SOURCES_dmpu += aesccm_driver.c
-SOURCES_dmpu += driver_common.c
-SOURCES_dmpu += ccm_alt.c
-SOURCES_dmpu += mbedtls_common.c
-SOURCES_dmpu += mbedtls_ccm_internal.c
-SOURCES_dmpu += mbedtls_cc_mng.c
-SOURCES_dmpu += mbedtls_cc_mng_int.c
-SOURCES_dmpu += cc_common_conv_endian.c
-
-#pal sources
-SOURCES_dmpu += cc_pal.c
-SOURCES_dmpu += cc_pal_mutex.c
-SOURCES_dmpu += cc_pal_memmap.c
-SOURCES_dmpu += cc_pal_dma.c
-SOURCES_dmpu += cc_pal_pm.c
-SOURCES_dmpu += cc_pal_interrupt_ctrl.c
-SOURCES_dmpu += cc_pal_buff_attr.c
-SOURCES_dmpu += cc_pal_mem.c
-SOURCES_dmpu += cc_pal_abort_plat.c
-
-ifeq ($(DEBUG),1)
- SOURCES_dmpu += cc_pal_log.c
-endif
-
-ifeq ($(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES),)
- #default
- CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES = 512
-endif
-
-VPATH += ../common
-VPATH += $(HOST_SRCDIR)/cc3x_productionlib/cmpu
-VPATH += $(HOST_SRCDIR)/pal/$(OS)
-VPATH += $(HOST_SRCDIR)/hal/cc3x
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/driver
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api
-VPATH += $(CODESAFE_SRCDIR)/crypto_api/common
-VPATH += $(CODESAFE_SRCDIR)/mbedtls_api
-VPATH += $(HOST_SRCDIR)/cc_mng
-
-PUBLIC_INCLUDES += $(SHARED_DIR)/include/crypto_api/cc_error.h
-PUBLIC_INCLUDES += $(HOST_SRCDIR)/cc3x_productionlib/cmpu/cc_cmpu.h
-PUBLIC_INCLUDES += cc_dmpu.h ../common/cc_prod.h ../common/cc_prod_error.h
-
-INCDIRS_EXTRA += $(SHARED_DIR)/$(CC_TEE_HW_INC_DIR)
-INCDIRS_EXTRA += ../common
-INCDIRS_EXTRA += ../cmpu
-INCDIRS_EXTRA += $(SHARED_DIR)/include/pal
-INCDIRS_EXTRA += $(SHARED_DIR)/include/crypto_api
-INCDIRS_EXTRA += $(HOST_SRCDIR)/pal/$(OS)
-INCDIRS_EXTRA += $(SHARED_DIR)/include/pal/$(OS)
-INCDIRS_EXTRA += $(SHARED_DIR)/include/mbedtls
-INCDIRS_EXTRA += $(SHARED_DIR)/include/proj/$(PROJ)
-INCDIRS_EXTRA += $(SHARED_DIR)/../mbedtls/include
-INCDIRS_EXTRA += $(SHARED_DIR)/../mbedtls/include/mbedtls
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc3x_lib
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc_mng
-INCDIRS_EXTRA += $(SHARED_INCDIR)/cc_mng
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/common
-INCDIRS_EXTRA += $(SHARED_INCDIR)/crypto_api/$(PROJ_PRD)
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/driver
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/cc3x_sym/api
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/mbedtls_api
-
-CFLAGS += -DCC_TEE -DCC_IOT# used for register defines
-CFLAGS_EXTRA += -DDLLI_MAX_BUFF_SIZE=$(DLLI_MAX_BUFF_SIZE)
-CFLAGS_EXTRA += -DCC_MNG_MIN_BACKUP_SIZE_IN_BYTES=$(CC_CONFIG_MNG_MIN_BACKUP_SIZE_IN_BYTES)
-
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_sbromlib/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_sbromlib/Makefile
deleted file mode 100644
index a78269ecc..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_sbromlib/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-HOST_PROJ_ROOT ?= ../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-CFLAGS_EXTRA += -DCC_TEE -DCC_SB_SUPPORT_IOT
-OS =no_os
-include project_sbromlib.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/Makefile b/lib/ext/cryptocell-312-runtime/host/src/pal/Makefile
deleted file mode 100644
index d77d86aa3..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-SUB_DIRS = $(TEE_OS)
-
-all: $(foreach sub_dir,$(SUB_DIRS),do_$(sub_dir))
-
-clean: $(foreach sub_dir,$(SUB_DIRS),clean_$(sub_dir))
-
-clean_%:
- @make -C $* clean
-
-do_%:
- @make -C $*
-
-.PHONY: all clean clean_% do_%
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/freertos/Makefile b/lib/ext/cryptocell-312-runtime/host/src/pal/freertos/Makefile
deleted file mode 100644
index 90fee0a22..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/freertos/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for PAL for freertos
-
-HOST_PROJ_ROOT ?= ../../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-TARGET_LIBS = pal_freertos
-PLAT_OS = freertos
-
-include ../project_pal.mk
-include $(HOST_PROJ_ROOT)/Makefile.freertos
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/linux/Makefile b/lib/ext/cryptocell-312-runtime/host/src/pal/linux/Makefile
deleted file mode 100644
index 16c573204..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/linux/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for pal for linux
-
-HOST_PROJ_ROOT ?= ../../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-TARGET_LIBS = pal_linux
-PLAT_OS=linux
-include ../project_pal.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/Makefile b/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/Makefile
deleted file mode 100644
index 74e7ef61a..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for pal for linux
-
-HOST_PROJ_ROOT ?= ../../..
-include $(HOST_PROJ_ROOT)/Makefile.defs
-TARGET_LIBS = pal_no_os
-PLAT_OS=no_os
-include ../project_pal.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/project_pal.mk b/lib/ext/cryptocell-312-runtime/host/src/pal/project_pal.mk
deleted file mode 100644
index d5eb063bd..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/project_pal.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-CFLAGS_EXTRA += -DCC_IOT
-
-SOURCES_pal_$(PLAT_OS) += cc_pal.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_mutex.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_memmap.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_dma.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_pm.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_interrupt_ctrl.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_mem.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_buff_attr.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_abort_plat.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_trng.c
-SOURCES_pal_$(PLAT_OS) += cc_pal_apbc.c
-
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/cc_pal_types.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/cc_pal_log.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/cc_log_mask.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/$(PLAT_OS)/cc_pal_log_plat.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/$(PLAT_OS)/cc_pal_types_plat.h
-PUBLIC_INCLUDES += $(SHARED_INCDIR)/pal/cc_pal_buff_attr.h
-
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(PLAT_OS)
-
-INCDIRS_EXTRA += $(SHARED_DIR)/hw/include # for dx_reg_base_host.h, included in cc_pal.c
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal # for cc_pal_interrupt_ctrl.c
-
-ifeq ($(ARCH),arm)
-ifeq ($(CROSS_COMPILE),arm-none-eabi-)
-ifeq ($(ARM_CPU), cortex-m33)
-CFLAGS += -DSSE_200
-endif
-endif
-endif
-
-ifeq ($(DEBUG),1)
- SOURCES_pal_$(PLAT_OS) += cc_pal_log.c
- CFLAGS += -DDEBUG
-endif
-
-$(info TRNG: CC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE))
-CFLAGS_EXTRA += -DCC_CONFIG_TRNG_MODE=$(CC_CONFIG_TRNG_MODE)
-
-ifeq ($(LIB_PERF),1)
-SOURCES_pal_$(PLAT_OS) += cc_pal_perf_plat.c
-CFLAGS += -DLIB_PERF
-endif
-
-VPATH += $(HOST_SRCDIR)/pal $(HOST_SRCDIR)/pal/$(PLAT_OS)
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/TestAL/Makefile b/lib/ext/cryptocell-312-runtime/host/src/tests/TestAL/Makefile
deleted file mode 100755
index 193027ede..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/TestAL/Makefile
+++ /dev/null
@@ -1,252 +0,0 @@
-# ******************************************************************************
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-# ******************************************************************************
-
-# ************
-# Project Name
-# ************
-PROJECT_NAME = TestAL
-
-# ***********
-# Executables
-# ***********
-RM = rm -f
-ECHO = echo
-MKDIR = mkdir -p
-RMDIR = rm -rf
-CP = cp -R
-MV = mv
-
-# ****************
-# Path Definitions
-# ****************
-PAL_DIR = $(CURDIR)/pal
-HAL_DIR = $(CURDIR)/hal
-CONFIGS_DIR = $(CURDIR)/configs
-
-# ****************
-# Config Files
-# ****************
-PROJ_CFG_PATH = proj.cfg
-
-ifeq ($(wildcard $(PROJ_CFG_PATH)),$(PROJ_CFG_PATH))
-include $(PROJ_CFG_PATH)
-endif
-
-# ********
-# Includes
-# ********
-INCLUDES_PAL = $(PAL_DIR)/include
-INCLUDES_HAL = $(HAL_DIR)/include
-
-ifeq ($(OS),linux)
-INCLUDES = $(INCLUDES_PAL) $(if $(findstring target,$(DEVICE)), $(INCLUDES_HAL))
-
-else ifeq ($(OS),freertos)
-INCLUDES = $(INCLUDES_PAL) $(INCLUDES_HAL)
-
-COMPILER_TYPE_DIR = $(shell echo $(COMPILER_TYPE) | tr a-z A-Z)
-INCLUDES_FREERTOS = $(KERNEL_DIR)/OS/FreeRTOS/Source/include
-INCLUDES_FREERTOS += $(KERNEL_DIR)/OS/FreeRTOS/Source/portable/$(COMPILER_TYPE_DIR)/ARM_$(CORTEX_SHORT)
-INCLUDES_FREERTOS += $(KERNEL_DIR)/OS/FreeRTOS-Plus-CLI
-INCLUDES_FREERTOS += $(KERNEL_DIR)/OS/FreeRTOS-Plus-TCP/include
-INCLUDES_FREERTOS += $(KERNEL_DIR)/OS/FreeRTOS-Plus-TCP/portable/Compiler/$(COMPILER_TYPE_DIR)
-INCLUDES_FREERTOS += $(KERNEL_DIR)/boards/$(BOARD)
-INCLUDES_FREERTOS += $(KERNEL_DIR)/boards/$(BOARD)/$(CMSIS_DRIVER)
-INCLUDES_EXTRA = $(INCLUDES_FREERTOS)
-
-else ifeq ($(OS),mbedos)
-INCLUDES = $(INCLUDES_PAL) $(INCLUDES_HAL)
-
-INCLUDES_MBEDOS = $(KERNEL_DIR)/rtos/rtx5/TARGET_CORTEX_M
-INCLUDES_MBEDOS += $(KERNEL_DIR)/platform
-INCLUDES_EXTRA = $(INCLUDES_MBEDOS)
-
-else ifeq ($(OS),no_os)
-INCLUDES = $(INCLUDES_PAL) $(INCLUDES_HAL)
-INCLUDES_EXTRA = $(PAL_DIR)/$(OS)
-
-endif
-
-# **************
-# Make variables
-# **************
-ifeq ($(COMPILER_TYPE), armcc)
-CC = armcc
-LD = armlink
-AR = armar
-AS = armasm
-
-else ifeq ($(COMPILER_TYPE), armclang)
-CC = armclang
-LD = armlink
-AR = armar
-AS = armclang
-
-else ifeq ($(COMPILER_TYPE), gcc)
-CXX = $(CROSS_COMPILE)g++
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-AR = $(CROSS_COMPILE)ar
-AS = $(CROSS_COMPILE)as
-endif
-
-# ****************
-# Project Definitions
-# ****************
-SRCS_PAL = $(shell find $(PAL_DIR)/$(OS) -name '*.c' | grep -v malloc.c)
-SRCS_HAL = $(shell find $(HAL_DIR)/$(BOARD) -name '*.c')
-
-OBJS_PAL = $(SRCS_PAL:.c=.o)
-OBJS_HAL = $(SRCS_HAL:.c=.o)
-
-BIN_PAL = libPAL__$(OS)__$(CC)__$(shell echo $(CORTEX_SHORT) | tr A-Z a-z).a
-BIN_HAL = libHAL__$(OS)__$(CC)__$(shell echo $(CORTEX_SHORT) | tr A-Z a-z).a
-
-# *****
-# Flags
-# *****
-ifeq ($(COMPILER_TYPE), armcc)
-CFLAGS += --cpu=$(CORTEX)
-CFLAGS += --thumb
-CFLAGS += -DTEST_DEBUG
-CFLAGS += -DCMSDK_$(CORTEX_SHORT)
-CFLAGS += -D__CC_ARM -DFPGA_IMAGE
-CFLAGS += -DportREMOVE_STATIC_QUALIFIER
-CFLAGS += -DINCLUDE_xTaskGetIdleTaskHandle=1
-CFLAGS += -DconfigQUEUE_REGISTRY_SIZE=8
-CFLAGS += -DDX_PLAT_MPS2_PLUS
-CFLAGS += -O0 -g
-CFLAGS += -DCC_TEE -DCC_IOT -DCC_REE
-CFLAGS += $(foreach incdir, $(INCLUDES), -I$(incdir))
-CFLAGS += $(foreach incdir, $(INCLUDES_EXTRA), -I$(incdir))
-
-CFLAGS += $(if $(findstring freertos,$(OS)), -D$(CMSIS_DRIVER))
-
-ARFLAGS = -rcs
-
-else ifeq ($(COMPILER_TYPE), armclang)
-LDFLAGS += --cpu=$(CORTEX)
-LDFLAGS += --map --verbose
-LDFLAGS += --list=$(PROJ_NAME).map
-LDFLAGS += --entry=Reset_Handler
-LDFLAGS += --dangling_debug_address 0xF0000000 # Moves unneeded debug sections
-
-CFLAGS += --target=arm-arm-none-eabi
-CFLAGS += $(if $(strip $(M_ARCH)),-march=$(M_ARCH),-mcpu=$(CORTEX))
-CFLAGS += -mlittle-endian
-CFLAGS += -xc -O0 -g -Wno-pragma-pack
-CFLAGS += -mthumb
-CFLAGS += $(if $(findstring 1,$(TZM)), -mcmse -DTZM) # Supports CMSE
-CFLAGS += -DCORTEX_$(CORTEX_SHORT)
-CFLAGS += -D$(CMSIS_DRIVER)
-CFLAGS += -DARM$(CORTEX_SHORT)
-CFLAGS += -DconfigQUEUE_REGISTRY_SIZE=8U
-CFLAGS += -DCC_TEE -DDX_PLAT_MPS2_PLUS
-CFLAGS += $(if $(findstring SSE_200,$(CMSIS_DRIVER)), -mfpu=none)
-CFLAGS += $(if $(findstring SSE_200,$(CMSIS_DRIVER)), -mcmse)
-CFLAGS += $(foreach incdir, $(INCLUDES), -I$(incdir))
-CFLAGS += $(foreach incdir, $(INCLUDES_EXTRA), -I$(incdir))
-
-ARFLAGS = -rcs
-
-else # aarch64-linux-gnu- , arm-xilinx-linux-gnueabi- , arm-none-eabi-, arm-buildroot-linux-gnueabi-,
-# aarch64-buildroot-linux-gnu- and native
-CFLAGS += $(if $(findstring target,$(DEVICE)), \
- $(if $(strip $(M_ARCH)),-march=$(M_ARCH),-mcpu=$(CORTEX)),)
-CFLAGS += -DTEST_DEBUG -DLITTLE__ENDIAN -DHASLONGLONG
-CFLAGS += -Wall -Wsign-compare -Wextra
-CFLAGS += -Wstrict-prototypes -Wwrite-strings
-CFLAGS += -Wswitch-default -Wunreachable-code
-CFLAGS += -Winit-self -Wjump-misses-init -Wlogical-op
-CFLAGS += -o2 -g
-CFLAGS += $(if $(findstring 1,$(TZM)), -mcmse -DTZM) # Supports CMSE
-
-CFLAGS += $(foreach incdir, $(INCLUDES), -I$(incdir))
-CFLAGS += $(foreach incdir, $(INCLUDES_EXTRA), -I$(incdir))
-
-CFLAGS += $(if $(findstring freertos,$(OS)), -D$(CMSIS_DRIVER))
-
-CFLAGS += $(if $(findstring mbedos,$(OS)), -Wno-missing-field-initializers, -Wmissing-field-initializers)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -Wno-unused-parameter)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -DMBED_DEBUG -DMBED_TRAP_ERRORS_ENABLED=1)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -std=gnu99 -c)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -fmessage-length=0 -fno-exceptions -fno-builtin)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -ffunction-sections -fdata-sections -funsigned-char)
-CFLAGS += $(if $(findstring mbedos,$(OS)), -fno-delete-null-pointer-checks -fomit-frame-pointer)
-
-ARFLAGS = -rcs
-endif
-
-# ****************
-# Build Operations
-# ****************
-############ Special rules for configuration selection ##############
-ifneq ($(wildcard $(PROJ_CFG_PATH)),$(PROJ_CFG_PATH))
-
-all: # default in case there is no proj.cfg and setconfig_ was not used
- $(info Invoke 'make setconfig_<config. name>' to select project configuration )
-
-setconfig_%: $(CONFIGS_DIR)/proj-%.cfg
- $(info [CFG] $< --> $(PROJ_CFG_PATH))
- @ln -s $< $(PROJ_CFG_PATH)
-
-$(CONFIGS_DIR)/proj-%.cfg:
- @$(info Unknown project configuration. $@ does not exist.)
- @exit 1;
-
-clrconfig:
- $(info No active configuration )
-
-############ Special rules for project configuration selection ##############
-else
-
-all : check_var print_var pal $(if $(findstring target,$(DEVICE)),hal) passed
-
-check_var: guard-OS guard-CORTEX\
-$(if $(findstring target,$(DEVICE)),guard-CROSS_COMPILE guard-BOARD) \
-$(if $(findstring freertos,$(OS)),guard-KERNEL_DIR) \
-$(if $(findstring mbedos,$(OS)),guard-KERNEL_DIR)
-
-guard-%:
- @ if [ "${${*}}" = "" ]; then \
- echo "$* is undefined"; \
- exit 1; \
- fi
-
-print_var:
- @echo "\033[42m*********************************************\033[0m"
- @echo "\033[42m board[$(BOARD)] device[$(DEVICE)] OS[$(OS)] \033[0m"
- @echo "\033[42m*********************************************\033[0m"
-
-pal: $(OBJS_PAL)
- $(AR) $(ARFLAGS) $(BIN_PAL) $(OBJS_PAL)
-
-hal: $(OBJS_HAL)
- $(AR) $(ARFLAGS) $(BIN_HAL) $(OBJS_HAL) $(PAL_BIN)
-
-passed:
- @echo "\033[42m***************\033[0m"
- @echo "\033[42m* P A S S E D *\033[0m"
- @echo "\033[42m***************\033[0m"
-
-clrconfig:
- $(RM) $(PROJ_CFG_PATH)
-
-
-
-endif
-
-clean:
- $(shell find . -name '*.d' -delete)
- $(shell find . -name '*.o' -delete)
-
-distclean: clrconfig clean
- $(shell find . -name '*.a' -delete)
- $(RMDIR) $(shell find $(HAL_DIR) -name 'includes*')
- $(RMDIR) Release
-
-# END PAL Makefile
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/Makefile b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/Makefile
deleted file mode 100755
index 4829c0cbf..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/Makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for integration tests
-HOST_PROJ_ROOT ?= ../../..
-
-TEST_AL_PATH = ../TestAL
-TEST_AL_GIT =
-TEST_AL_GIT_TAG = TAG_TESTAL_VER_3.02
-
-
-include $(HOST_PROJ_ROOT)/Makefile.defs
-$(info PROJ_PRD $(PROJ_PRD))
-copy_integ_cfg := $(shell test -f $(HOST_PROJ_ROOT)/src/tests/integration_$(PROJ_PRD)/proj_integration_tests.cfg || cp $(HOST_PROJ_ROOT)/proj.cfg $(HOST_PROJ_ROOT)/src/tests/integration_$(PROJ_PRD)/proj_integration_tests.cfg)
-include $(HOST_PROJ_ROOT)/src/tests/integration_$(PROJ_PRD)/proj_integration_tests.cfg
-
-ifeq ($(TEE_OS), freertos)
-include $(HOST_SRCDIR)/../Makefile.freertos
-endif
-export
-
-INTEGRATION_TESTS = $(INTEG_TESTS)
-RELEASE_INTEGRATION_TESTS = $(foreach module,$(INTEGRATION_TESTS),release_$(module))
-CLEAN_INTEGRATION_TESTS = $(foreach module,$(INTEGRATION_TESTS),clean_$(module))
-CLEAN_INTRMD_TARGETS = $(foreach module,$(INTEGRATION_TESTS),clean_intermediate_$(module))
-
-RELEASE_INTEGRATION_SCRIPTS = $(foreach script,$(TESTER_INTEGRATION_SCRIPTS),release_$(script))
-CLEAN_INTEGRATION_SCRIPTS = $(foreach script,$(TESTER_INTEGRATION_SCRIPTS),clean_$(script))
-
-#|--------------------------TestAL_3.02---------------------------------|
-#|ConfNum| OS | CPU | Toolchain | Device | Board |
-#|----------------------------------------------------------------------|
-#| 1 | linux | cortex-a9 | arm-xilinx | target | Zynq |
-#| 2 | | | Deprecated | | |
-#| 3 | linux | x86 | native | host | |
-#| 4 | freertos | cortex-m3 | arm-compiler-5 | target | MPS2+ |
-#| 5 | | | Deprecated | | |
-#| 6 | no_os | cortex-m3 | arm-compiler-5 | target | MPS2+ |
-#| 7 | freertos | cortex-m33 | arm-none-eabi | target | MPS2+ |
-#| 8 | linux | cortex-a9 | arm-br-7.3 | target | Zynq |
-#| 9 | freertos | cortex-m3 | arm-none-eabi | target | MPS2+ |
-#| 10 | linux | a72 a53 | aarch64-br-7.3 | target | Juno |
-#| 11 | freertos | cortex-m33 | arm-compiler-6 | target | MPS2+ |
-#| 12 | freertos | cortex-m3 | arm-compiler-6 | target | MPS2+ |
-#|----------------------------------------------------------------------|
-# for sbrom use run_all_sbrom_integration_tests.sh otherwise use run_all_integration_tests.sh
-TEST_AL_CONFIG_NUM =$(if $(findstring cortex-a9,${ARM_CPU} ), 1,)
-
-ifeq ($(CROSS_COMPILE), armcc)
-TEST_AL_CONFIG_NUM = 4
-else ifeq ($(CROSS_COMPILE), armclang)
-TEST_AL_CONFIG_NUM =$(if $(findstring cortex-m33,${ARM_CPU} ), 11 , 12)
-else ifeq ($(CROSS_COMPILE), arm-none-eabi-)
-TEST_AL_CONFIG_NUM =$(if $(findstring cortex-m33,${ARM_CPU} ), 7 , 9)
-endif
-
-default: build_test_al $(RELEASE_INTEGRATION_TESTS) $(RELEASE_INTEGRATION_SCRIPTS)
-#generate_run_all_integration_tests
-
-clean: $(CLEAN_INTEGRATION_TESTS) $(CLEAN_INTEGRATION_SCRIPTS)
-
-clean_intermediate: $(CLEAN_INTRMD_TARGETS)
-
-
-# Generic release rules recipes
-
-build_test_al: clean_test_al
- if [ ! -d $(TEST_AL_PATH) ]; then git clone $(TEST_AL_GIT) $(TEST_AL_PATH); cd $(TEST_AL_PATH) && git checkout $(TEST_AL_GIT_TAG) && ./TestAL-Lite/testal_lite.sh; fi
- echo [RUN] "./build_config.sh $(TEST_AL_CONFIG_NUM)"
- cd $(TEST_AL_PATH) && ./build_config.sh $(TEST_AL_CONFIG_NUM)
- mv $(TEST_AL_PATH)/libHAL* $(HOST_PROJ_ROOT)/lib/libtests_hal_lite.a
- mv $(TEST_AL_PATH)/libPAL* $(HOST_PROJ_ROOT)/lib/libtests_pal_lite.a
- @$(if $(subst freertos,,$(TEE_OS)),, $(ECHO) [CP] $(HOST_PROJ_ROOT)/lib/libtests*.a --\> $(KERNEL_DIR)/lib)
- @$(if $(subst freertos,,$(TEE_OS)),, $(CP) $(HOST_PROJ_ROOT)/lib/libtests*.a $(KERNEL_DIR)/lib)
-
-$(RELEASE_INTEGRATION_TESTS): release_%:
- @$(ECHO) [REL] $*
- @$(MAKE) -s -C $*
-
-$(CLEAN_INTEGRATION_TESTS): clean_%:
- @$(ECHO) [CLN] $*
- @$(MAKE) -s -C $* clean
-
-$(CLEAN_INTRMD_TARGETS): clean_intermediate_%:
- @$(ECHO) [CLN-INT] $*
- @$(MAKE) -s -C $* clean_intermediate
-
-clean_test_al:
- @$(ECHO) [CLN-TEST-AL]
- @$(RM) ../TestAL/*.a
-
-.PHONY: default build_test_al clean_test_al clean clean_intermediate $(RELEASE_INTEGRATION_TESTS) $(CLEAN_INTEGRATION_TESTS) $(CLEAN_INTRMD_TARGETS) $(RELEASE_INTEGRATION_SCRIPTS) $(CLEAN_INTEGRATION_SCRIPTS) generate_run_all_integration_tests
-
-
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/Makefile b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/Makefile
deleted file mode 100644
index 3cd8cc707..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-HOST_PROJ_ROOT ?= ../../../..
-
-ifneq (,$(findstring gnu,$(CROSS_COMPILE)))
-TEE_OS = linux
-else
-TEE_OS = freertos
-endif
-
-ifneq ($(wildcard $(HOST_PROJ_ROOT)/../configs/proj-cc312-sbrom_integration_tests.cfg),)
-$(info Compiling for Internal ARM use)
-ARM_INTERNAL=1
-else
-ARM_INTERNAL=0
-endif
-
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-include cmpu_integration_test.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules \ No newline at end of file
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/cmpu_integration_test.mk b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/cmpu_integration_test.mk
deleted file mode 100644
index 7cd70fb77..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/cmpu_integration_test/cmpu_integration_test.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-include ../proj_integration_tests.cfg
-include $(HOST_PROJ_ROOT)/Makefile.test_suite
-include $(HOST_PROJ_ROOT)/../proj.ext.cfg
-
-ifneq ($(TEE_OS),linux)
-TARGET_LIBS = cmpu_integration_test
-else
-TARGET_EXES = cmpu_integration_test
-DEPLIBS = cmpu
-DEPLIBS += $(TEST_AL_LITE_LIBS)
-endif
-
-# Unit test dependencies
-SOURCES_cmpu_integration_test = cmpu_integration_test.c
-SOURCES_cmpu_integration_test += cmpu_integration_test_arm.c
-SOURCES_cmpu_integration_test += $(filter-out test_proj_cclib.c,$(PROJ_SOURCES))
-
-ifeq ($(TEST_DEBUG),1)
-CFLAGS_EXTRA += -DTEST_DEBUG=1# use to toggle debug
-endif
-
-CFLAGS_EXTRA+=-DCC_TEE
-
-TEST_INCLUDES += $(CURDIR)/cmpu_integration_test.h
-INCDIRS_EXTRA += $(CURDIR)/pal/include
-
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)/include
-INCDIRS_EXTRA += $(SHARED_INCDIR)/proj/cc3x
-INCDIRS_EXTRA += $(SHARED_DIR)/include/proj/cc3x
-
-INCDIRS_EXTRA += $(HOST_PROJ_ROOT)/include
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal/$(TEST_PRODUCT)
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc3x_productionlib/cmpu
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc3x_productionlib/common
-INCDIRS_EXTRA += $(PROJ_INCLUDE)
-INCDIRS_EXTRA += $(TEST_AL_INCLUDE)
-
-INCDIRS_EXTRA += $(SHARED_DIR)/hw/include
-
-ifeq ($(TEE_OS), freertos)
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS/Source/include
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS-Plus-CLI
-INCDIRS_EXTRA += $(KERNEL_DIR)/board/MPS2+
-INCDIRS_EXTRA += $(KERNEL_DIR)/lib/main
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS/Source/portable/RVDS/ARM_CM3
-endif
-
-VPATH += $(CURDIR)/pal/$(TEE_OS)
-VPATH += $(CURDIR)/hal/$(TEST_PRODUCT)
-VPATH += $(PROJ_VPATH) \ No newline at end of file
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/Makefile b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/Makefile
deleted file mode 100644
index 64f2551d5..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-HOST_PROJ_ROOT ?= ../../../..
-
-ifneq (,$(findstring gnu,$(CROSS_COMPILE)))
-TEE_OS = linux
-else
-TEE_OS = freertos
-endif
-
-ifneq ($(wildcard $(HOST_PROJ_ROOT)/../configs/proj-cc312-sbrom_integration_tests.cfg),)
-$(info Compiling for Internal ARM use)
-ARM_INTERNAL=1
-else
-ARM_INTERNAL=0
-endif
-
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-include dmpu_integration_test.mk
-
-include $(HOST_PROJ_ROOT)/Makefile.rules \ No newline at end of file
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/dmpu_integration_test.mk b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/dmpu_integration_test.mk
deleted file mode 100644
index ed847f649..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/dmpu_integration_test/dmpu_integration_test.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-include ../proj_integration_tests.cfg
-include $(HOST_PROJ_ROOT)/Makefile.test_suite
-include $(HOST_PROJ_ROOT)/../proj.ext.cfg
-
-ifneq ($(TEE_OS),linux)
-TARGET_LIBS = dmpu_integration_test
-else
-TARGET_EXES = dmpu_integration_test
-DEPLIBS = dmpu
-DEPLIBS += $(TEST_AL_LITE_LIBS)
-
-endif
-
-# Unit test dependencies
-SOURCES_dmpu_integration_test = dmpu_integration_test.c
-SOURCES_dmpu_integration_test += dmpu_integration_test_arm.c
-SOURCES_dmpu_integration_test += $(filter-out test_proj_cclib.c,$(PROJ_SOURCES))
-
-ifeq ($(TEST_DEBUG),1)
-CFLAGS_EXTRA += -DTEST_DEBUG=1# use to toggle debug
-endif
-
-CFLAGS_EXTRA+=-DCC_TEE
-
-TEST_INCLUDES += $(CURDIR)/dmpu_integration_test.h
-INCDIRS_EXTRA += $(CURDIR)/pal/include
-
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)/include
-INCDIRS_EXTRA += $(SHARED_DIR)/include/proj/cc3x
-INCDIRS_EXTRA += $(PROJ_INCLUDE)
-INCDIRS_EXTRA += $(TEST_AL_INCLUDE)
-
-INCDIRS_EXTRA += $(HOST_PROJ_ROOT)/include
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal/$(TEST_PRODUCT)
-INCDIRS_EXTRA += $(HOST_SRCDIR)/cc3x_productionlib/dmpu
-
-INCDIRS_EXTRA += $(SHARED_DIR)/hw/include
-
-ifeq ($(TEE_OS), freertos)
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS/Source/include
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS-Plus-CLI
-INCDIRS_EXTRA += $(KERNEL_DIR)/board/MPS2+
-INCDIRS_EXTRA += $(KERNEL_DIR)/lib/main
-INCDIRS_EXTRA += $(KERNEL_DIR)/OS/FreeRTOS/Source/portable/RVDS/ARM_CM3
-endif
-
-VPATH += $(CURDIR)/pal/$(TEE_OS)
-VPATH += $(CURDIR)/hal/$(TEST_PRODUCT)
-VPATH += $(PROJ_VPATH) \ No newline at end of file
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/Makefile b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/Makefile
deleted file mode 100644
index abb8c7c8b..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-HOST_PROJ_ROOT ?= ../../../..
-
-ifneq (,$(findstring gnu,$(CROSS_COMPILE)))
-TEE_OS = linux
-else
-TEE_OS = freertos
-endif
-
-ifneq ($(wildcard $(HOST_PROJ_ROOT)/../configs/proj-cc312_integration_tests.cfg),)
-$(info Compiling for Internal ARM use)
-ARM_INTERNAL=1
-else
-ARM_INTERNAL=0
-endif
-
-
-include $(HOST_PROJ_ROOT)/Makefile.defs
-
-include run_integration_test.mk
-
-
-include $(HOST_PROJ_ROOT)/Makefile.rules \ No newline at end of file
diff --git a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/run_integration_test.mk b/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/run_integration_test.mk
deleted file mode 100644
index 5157ddf5d..000000000
--- a/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/run_integration_test.mk
+++ /dev/null
@@ -1,141 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-include ../proj_integration_tests.cfg
-include $(HOST_PROJ_ROOT)/Makefile.test_suite
-include $(HOST_PROJ_ROOT)/../proj.ext.cfg
-
-MBEDTLS_ROOT = $(HOST_SRCDIR)/../../mbedtls
-
-ifneq ($(TEE_OS),linux)
-TARGET_LIBS = run_integration_test
-else
-TARGET_EXES = run_integration_test
-LIBDIRS += $(MBEDTLS_ROOT)/library
-DEPLIBS = mbedcrypto
-DEPLIBS += cc_312 pal_$(TEE_OS)
-DEPLIBS += $(TEST_AL_LITE_LIBS)
-endif
-
-# Unit test dependencies
-SOURCES_run_integration_test = run_integration_test.c
-SOURCES_run_integration_test += run_integration_helper.c
-SOURCES_run_integration_test += run_integration_flash.c
-SOURCES_run_integration_test += run_integration_otp.c
-SOURCES_run_integration_test += run_integration_aes.c
-SOURCES_run_integration_test += run_integration_asset_prov.c
-SOURCES_run_integration_test += run_integration_sha.c
-SOURCES_run_integration_test += run_integration_ccm.c
-SOURCES_run_integration_test += run_integration_gcm.c
-SOURCES_run_integration_test += run_integration_ecdsa.c
-SOURCES_run_integration_test += run_integration_ecies.c
-SOURCES_run_integration_test += run_integration_ecdh.c
-SOURCES_run_integration_test += run_integration_rsa.c
-SOURCES_run_integration_test += run_integration_drbg.c
-SOURCES_run_integration_test += run_integration_key_derivation.c
-SOURCES_run_integration_test += run_integration_chacha.c
-SOURCES_run_integration_test += run_integration_srp.c
-SOURCES_run_integration_test += run_integration_mac.c
-SOURCES_run_integration_test += run_integration_dhm.c
-SOURCES_run_integration_test += run_integration_ext_dma.c
-SOURCES_run_integration_test += run_integration_test_arm.c
-SOURCES_run_integration_test += run_integration_secure_boot.c
-SOURCES_run_integration_test += $(PROJ_SOURCES)
-
-ifeq ($(TEE_OS),freertos)
-ifeq ($(ARM_INTERNAL),1)
-SOURCES_run_integration_test += run_integration_profiler_arm.c
-else
-SOURCES_run_integration_test += run_integration_profiler.c
-endif
-else # linux
-SOURCES_run_integration_test += run_integration_profiler.c
-endif
-
-TEST_INCLUDES += $(CURDIR)/run_integration_test.h
-
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)
-INCDIRS_EXTRA += $(SHARED_INCDIR)/pal/$(TEE_OS)/include
-
-INCDIRS_EXTRA += $(HOST_PROJ_ROOT)/include
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal
-INCDIRS_EXTRA += $(HOST_SRCDIR)/hal/$(TEST_PRODUCT)
-
-INCDIRS_EXTRA += $(CURDIR)/tests
-INCDIRS_EXTRA += $(CURDIR)/pal/include
-INCDIRS_EXTRA += $(CURDIR)/pal/$(TEE_OS)
-
-INCDIRS_EXTRA += $(PROJ_INCLUDE)
-INCDIRS_EXTRA += $(TEST_AL_INCLUDE)
-
-INCDIRS_EXTRA += $(CODESAFE_SRCDIR)/crypto_api/common #due to usage of inverse functions in test
-INCDIRS_EXTRA += $(SHARED_DIR)/hw/include
-INCDIRS_EXTRA += $(HOST_PROJ_ROOT)/../mbedtls/include
-
-
-ifeq ($(TEE_OS), freertos)
-include $(HOST_SRCDIR)/../Makefile.freertos
-endif
-
-ifeq ($(LIB_PERF),1)
-CFLAGS += -DLIB_PERF
-endif
-
-ifeq ($(PIE),1)
-CFLAGS += -DRUNIT_PIE_ENABLED
-endif
-
-ifeq ($(ARM_CPU),cortex-m33)
-# needed to identify in code which FPGA we are working with.
-# although the cortex should not matter the memory layout should.
-# for example the unmanaged memory address is different -> the certificates are different
-CFLAGS += -DCORTEX_M33_FPGA
-endif
-
-ifeq ($(TEST_DEBUG),1)
-CFLAGS_EXTRA += -DTEST_DEBUG=1# use to toggle debug
-endif
-
-ifeq ($(CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES),)
-CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES = 8192
-endif
-
-ifeq ($(CC_CONFIG_SB_X509_CERT_SUPPORTED),1)
-CFLAGS_EXTRA += -DCC_SB_X509_CERT_SUPPORTED
-endif
-
-ifeq ($(CC_CONFIG_CC_CHACHA_POLY_SUPPORT),1)
-CFLAGS_EXTRA += -DCC_CONFIG_CC_CHACHA_POLY_SUPPORT
-endif
-
-ifeq ($(CC_CONFIG_SUPPORT_SRP),1)
-CFLAGS_EXTRA += -DCC_CONFIG_SUPPORT_SRP
-endif
-
-
-ifneq ($(RUNIT_TEST_ITER_MAX),)
-ifeq ($(TEE_OS),freertos)
-ifeq ($(ARM_INTERNAL),1)
-CFLAGS_EXTRA+=-DRUNIT_TEST_ITER_MAX=$(RUNIT_TEST_ITER_MAX)
-endif
-endif
-endif
-
-ifeq ($(CC_CONFIG_SUPPORT_EXT_DMA),1)
-CFLAGS_EXTRA += -DCC_CONFIG_SUPPORT_EXT_DMA=1
-endif
-
-CFLAGS_EXTRA += -DCC_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES=$(CC_CONFIG_SB_DOUBLE_BUFFER_MAX_SIZE_IN_BYTES)
-CFLAGS_EXTRA += -DCC_TEE
-
-VPATH += $(CURDIR)/pal/$(TEE_OS)
-VPATH += $(CURDIR)/tests
-VPATH += $(CURDIR)/hal/$(TEST_PRODUCT)
-VPATH += $(PROJ_VPATH)
-
-
diff --git a/lib/ext/cryptocell-312-runtime/shared/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/shared/CMakeLists.txt
new file mode 100644
index 000000000..c29db138d
--- /dev/null
+++ b/lib/ext/cryptocell-312-runtime/shared/CMakeLists.txt
@@ -0,0 +1,45 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+target_include_directories(${CC312_LIB_TARGET}
+ PRIVATE
+ include/cc_mng
+ PUBLIC
+ hw/include
+ include
+ include/cc_util
+ include/crypto_api
+ include/crypto_api/cc3x
+ include/mbedtls
+ include/pal
+ include/pal/no_os
+ include/proj/cc3x
+)
+
+target_sources(${CC312_LIB_TARGET}
+ PRIVATE
+ src/proj/cc3x/cc_ecpki_info.c
+ src/proj/cc3x/cc_hash_info.c
+ src/proj/cc3x/cc_rsa_info.c
+)
+
+target_include_directories(${CC312_PAL_TARGET}
+ PRIVATE
+ include
+ include/proj/cc3x
+ hw/include
+ PUBLIC
+ include/pal
+ include/pal/no_os
+)
+
+target_include_directories(${CC312_CDMPU_TARGET}
+ PRIVATE
+ include/crypto_api
+ include/crypto_api/cc3x
+ include/cc_mng
+)
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/Makefile
deleted file mode 100644
index 639e8695f..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/Makefile
+++ /dev/null
@@ -1,111 +0,0 @@
-################################################################################
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-################################################################################
-
-# Utils top level Makefile
-
-UTILS_ROOT = $(PWD)/..
-
-all:
-
-clean_%:
- @echo "cleaning" $*
- @make -C $* clean
-
-distclean: clean clrconfig
- rm -rf $(UTILS_ROOT)/bin
- rm -rf $(UTILS_ROOT)/lib
- rm -rf $(UTILS_ROOT)/include
- rm -rf $(UTILS_ROOT)/doc
-
-# Generate dependency on existence only (i.e., don't care if newer).
-# To be used primarily for directories creation
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-
-################################################
-### Handle project configuration definitions ###
-################################################
-
-PROJ_CFG_FNAME = proj.cfg
-PROJ_EXT_CFG_FNAME = proj.ext.cfg
-PROJ_CFG_PATH = $(PROJ_CFG_FNAME)
-PROJ_EXT_CFG_PATH = $(UTILS_ROOT)/../$(PROJ_EXT_CFG_FNAME)
-PROJ_CONFIGS_DIR = configs
-
-
-############ Special rules for project configuration selection ##############
-ifneq ($(wildcard $(PROJ_CFG_PATH)),$(PROJ_CFG_PATH)) # No proj.cfg linked
-
-all: # default in case there is no proj.cfg and setconfig_ was not used
- $(info Invoke 'make setconfig_<config. name>' to select project configuration )
- $(error 'proj.cfg' not found)
-
-setconfig_%: $(PROJ_CONFIGS_DIR)/proj-%.cfg
- @$(info [CFG] $(PROJ_CONFIGS_DIR)/proj-$*.cfg --> proj.cfg)
- @ln -s $(PROJ_CONFIGS_DIR)/proj-$*.cfg $(PROJ_CFG_FNAME)
-
-$(PROJ_CONFIGS_DIR)/proj-%.cfg:
- @$(error Unknown project configuration. $@ does not exist.)
-
-clrconfig:
- $(info [CFG-CLN] No active configuration )
-
-.PHONY: all setconfig_% clrconfig
-
-else
-### proj.cfg exists. Include it to get project cofiguration defintions ###
-# The includes order is important here:
-# External configurations in proj.ext.cfg may be overrided by those in host proj.cfg
-include $(PROJ_EXT_CFG_PATH)
-include $(PROJ_CFG_PATH)
-
-
-ifeq ($(CONFIG_SB_SUPPORT_IOT), 1)
- TARGETS = cc3x_boot_cert icv_asset_prov cc3x_asset_prov_rt cmpu_asset_pkg_util dmpu_asset_pkg_util
-else
- TARGETS = oem_asset_utils checksum_onec tests
- ifeq ($(CC_CONFIG_SB_X509_CERT_SUPPORTED), 1)
- TARGETS += x509_cert_utils
- else
- TARGETS += secure_boot_utils secure_debug_utils
- endif
-endif
-
-
-$(info PROJ_NAME=$(PROJ_NAME))
-# Export all definition from proj.cfg to dispatched makefiles
-export
-
-all: $(PROJ_TARGETS)
-
-$(PROJ_TARGETS):
- @make $(CFLAGS) -C $@
-
-clean: $(foreach target,$(PROJ_TARGETS),clean_$(target))
-
-
-# setconfig_/clrconfig are available only if $(PROJ_CONFIGS_DIR) exists
-# (i.e., eliminated on release trees)
-ifeq ($(wildcard $(PROJ_CONFIGS_DIR)),$(PROJ_CONFIGS_DIR))
-# Configuration rules
-setconfig_%:
- $(if $(filter $(PROJ_CONFIGS_DIR)/proj-$*.cfg,$(shell readlink $(PROJ_CFG_PATH))),$(info $* configuration is already set.),$(error Before changing configuration invoke 'make clrconfig'))
-
-clrconfig:
- @echo [CFG-CLN] X $(shell readlink $(PROJ_CFG_PATH))
- @rm -f $(PROJ_CFG_PATH)
-endif
-
-endif
-
-# Provide lsconfig to list available configurations
-configs_list = $(foreach cfg_file,$(wildcard $(PROJ_CONFIGS_DIR)/proj-*.cfg),$(patsubst $(PROJ_CONFIGS_DIR)/proj-%.cfg,%,$(cfg_file)))
-lsconfig:
- @$(info Available project configurations:)
- @$(foreach cfg_file,$(configs_list),$(info $(cfg_file)))
-
-.PHONY: all setconfig_% clrconfig lsconfig clean distclean all clean_% $(TARGETS)
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/Makefile
deleted file mode 100644
index a62271a75..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing build and installation
-
-# shared library to build
-UTIL_ROOT = $(PWD)
-UTILS_DIR_ROOT = $(UTIL_ROOT)/../..
-HOST_DIR_ROOT = $(UTIL_ROOT)/../host
-UTILS_LIB_PATH = ./lib
-UTILS_LIB_NAME = libutil_crypto.so
-UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)
-
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_scripts
-
-all: $(INSTALL_LIST)
-
-
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
- @echo Installing util_crypto library
- @cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib
-
-build_lib:
- @make -C $(UTILS_LIB_PATH)
-
-install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
- @echo Installing scripts
- @cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin/
-
-$(UTILS_DIR_ROOT)/%:
- @echo Creating directory $@
- @mkdir $@
-
-
-clean:
- @make -C $(UTILS_LIB_PATH) clean
-
-.PHONY: install_lib install_sd_scripts clean
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/lib/Makefile
deleted file mode 100644
index 8985104c1..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = libutil_crypto.so
-
-LIB_SRC_O = main.o common_crypto_asym.o common_crypto_sym.o common_rsa_keypair_util.o common_rsa_keypair.o common_util_files.o
-
-UTILS_ROOT = $(PWD)/../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOST_DIR = $(UTILS_ROOT)/../host
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(SHARED_DIR)/include $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(UTILS_ROOT)/include
-UTILS_INC_PATH += $(UTILS_ROOT)/src/common $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS) $(SHARED_DIR)/include/cc_util
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/Makefile
deleted file mode 100755
index e162c8989..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing SBU build and installation
-ifeq ($(CC_CONFIG_SB_X509_CERT_SUPPORTED),1)
- SUB_DIRS_PREFIX = x509cert
-else
- SUB_DIRS_PREFIX = cert
-endif
-
-$(info $$SUB_DIRS_PREFIX is [${SUB_DIRS_PREFIX}])
-
-# shared library to build
-SBU_ROOT = $(PWD)
-UTIL_ROOT = $(SBU_ROOT)/../..
-SBU_CRYP_LIB_PATH = $(SUB_DIRS_PREFIX)_lib
-SBU_CRYP_LIB_NAME = libsbu_crypto.so
-SBU_SCRIPTS_DIRNAME = $(SUB_DIRS_PREFIX)_utils
-SBU_COMMON_SCRIPTS_DIRNAME = common_utils
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_sbu
-
-all: $(INSTALL_LIST)
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTIL_ROOT)/lib)
- @echo Installing sbu_crypto library
- @cp $(SBU_ROOT)/$(SBU_CRYP_LIB_PATH)/$(SBU_CRYP_LIB_NAME) $(UTIL_ROOT)/lib
-
-build_lib:
- @make -C $(SBU_ROOT)/$(SBU_CRYP_LIB_PATH)
-
-
-install_sbu: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTIL_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTIL_ROOT)/bin/$(SBU_COMMON_SCRIPTS_DIRNAME))
- @echo Installing SBU scripts
- @cp $(SBU_ROOT)/$(SBU_SCRIPTS_DIRNAME)/*.py $(UTIL_ROOT)/bin
- @cp $(SBU_ROOT)/$(SBU_COMMON_SCRIPTS_DIRNAME)/*.py $(UTIL_ROOT)/bin/$(SBU_COMMON_SCRIPTS_DIRNAME)
-
-$(UTIL_ROOT)/%:
- @echo Creating directory $@
- @mkdir $@
-
-
-
-
-clean:
- @make -C $(SBU_CRYP_LIB_PATH) clean
-
-.PHONY: install_lib install_sbu clean
-
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/Makefile
deleted file mode 100644
index 70b128f82..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = libsbu_crypto.so
-
-LIB_SRC_O = main.o common_rsa_keypair.o common_rsa_keypair_util.o common_crypto_sym.o common_util_files.o common_sb_ops.o
-
-UTILS_ROOT = $(PWD)/../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(UTILS_ROOT)/include $(UTILS_ROOT)/src/common $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(SHARED_DIR)/include
-UTILS_INC_PATH += $(CODESAFE_SRCDIR)/secure_boot_debug/secure_debug/cc3x $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-CFLAGS += -DCC_SB_SUPPORT_IOT
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/Makefile
deleted file mode 100644
index 17726299e..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = libsbu_crypto.so
-
-LIB_SRC_O = main.o common_rsa_keypair.o common_crypto_x509.o
-LIB_SRC_O += common_crypto_sym.o common_crypto_asym.o common_util_files.o common_rsa_keypair_util.o
-
-UTILS_ROOT = $(PWD)/../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOST_DIR = $(UTILS_ROOT)/../host
-CODESAFE_DIR = $(UTILS_ROOT)/../codesafe
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_COMMON_PATH = $(UTILS_ROOT)/src/common
-UTILS_INC_PATH = $(UTILS_ROOT)/include $(UTILS_COMMON_PATH) $(SHARED_DIR)/include $(SHARED_DIR)/include/sbrom $(SHARED_DIR)/include/proj/$(PROJ_PRD)
-UTILS_INC_PATH += $(HOST_DIR)/src/cc3x_sbromlib $(SHARED_DIR)/include/pal/$(TEE_OS) $(CODESAFE_DIR)/src/secure_boot_debug/cc3x_verifier $(SHARED_DIR)/include/pal
-UTILS_INC_PATH += $(CODESAFE_DIR)/src/secure_boot_debug/secure_boot_gen $(SHARED_DIR)/hw/include $(CODESAFE_DIR)/src/secure_boot_debug/crypto_driver $(CODESAFE_DIR)/src/secure_boot_debug/platform/pal/cc3x
-UTILS_INC_PATH += $(CODESAFE_DIR)/src/secure_boot_debug/platform/common/cc3x $(CODESAFE_DIR)/src/secure_boot_debug/platform/stage/boot/cc3x $(CODESAFE_DIR)/src/secure_boot_debug/util
-UTILS_INC_PATH += $(CODESAFE_DIR)/src/secure_boot_debug/secure_debug/cc3x $(CODESAFE_DIR)/src/secure_boot_debug/platform/hal $(CODESAFE_DIR)/src/secure_boot_debug/crypto_driver/reg
-UTILS_INC_PATH += $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-CFLAGS += -DCC_SB_SUPPORT_IOT
-
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/Makefile
deleted file mode 100644
index 3b0114ccb..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing build and installation
-
-# shared library to build
-UTIL_ROOT = $(PWD)
-UTILS_DIR_ROOT = $(UTIL_ROOT)/../..
-HOST_DIR_ROOT = $(UTIL_ROOT)/../host
-UTILS_LIB_PATH = ./lib
-UTILS_LIB_NAME = lib_cmpuutil_crypto.so
-UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)
-
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_scripts
-
-all: $(INSTALL_LIST)
-
-
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
- @echo Installing produtil_crypto library
- @cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib
-
-build_lib:
- @echo build_lib for cmpu_asset_pkg_util.py.
- @make -C $(UTILS_LIB_PATH)
-
-install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
- @echo Installing scripts for cmpu_asset_pkg_util.py.
- @cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/examples/*.cfg $(UTILS_DIR_ROOT)/bin/example
-
-$(UTILS_DIR_ROOT)/%:
- @echo Creating directory prod package
- @mkdir $@
-
-
-clean:
- @make -C $(UTILS_LIB_PATH) clean
-
-.PHONY: install_lib install_sd_scripts clean
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/lib/Makefile
deleted file mode 100644
index 95fe25fd8..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = lib_cmpuutil_crypto.so
-
-LIB_SRC_O = main.o common_crypto_asym.o common_crypto_sym.o common_rsa_keypair_util.o common_rsa_keypair.o common_util_files.o
-
-UTILS_ROOT = $(PWD)/../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOSTSRC_DIR = $(UTILS_ROOT)/../host/src
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(SHARED_DIR)/include $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(UTILS_ROOT)/include
-UTILS_INC_PATH += $(UTILS_ROOT)/src/common $(HOSTSRC_DIR)/cc3x_productionlib/common $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/Makefile
deleted file mode 100644
index b822b2911..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-SUB_DIRS = oem_key_request icv_key_response oem_asset_package
-
-all: $(foreach sub_dir,$(SUB_DIRS),do_$(sub_dir))
-
-clean: $(foreach sub_dir,$(SUB_DIRS),clean_$(sub_dir))
-
-clean_%:
- @make -C $* clean
-
-do_%:
- @make -C $*
-
-.PHONY: all clean clean_% do_%
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/Makefile
deleted file mode 100644
index d758bb161..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing build and installation
-
-# shared library to build
-UTIL_ROOT = $(PWD)
-UTILS_DIR_ROOT = $(UTIL_ROOT)/../../..
-HOST_DIR_ROOT = $(UTILS_DIR_ROOT)/../host
-UTILS_LIB_PATH = ./lib
-UTILS_LIB_NAME = lib_icv_key_response.so
-UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)
-
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_scripts
-
-all: $(INSTALL_LIST)
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
- @echo Installing icv_key_response library
- @cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib
-
-build_lib:
- @echo build_lib for dmpu_icv_key_response_util.py.
- @make -C $(UTILS_LIB_PATH)
-
-install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
- @echo Installing scripts for dmpu_icv_key_response_util.py.
- @cp $(UTIL_ROOT)/../common/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/examples/*.cfg $(UTILS_DIR_ROOT)/bin/example
-
-$(UTILS_DIR_ROOT)/%:
- @echo Creating directory for dmpu package
- @mkdir $@
-
-
-clean:
- @make -C $(UTILS_LIB_PATH) clean
-
-.PHONY: install_lib install_sd_scripts clean
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/lib/Makefile
deleted file mode 100644
index c81cac1c7..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/icv_key_response/lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = lib_icv_key_response.so
-
-LIB_SRC_O = main.o dmpu_common.o common_crypto_asym.o common_crypto_sym.o common_rsa_keypair_util.o common_rsa_keypair.o common_util_files.o
-
-UTILS_ROOT = $(PWD)/../../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOSTSRC_DIR = $(UTILS_ROOT)/../host/src
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(SHARED_DIR)/include $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(UTILS_ROOT)/include
-UTILS_INC_PATH += $(UTILS_ROOT)/src/common $(UTILS_ROOT)/src/dmpu_asset_pkg_util/common $(HOSTSRC_DIR)/cc3x_productionlib/common $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common $(UTILS_ROOT)/src/dmpu_asset_pkg_util/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/Makefile
deleted file mode 100644
index 5340dd0e5..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing build and installation
-
-# shared library to build
-UTIL_ROOT = $(PWD)
-UTILS_DIR_ROOT = $(UTIL_ROOT)/../../..
-HOST_DIR_ROOT = $(UTILS_DIR_ROOT)/../host
-UTILS_LIB_PATH = ./lib
-UTILS_LIB_NAME = lib_oem_asset_pkg.so
-UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)
-
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_scripts
-
-all: $(INSTALL_LIST)
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
- @echo Installing oem_asset_pkg library
- @cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib
-
-build_lib:
- @echo build_lib for oem_asset_pkg.py.
- @make -C $(UTILS_LIB_PATH)
-
-install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
- @echo Installing scripts for oem_asset_pkg.py.
- @cp $(UTIL_ROOT)/../common/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/examples/*.cfg $(UTILS_DIR_ROOT)/bin/example
-
-$(UTILS_DIR_ROOT)/%:
- @echo Creating directory for dmpu package
- @mkdir $@
-
-
-clean:
- @make -C $(UTILS_LIB_PATH) clean
-
-.PHONY: install_lib install_sd_scripts clean
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/lib/Makefile
deleted file mode 100644
index 6f1ad5e69..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_asset_package/lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = lib_oem_asset_pkg.so
-
-LIB_SRC_O = main.o dmpu_common.o common_crypto_asym.o common_crypto_sym.o common_rsa_keypair_util.o common_rsa_keypair.o common_util_files.o
-
-UTILS_ROOT = $(PWD)/../../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOSTSRC_DIR = $(UTILS_ROOT)/../host/src
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(SHARED_DIR)/include $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(UTILS_ROOT)/include
-UTILS_INC_PATH += $(UTILS_ROOT)/src/common $(HOSTSRC_DIR)/cc3x_productionlib/common $(UTILS_ROOT)/src/dmpu_asset_pkg_util/common $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common $(UTILS_ROOT)/src/dmpu_asset_pkg_util/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/Makefile
deleted file mode 100644
index 084dada4a..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for managing build and installation
-
-# shared library to build
-UTIL_ROOT = $(PWD)
-UTILS_DIR_ROOT = $(UTIL_ROOT)/../../..
-HOST_DIR_ROOT = $(UTILS_DIR_ROOT)/../host
-UTILS_LIB_PATH = ./lib
-UTILS_LIB_NAME = lib_oem_key_request.so
-UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)
-
-
-DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))
-
-INSTALL_LIST = install_lib install_scripts
-
-all: $(INSTALL_LIST)
-
-install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
- @echo Installing dmpu_oem_key_request_util library
- @cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib
-
-build_lib:
- @echo build_lib for dmpu_oem_key_request_util.py.
- @make -C $(UTILS_LIB_PATH)
-
-install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin) $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
- @echo Installing scripts for dmpu_oem_key_request_util.py.
- @cp $(UTIL_ROOT)/../common/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin
- @cp $(UTIL_ROOT)/examples/*.cfg $(UTILS_DIR_ROOT)/bin/example
-
-$(UTILS_DIR_ROOT)/%:
- @echo Creating directory for dmpu package
- @mkdir $@
-
-
-clean:
- @make -C $(UTILS_LIB_PATH) clean
-
-.PHONY: install_lib install_sd_scripts clean
-
diff --git a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/lib/Makefile b/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/lib/Makefile
deleted file mode 100644
index dd4f9ce20..000000000
--- a/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/oem_key_request/lib/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-# Makefile for building sbu_crypto library
-SH_LIB_NAME = lib_oem_key_request.so
-
-LIB_SRC_O = main.o common_sb_ops.o common_rsa_keypair_util.o common_rsa_keypair.o common_util_files.o common_crypto_sym.o #common_crypto_asym.o
-
-UTILS_ROOT = $(PWD)/../../../..
-SHARED_DIR = $(UTILS_ROOT)/../shared
-HOSTSRC_DIR = $(UTILS_ROOT)/../host/src
-UTILS_LIB_PATH = $(UTILS_ROOT)/lib
-UTILS_INC_PATH = $(SHARED_DIR)/include $(SHARED_DIR)/include/proj/$(PROJ_PRD) $(UTILS_ROOT)/include
-UTILS_INC_PATH += $(UTILS_ROOT)/src/common $(HOSTSRC_DIR)/cc3x_productionlib/common $(SHARED_DIR)/include/pal $(SHARED_DIR)/include/pal/$(TEE_OS)
-
-CFLAGS += -fPIC $(foreach incdir,$(UTILS_INC_PATH),-I$(incdir)) -c
-
-all: $(SH_LIB_NAME)
-
-# Compile and link the sbu_crypto library with hard-coded library run path to utils/lib
-# (to assure the private version of openssl libraries are used)
-$(SH_LIB_NAME): $(LIB_SRC_O)
- gcc -shared -o $(SH_LIB_NAME) $(LIB_SRC_O) -Wl,-rpath,$(UTILS_LIB_PATH) -lcrypto -lssl
-
-vpath %.c $(UTILS_ROOT)/src/common
-
-%.o: %.c
- gcc $(CFLAGS) $<
-
-clean:
- rm -f $(SH_LIB_NAME) $(LIB_SRC_O)
-
-.PHONY: clean all
-