Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Balint Dobszay | 047aea8 | 2022-05-16 14:20:53 +0200 | [diff] [blame] | 2 | # Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved. |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
Balint Dobszay | 047aea8 | 2022-05-16 14:20:53 +0200 | [diff] [blame] | 7 | cmake_minimum_required(VERSION 3.18 FATAL_ERROR) |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 8 | include(../../deployment.cmake REQUIRED) |
| 9 | |
| 10 | #------------------------------------------------------------------------------- |
| 11 | # The CMakeLists.txt for building the libts deployment for arm-linux |
| 12 | # |
| 13 | # Used for building the libts library for the arm-linux enviroment. Used for |
| 14 | # locating and accessing services from a Linux userspace client. Service |
| 15 | # instances can be located in any supported secure processing enviroment. |
| 16 | #------------------------------------------------------------------------------- |
| 17 | include(${TS_ROOT}/environments/arm-linux/env_shared_lib.cmake) |
| 18 | project(trusted-services LANGUAGES CXX C) |
| 19 | add_library(ts SHARED) |
| 20 | target_include_directories(ts PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}") |
| 21 | |
Gyorgy Szing | 186c7cc | 2022-09-16 01:12:50 +0200 | [diff] [blame] | 22 | # Setting the MM communication buffer parameters |
| 23 | set(MM_COMM_BUFFER_ADDRESS "0x881000000" CACHE STRING "Address of MM communicte buffer") |
| 24 | set(MM_COMM_BUFFER_SIZE "8*4*1024" CACHE STRING "Size of the MM communicate buffer in bytes") |
| 25 | |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 26 | #------------------------------------------------------------------------------- |
Gabor Toth | ed8305b | 2024-09-24 12:47:26 +0200 | [diff] [blame^] | 27 | # For user-specific tracing set to TRACE_LEVEL_NONE and implement: |
| 28 | # void trace_puts(const char *str) |
| 29 | #------------------------------------------------------------------------------- |
| 30 | |
| 31 | set(TRACE_PREFIX "LIBTS" CACHE STRING "Trace prefix") |
| 32 | set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level") |
| 33 | #------------------------------------------------------------------------------- |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 34 | # Components that are specific to deployment in the arm-linux environment. |
| 35 | # |
| 36 | #------------------------------------------------------------------------------- |
| 37 | add_components( |
| 38 | TARGET "ts" |
| 39 | BASE_DIR ${TS_ROOT} |
| 40 | COMPONENTS |
Julian Hall | f7d55ff | 2021-11-22 13:57:54 +0000 | [diff] [blame] | 41 | "components/common/utils" |
Imre Kis | 63761fb | 2023-08-02 16:16:26 +0200 | [diff] [blame] | 42 | "components/rpc/ts_rpc/caller/linux" |
Julian Hall | f7d55ff | 2021-11-22 13:57:54 +0000 | [diff] [blame] | 43 | "components/rpc/mm_communicate/caller/linux" |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 44 | "components/service/locator/linux" |
| 45 | "components/service/locator/linux/ffa" |
Julian Hall | 51c8aa8 | 2021-11-23 09:13:35 +0000 | [diff] [blame] | 46 | "components/service/locator/linux/mm_communicate" |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 47 | "components/common/uuid" |
| 48 | ) |
| 49 | |
| 50 | #------------------------------------------------------------------------------- |
| 51 | # Extend with components that are common across all deployments of |
| 52 | # libts |
| 53 | # |
| 54 | #------------------------------------------------------------------------------- |
| 55 | include(../libts.cmake REQUIRED) |
| 56 | |
| 57 | #------------------------------------------------------------------------------- |
| 58 | # Define library options and dependencies. |
| 59 | # |
| 60 | #------------------------------------------------------------------------------- |
Julian Hall | f7d55ff | 2021-11-22 13:57:54 +0000 | [diff] [blame] | 61 | target_link_libraries(ts PRIVATE gcc) |