aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deployments/attestation/opteesp/CMakeLists.txt15
-rw-r--r--deployments/crypto/opteesp/CMakeLists.txt18
-rw-r--r--deployments/crypto/opteesp/optee_sp_user_defines.h2
-rw-r--r--deployments/env-test/env_test.cmake7
-rw-r--r--deployments/env-test/opteesp/CMakeLists.txt8
-rw-r--r--deployments/internal-trusted-storage/opteesp/CMakeLists.txt9
-rw-r--r--deployments/libsp/opteesp/CMakeLists.txt14
-rw-r--r--deployments/libsp/opteesp/LibspConfig.cmake.in9
-rw-r--r--deployments/protected-storage/opteesp/CMakeLists.txt9
-rw-r--r--deployments/se-proxy/opteesp/CMakeLists.txt15
-rw-r--r--deployments/sfs-demo/opteesp/CMakeLists.txt9
-rw-r--r--deployments/smm-gateway/opteesp/CMakeLists.txt7
-rw-r--r--environments/opteesp/default_toolchain_file.cmake10
-rw-r--r--environments/opteesp/include/stdarg.h20
-rw-r--r--environments/opteesp/include/stdbool.h17
-rw-r--r--environments/opteesp/include/stddef.h27
-rw-r--r--environments/opteesp/include/stddef_.h15
-rw-r--r--external/Spdevkit/FindSpdevkit.cmake179
-rw-r--r--tools/b-test/run.sh.j24
-rw-r--r--tools/b-test/test_data.yaml9
20 files changed, 26 insertions, 377 deletions
diff --git a/deployments/attestation/opteesp/CMakeLists.txt b/deployments/attestation/opteesp/CMakeLists.txt
index 49bba4c..eebf79d 100644
--- a/deployments/attestation/opteesp/CMakeLists.txt
+++ b/deployments/attestation/opteesp/CMakeLists.txt
@@ -23,14 +23,6 @@ target_include_directories(attestation PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
set(SP_UUID "a1baf155-8876-4695-8f7c-54955e8db974")
set(TRACE_PREFIX "ATT" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET attestation DEFINES ARM64=1)
-target_link_libraries(attestation PRIVATE ${SP_DEV_KIT_LIBRARIES})
-
#-------------------------------------------------------------------------------
# Default deployment specific configuration
#
@@ -97,13 +89,16 @@ add_platform(TARGET "attestation")
#
#-------------------------------------------------------------------------------
+# Get libc include dir
+get_property(LIBC_INCLUDE_PATH TARGET c PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+
# Qcbor
-set (QCBOR_EXTERNAL_INCLUDE_PATHS ${SP_DEV_KIT_INCLUDE_DIR})
+set (QCBOR_EXTERNAL_INCLUDE_PATHS ${LIBC_INCLUDE_PATH})
include(${TS_ROOT}/external/qcbor/qcbor.cmake)
target_link_libraries(attestation PRIVATE qcbor)
# t_cose
-set (TCOSE_EXTERNAL_INCLUDE_PATHS ${SP_DEV_KIT_INCLUDE_DIR})
+set (TCOSE_EXTERNAL_INCLUDE_PATHS ${LIBC_INCLUDE_PATH})
include(${TS_ROOT}/external/t_cose/t_cose.cmake)
target_link_libraries(attestation PRIVATE t_cose)
diff --git a/deployments/crypto/opteesp/CMakeLists.txt b/deployments/crypto/opteesp/CMakeLists.txt
index a9b1b90..16417b1 100644
--- a/deployments/crypto/opteesp/CMakeLists.txt
+++ b/deployments/crypto/opteesp/CMakeLists.txt
@@ -23,14 +23,6 @@ target_include_directories(crypto-sp PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
set(SP_UUID "d9df52d5-16a2-4bb2-9aa4-d26d3b84e8c0")
set(TRACE_PREFIX "CRYPTO" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET crypto-sp DEFINES ARM64=1)
-target_link_libraries(crypto-sp PRIVATE ${SP_DEV_KIT_LIBRARIES})
-
#-------------------------------------------------------------------------------
# Components that are specific to deployment in the opteesp environment.
#
@@ -94,18 +86,20 @@ add_platform(TARGET "crypto-sp")
#
#-------------------------------------------------------------------------------
+# Get libc include dir
+get_property(LIBC_INCLUDE_PATH TARGET c PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+
# Nanopb
-list(APPEND NANOPB_EXTERNAL_INCLUDE_PATHS ${SP_DEV_KIT_INCLUDE_DIR})
+list(APPEND NANOPB_EXTERNAL_INCLUDE_PATHS ${LIBC_INCLUDE_PATH})
include(../../../external/nanopb/nanopb.cmake)
target_link_libraries(crypto-sp PRIVATE nanopb::protobuf-nanopb-static)
protobuf_generate_all(TGT "crypto-sp" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
# Mbed TLS provides libmbedcrypto
-list(APPEND MBEDTLS_EXTRA_INCLUDES ${SP_DEV_KIT_INCLUDE_DIR})
-set(MBEDTLS_EXTRA_INCLUDES ${MBEDTLS_EXTRA_INCLUDES}
- CACHE STRING "PSA ITS for Mbed TLS" FORCE)
+list(APPEND MBEDTLS_EXTRA_INCLUDES ${LIBC_INCLUDE_PATH})
include(../../../external/MbedTLS/MbedTLS.cmake)
target_link_libraries(crypto-sp PRIVATE mbedcrypto)
+target_link_libraries(mbedcrypto INTERFACE c)
if(CMAKE_CROSSCOMPILING)
target_link_libraries(crypto-sp PRIVATE stdc++ gcc m)
diff --git a/deployments/crypto/opteesp/optee_sp_user_defines.h b/deployments/crypto/opteesp/optee_sp_user_defines.h
index 88e1adc..2d7ba50 100644
--- a/deployments/crypto/opteesp/optee_sp_user_defines.h
+++ b/deployments/crypto/opteesp/optee_sp_user_defines.h
@@ -17,6 +17,6 @@
#define OPTEE_SP_STACK_SIZE (64 * 1024)
/* Provisioned heap size */
-#define OPTEE_SP_HEAP_SIZE (480 * 1024)
+#define OPTEE_SP_HEAP_SIZE (490 * 1024)
#endif /* SP_HEADER_DEFINES_H */
diff --git a/deployments/env-test/env_test.cmake b/deployments/env-test/env_test.cmake
index 87a3298..bebd9f5 100644
--- a/deployments/env-test/env_test.cmake
+++ b/deployments/env-test/env_test.cmake
@@ -44,9 +44,10 @@ add_components(
#
#-------------------------------------------------------------------------------
+# Get libc include dir
+get_property(LIBC_INCLUDE_PATH TARGET c PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+
# Mbed TLS provides libmbedcrypto
-list(APPEND MBEDTLS_EXTRA_INCLUDES ${SP_DEV_KIT_INCLUDE_DIR})
-set(MBEDTLS_EXTRA_INCLUDES ${MBEDTLS_EXTRA_INCLUDES}
- CACHE STRING "PSA ITS for Mbed TLS" FORCE)
+list(APPEND MBEDTLS_EXTRA_INCLUDES ${LIBC_INCLUDE_PATH})
include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
target_link_libraries(env-test PRIVATE mbedcrypto)
diff --git a/deployments/env-test/opteesp/CMakeLists.txt b/deployments/env-test/opteesp/CMakeLists.txt
index d75f74f..58f9c02 100644
--- a/deployments/env-test/opteesp/CMakeLists.txt
+++ b/deployments/env-test/opteesp/CMakeLists.txt
@@ -24,14 +24,6 @@ target_include_directories(env-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
set(SP_UUID "33c75baf-ac6a-4fe4-8ac7-e9909bee2d17")
set(TRACE_PREFIX "ENVTEST" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET env-test DEFINES ARM64=1)
-target_link_libraries(env-test PRIVATE ${SP_DEV_KIT_LIBRARIES})
-
#-------------------------------------------------------------------------------
# Components that are env-test specific to deployment in the opteesp
# environment.
diff --git a/deployments/internal-trusted-storage/opteesp/CMakeLists.txt b/deployments/internal-trusted-storage/opteesp/CMakeLists.txt
index 25d910b..fb51b13 100644
--- a/deployments/internal-trusted-storage/opteesp/CMakeLists.txt
+++ b/deployments/internal-trusted-storage/opteesp/CMakeLists.txt
@@ -20,15 +20,6 @@ target_include_directories(internal-trusted-storage PRIVATE "${TOP_LEVEL_INCLUDE
set(SP_UUID "dc1eef48-b17a-4ccf-ac8b-dfcff7711b14")
set(TRACE_PREFIX "ITS" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit COMPONENTS SP_HEADER interface)
-
-sp_dev_kit_configure_linking(TARGET internal-trusted-storage DEFINES ARM64=1)
-target_link_libraries(internal-trusted-storage ${SP_DEV_KIT_LIBRARIES})
-
add_components(TARGET "internal-trusted-storage"
BASE_DIR ${TS_ROOT}
COMPONENTS
diff --git a/deployments/libsp/opteesp/CMakeLists.txt b/deployments/libsp/opteesp/CMakeLists.txt
index 6f3907f..19dede4 100644
--- a/deployments/libsp/opteesp/CMakeLists.txt
+++ b/deployments/libsp/opteesp/CMakeLists.txt
@@ -25,20 +25,11 @@ project(trusted-services
add_library(sp STATIC)
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit COMPONENTS interface)
-
-target_link_libraries(sp PUBLIC ${SP_DEV_KIT_LIBRARIES})
-
-
add_components(TARGET "sp"
BASE_DIR ${TS_ROOT}
COMPONENTS
components/messaging/ffa/libsp
components/common/utils
- environments/opteesp
)
target_compile_definitions("sp" PRIVATE
@@ -48,6 +39,7 @@ target_compile_definitions("sp" PRIVATE
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options("sp" PRIVATE
-fdiagnostics-show-option
+ -fpic
-gdwarf-2
-mstrict-align
-O0
@@ -73,9 +65,6 @@ install(
libsp
)
-#These would install the spdevkit content.
-#install(FILES $<TARGET_PROPERTY:sp_devkit_ifc,INTERFACE_LINK_LIBRARIES> DESTINATION lib)
-#install(FILES $<TARGET_PROPERTY:sp_devkit_ifc,INTERFACE_INCLUDE_DIRECTORIES>/ DESTINATION include)
### Create a config file package.
set(ConfigPackageLocation ${TS_ENV}/lib/cmake/libsp)
@@ -124,7 +113,6 @@ install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/LibspConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/LibspConfigVersion.cmake"
- "${TS_ROOT}/external/Spdevkit/FindSpdevkit.cmake"
DESTINATION
${ConfigPackageLocation}
COMPONENT
diff --git a/deployments/libsp/opteesp/LibspConfig.cmake.in b/deployments/libsp/opteesp/LibspConfig.cmake.in
index cd8d0d6..559b35d 100644
--- a/deployments/libsp/opteesp/LibspConfig.cmake.in
+++ b/deployments/libsp/opteesp/LibspConfig.cmake.in
@@ -1,16 +1,9 @@
#
-# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@PACKAGE_INIT@
-# Any user of the lib will depend on spdevkit. Use our find module to get access to it.
-find_package(Spdevkit
- COMPONENTS LIBUTIL
- PATHS ${CMAKE_CURRENT_LIST_DIR}
- NO_DEFAULT_PATH
- REQUIRED)
-
include("${CMAKE_CURRENT_LIST_DIR}/LibspTargets.cmake")
diff --git a/deployments/protected-storage/opteesp/CMakeLists.txt b/deployments/protected-storage/opteesp/CMakeLists.txt
index e7f154a..15fea17 100644
--- a/deployments/protected-storage/opteesp/CMakeLists.txt
+++ b/deployments/protected-storage/opteesp/CMakeLists.txt
@@ -20,15 +20,6 @@ target_include_directories(protected-storage PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}"
set(SP_UUID "751bf801-3dde-4768-a514-0f10aeed1790")
set(TRACE_PREFIX "PS" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit COMPONENTS SP_HEADER interface)
-
-sp_dev_kit_configure_linking(TARGET protected-storage DEFINES ARM64=1)
-target_link_libraries(protected-storage ${SP_DEV_KIT_LIBRARIES})
-
add_components(TARGET "protected-storage"
BASE_DIR ${TS_ROOT}
COMPONENTS
diff --git a/deployments/se-proxy/opteesp/CMakeLists.txt b/deployments/se-proxy/opteesp/CMakeLists.txt
index 23a5c62..433323c 100644
--- a/deployments/se-proxy/opteesp/CMakeLists.txt
+++ b/deployments/se-proxy/opteesp/CMakeLists.txt
@@ -24,16 +24,6 @@ target_include_directories(se-proxy PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
set(SP_UUID "46bb39d1-b4d9-45b5-88ff-040027dab249")
#-------------------------------------------------------------------------------
-# Include SP DEV KIT interface
-#
-#-------------------------------------------------------------------------------
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET se-proxy DEFINES ARM64=1)
-target_link_libraries(se-proxy PRIVATE ${SP_DEV_KIT_LIBRARIES})
-
-#-------------------------------------------------------------------------------
# Components that are specific to deployment in the opteesp environment.
#
#-------------------------------------------------------------------------------
@@ -104,8 +94,11 @@ add_platform(TARGET "se-proxy")
#
#-------------------------------------------------------------------------------
+# Get libc include dir
+get_property(LIBC_INCLUDE_PATH TARGET c PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+
# Nanopb
-list(APPEND NANOPB_EXTERNAL_INCLUDE_PATHS ${SP_DEV_KIT_INCLUDE_DIR})
+list(APPEND NANOPB_EXTERNAL_INCLUDE_PATHS ${LIBC_INCLUDE_PATH})
include(../../../external/nanopb/nanopb.cmake)
target_link_libraries(se-proxy PRIVATE nanopb::protobuf-nanopb-static)
protobuf_generate_all(TGT "se-proxy" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
diff --git a/deployments/sfs-demo/opteesp/CMakeLists.txt b/deployments/sfs-demo/opteesp/CMakeLists.txt
index 05b338a..2865585 100644
--- a/deployments/sfs-demo/opteesp/CMakeLists.txt
+++ b/deployments/sfs-demo/opteesp/CMakeLists.txt
@@ -19,15 +19,6 @@ add_executable(sfs-demo)
set(SP_UUID "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix")
-
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET sfs-demo DEFINES ARM64=1)
-target_link_libraries(sfs-demo ${SP_DEV_KIT_LIBRARIES})
-
-
add_components(TARGET "sfs-demo"
BASE_DIR ${TS_ROOT}
COMPONENTS
diff --git a/deployments/smm-gateway/opteesp/CMakeLists.txt b/deployments/smm-gateway/opteesp/CMakeLists.txt
index c3f2674..7cf6a7b 100644
--- a/deployments/smm-gateway/opteesp/CMakeLists.txt
+++ b/deployments/smm-gateway/opteesp/CMakeLists.txt
@@ -26,13 +26,6 @@ set(SP_UUID "ed32d533-99e6-4209-9cc0-2d72cdd998a7")
set(MM_COMM_BUFFER_ADDRESS "0x00000008 0x81000000" CACHE STRING "Address of MM communicte buffer in 64 bit DTS format")
set(MM_COMM_BUFFER_PAGE_COUNT "8" CACHE STRING "Size of the MM communicate buffer in 4k pages")
-# Include SP DEV KIT interface
-set(SP_DEV_KIT_INC_DIR ${CMAKE_CURRENT_LIST_DIR})
-list(APPEND CMAKE_MODULE_PATH "${TS_ROOT}/external/Spdevkit")
-find_package(Spdevkit REQUIRED)
-sp_dev_kit_configure_linking(TARGET smm-gateway DEFINES ARM64=1)
-target_link_libraries(smm-gateway PRIVATE ${SP_DEV_KIT_LIBRARIES})
-
#-------------------------------------------------------------------------------
# Components that are specific to deployment in the opteesp environment.
#
diff --git a/environments/opteesp/default_toolchain_file.cmake b/environments/opteesp/default_toolchain_file.cmake
index f0e0277..643773c 100644
--- a/environments/opteesp/default_toolchain_file.cmake
+++ b/environments/opteesp/default_toolchain_file.cmake
@@ -18,15 +18,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE True)
include($ENV{TS_ROOT}/tools/cmake/compiler/GCC.cmake REQUIRED)
include($ENV{TS_ROOT}/tools/cmake/compiler/config_iface.cmake REQUIRED)
# Set mandatory compiler and linker flags for this environment:
-# - This environment uses a libc implementation from SPDEV-KIT. Disable standard
-# include search paths, startup files and default libraries.
-string(APPEND CMAKE_C_FLAGS_INIT " -nostartfiles -nodefaultlibs -nostdinc -I ${CMAKE_CURRENT_LIST_DIR}/include")
# - Compile position independent code
string(APPEND CMAKE_C_FLAGS_INIT " -fpic")
-# -set entry point
-# -disable link time optimization
-# -link position independent executable
-string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " -e __sp_entry -fno-lto -pie")
+# - Disable startup files and default libraries.
+# - Link position independent executable
+string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " -nostartfiles -nodefaultlibs -pie")
# -link libgcc with full PATH to work around disabled linker search paths.
gcc_get_lib_location("libgcc.a" _TMP_VAR)
diff --git a/environments/opteesp/include/stdarg.h b/environments/opteesp/include/stdarg.h
deleted file mode 100644
index e260b9b..0000000
--- a/environments/opteesp/include/stdarg.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2012-2017 Roberto E. Vargas Caballero
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-/*
- * Portions copyright (c) 2018, ARM Limited and Contributors.
- * All rights reserved.
- */
-
-#ifndef STDARG_H
-#define STDARG_H
-
-#define va_list __builtin_va_list
-#define va_start(ap, last) __builtin_va_start(ap, last)
-#define va_end(ap) __builtin_va_end(ap)
-#define va_copy(to, from) __builtin_va_copy(to, from)
-#define va_arg(to, type) __builtin_va_arg(to, type)
-
-#endif /* STDARG_H */
diff --git a/environments/opteesp/include/stdbool.h b/environments/opteesp/include/stdbool.h
deleted file mode 100644
index b58334c..0000000
--- a/environments/opteesp/include/stdbool.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef STDBOOL_H
-#define STDBOOL_H
-
-#define bool _Bool
-
-#define true (0 < 1)
-#define false (0 > 1)
-
-#define __bool_true_false_are_defined 1
-
-#endif /* STDBOOL_H */
diff --git a/environments/opteesp/include/stddef.h b/environments/opteesp/include/stddef.h
deleted file mode 100644
index 58a519e..0000000
--- a/environments/opteesp/include/stddef.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2012-2017 Roberto E. Vargas Caballero
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-/*
- * Portions copyright (c) 2018-2019, ARM Limited and Contributors.
- * All rights reserved.
- */
-
-#ifndef STDDEF_H
-#define STDDEF_H
-
-#include <stddef_.h>
-
-#ifndef _PTRDIFF_T
-typedef long ptrdiff_t;
-#define _PTRDIFF_T
-#endif
-
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
-#define offsetof(st, m) __builtin_offsetof(st, m)
-
-#endif /* STDDEF_H */
diff --git a/environments/opteesp/include/stddef_.h b/environments/opteesp/include/stddef_.h
deleted file mode 100644
index 6ecc606..0000000
--- a/environments/opteesp/include/stddef_.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef STDDEF__H
-#define STDDEF__H
-
-#ifndef SIZET_
-typedef unsigned long size_t;
-#define SIZET_
-#endif
-
-#endif /* STDDEF__H */
diff --git a/external/Spdevkit/FindSpdevkit.cmake b/external/Spdevkit/FindSpdevkit.cmake
index dc81cbc..e69de29 100644
--- a/external/Spdevkit/FindSpdevkit.cmake
+++ b/external/Spdevkit/FindSpdevkit.cmake
@@ -1,179 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-#[===[.rst:
- Abstraction to interface to SP DEV KIT.
- ---------------------------------------
-
- SP DEV KIT is a component generated by the OP-TEE OS build and defines the
- FF-A SP interface for the OS to SPs.
-
- This file provides the following functionality:
- - creates a static library to easy building the SP side component of the
- SP DEV KIT. This library will be properly configured with transitive
- dependencies to apply the needed compiler configurations to the
- target linking against it.
- - defines a function to allow configuration of the linking phase of the
- executable target. (See: :command:`sp_dev_kit_configure_linking`)
-
- Inputs:
- ``SP_DEV_KIT_DIR``
- A cmake or environment variable specifying the location of the SP DEV KIT.
- This is mandatory.
-
- ``SP_DEV_KIT_INC_DIR``
- The SP DEV KIT depends on some header files living in the SP. This variable
- must be set to an include path giving access to these headers.
-
- Outputs:
- :command:sp_dev_kit_configure_linking()
-
- :variable:`SP_DEV_KIT_LIBRARIES`
-
-#]===]
-
-# Store SP DEV KIT location to cache.
-# If a cmake variable exist, use it as is.
-# If not, try to copy over the value from the environment.
-if(NOT DEFINED SP_DEV_KIT_DIR AND NOT DEFINED ENV{SP_DEV_KIT_DIR})
- message(FATAL_ERROR "'SP_DEV_KIT_DIR' is not defined.")
-endif()
-set(SP_DEV_KIT_DIR $ENV{SP_DEV_KIT_DIR} CACHE STRING "SP dev kit from original OP-TEE build system")
-
-if (DEFINED ENV{SP_DEV_KIT_DIR} AND NOT SP_DEV_KIT_DIR STREQUAL "$ENV{SP_DEV_KIT_DIR}")
- message(WARNING "Suspicious settings: the value of SP_DEV_KIT_DIR in the environment is not matching cmakes settings!")
-endif()
-
-# Find the directories inside SP DEV KIT. This gives more flexibility than when using static settings.
-find_path (SP_DEV_KIT_SRC_DIR
- NAMES
- sp_header.c
- PATHS
- ${SP_DEV_KIT_DIR}
- PATH_SUFFIXES
- "src"
- NO_DEFAULT_PATH
- REQUIRED
- DOC
- "SP DEV KIT source directory"
- )
-
-find_path (SP_DEV_KIT_INCLUDE_DIR
- NAMES
- ffa.h atomic.h compiler.h
- PATHS
- ${SP_DEV_KIT_DIR}
- PATH_SUFFIXES
- "include"
- NO_DEFAULT_PATH
- REQUIRED
- DOC
- "SP DEV KIT include directory"
- )
-
-find_path (SP_DEV_KIT_LIB_DIR
- NAMES
- ${CMAKE_STATIC_LIBRARY_PREFIX}utils${CMAKE_STATIC_LIBRARY_SUFFIX} libutils.a utils.a utils.lib libutils.link_libraries
- PATHS
- ${SP_DEV_KIT_DIR}
- PATH_SUFFIXES
- "lib"
- NO_DEFAULT_PATH
- REQUIRED
- DOC
- "SP DEV KIT library directory"
- )
-
-#[===[.rst:
-.. cmake:variable:: SP_DEV_KIT_LIBRARIES
-
- List of libraries forming the SP DEV KIT interface.
-
-#]===]
-
-# Create an imported target for libutils.a
-add_library(spdevkit::libutils STATIC IMPORTED)
-set_target_properties(spdevkit::libutils PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${SP_DEV_KIT_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${SP_DEV_KIT_LIB_DIR}/libutils.a"
- IMPORTED_LOCATION "${SP_DEV_KIT_LIB_DIR}/libutils.a"
-)
-list(APPEND SP_DEV_KIT_LIBRARIES spdevkit::libutils)
-
-if (NOT Spdevkit_FIND_COMPONENTS OR "SP_HEADER" IN_LIST Spdevkit_FIND_COMPONENTS)
- if (NOT DEFINED SP_DEV_KIT_INC_DIR)
- message(FATAL_ERROR "Mandatory input variable 'SP_DEV_KIT_INC_DIR' is not defined.")
- endif()
-
- # Define a static library to compile the SP side source files and to
- # capture dependencies (settings).
- add_library(sp_header STATIC
- ${SP_DEV_KIT_SRC_DIR}/sp_assert.c
- ${SP_DEV_KIT_SRC_DIR}/sp_entry.c
- ${SP_DEV_KIT_SRC_DIR}/sp_header.c
- )
-
- target_include_directories(sp_header
- PRIVATE
- ${SP_DEV_KIT_INC_DIR}
- )
-
- target_link_libraries(sp_header PRIVATE spdevkit::libutils)
- add_library(spdevkit::sp_header ALIAS sp_header)
- list(APPEND SP_DEV_KIT_LIBRARIES spdevkit::sp_header)
-endif()
-
-#[===[.rst:
-.. cmake:command:: sp_dev_kit_configure_linking
-
- .. code-block:: cmake
-
- sp_dev_kit_configure_linking(TARGET <executable target> DEFINES <list of pre-processor macros>)
-
- Connect an executable target to SP DEV KIT link requirements:
- - add rules to run the linker command file trough the pre-processor if needed
- - configure the target to use the linker command file
- - link SP DEV KIT libraries to the target
-
- Inputs:
-
- ``TARGET``
- Mandatory. The name of an already defined executable target (add_executable())
-
- ``DEFINES``
- Optional. Macro definitions for the pre-processing step.
-
-#]===]
-function(sp_dev_kit_configure_linking)
- set(options )
- set(oneValueArgs TARGET)
- set(multiValueArgs DEFINES)
- cmake_parse_arguments(MY_PARAMS "${options}" "${oneValueArgs}"
- "${multiValueArgs}" ${ARGN} )
-
- if(NOT DEFINED MY_PARAMS_TARGET)
- message(FATAL_ERROR "sp_dev_kit_configure_linking: mandatory parameter TARGET not defined!")
- endif()
-
- if(NOT DEFINED MY_PARAMS_DEFINES)
- set(MY_PARAMS_DEFINES "")
- endif()
-
- compiler_preprocess_file(
- SRC ${SP_DEV_KIT_DIR}/src/sp.ld.S
- DST ${CMAKE_BINARY_DIR}/sp.ld
- DEFINES ${MY_PARAMS_DEFINES}
- )
-
- add_custom_target(${MY_PARAMS_TARGET}-pplscript DEPENDS ${CMAKE_BINARY_DIR}/sp.ld)
- add_dependencies(${MY_PARAMS_TARGET} ${MY_PARAMS_TARGET}-pplscript)
-
- target_link_options(${MY_PARAMS_TARGET} PRIVATE
- -T${CMAKE_BINARY_DIR}/sp.ld
- )
-endfunction()
-
diff --git a/tools/b-test/run.sh.j2 b/tools/b-test/run.sh.j2
index 5274822..444055f 100644
--- a/tools/b-test/run.sh.j2
+++ b/tools/b-test/run.sh.j2
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2020, Arm Limited and contributors. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited and contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -124,8 +124,6 @@ Some variables to note
- NUMBER_OF_PROCESSORS: number of processors in the system. Used for setting the number of
parallel processes during build
NUMBER_OF_PROCESSORS=$NUMBER_OF_PROCESSORS
- - SP_DEV_KIT_DIR : location of OP-TEE OS SPDEVKIT export.
- SP_DEV_KIT_DIR=$SP_DEV_KIT_DIR
Available commands:
"" - no command/default -> run all test cases
diff --git a/tools/b-test/test_data.yaml b/tools/b-test/test_data.yaml
index 11f8f63..9f11888 100644
--- a/tools/b-test/test_data.yaml
+++ b/tools/b-test/test_data.yaml
@@ -10,7 +10,6 @@ data:
src: "$TS_ROOT/deployments/attestation/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "component-test-arm-linux"
src: "$TS_ROOT/deployments/component-test/arm-linux"
os_id : "GNU/Linux"
@@ -25,17 +24,14 @@ data:
src: "$TS_ROOT/deployments/crypto/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "env-test-optee-arm"
src: "$TS_ROOT/deployments/env-test/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "internal-trusted-storage-optee-arm"
src: "$TS_ROOT/deployments/internal-trusted-storage/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- "-DCMAKE_VERBOSE_MAKEFILE=y"
- name: "libsp-linux-pc"
src: "$TS_ROOT/deployments/libsp/linux-pc"
@@ -46,7 +42,6 @@ data:
src: "$TS_ROOT/deployments/libsp/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "libts-arm-linux"
src: "$TS_ROOT/deployments/libts/arm-linux"
os_id : "GNU/Linux"
@@ -71,7 +66,6 @@ data:
src: "$TS_ROOT/deployments/protected-storage/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- "-DCMAKE_VERBOSE_MAKEFILE=y"
- name: "psa-api-test-crypto-arm-linux"
src: "$TS_ROOT/deployments/psa-api-test/crypto/arm-linux"
@@ -117,12 +111,10 @@ data:
src: "$TS_ROOT/deployments/se-proxy/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "sfs-demo-optee-arm"
src: "$TS_ROOT/deployments/sfs-demo/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- name: "smm-gateway-pc-linux"
src: "$TS_ROOT/deployments/smm-gateway/linux-pc"
params:
@@ -131,7 +123,6 @@ data:
src: "$TS_ROOT/deployments/smm-gateway/opteesp"
params:
- "-GUnix Makefiles"
- - "-DSP_DEV_KIT_DIR=$SP_DEV_KIT_DIR"
- "-DCMAKE_VERBOSE_MAKEFILE=y"
- name: "ts-demo-arm-linux"
src: "$TS_ROOT/deployments/ts-demo/arm-linux"