Gabor Ambrus | a84494a | 2023-08-14 23:04:48 +0200 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2023, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | cmake_minimum_required(VERSION 3.18 FATAL_ERROR) |
| 8 | |
| 9 | # Set default platform. |
| 10 | set(TS_PLATFORM "arm/fvp/fvp_base_revc-2xaemv8a" CACHE STRING "Target platform location.") |
| 11 | |
| 12 | |
| 13 | include(../../../deployment.cmake REQUIRED) |
| 14 | |
| 15 | #------------------------------------------------------------------------------- |
| 16 | # The CMakeLists.txt for building the logging deployment for opteesp |
| 17 | # |
| 18 | # Builds the logging service provider for running in an SEL0 secure |
| 19 | # partition hosted by OPTEE in the role of SPM. |
| 20 | #------------------------------------------------------------------------------- |
| 21 | include(${TS_ROOT}/environments/opteesp/env.cmake) |
| 22 | project(trusted-services LANGUAGES C ASM) |
| 23 | add_executable(logging) |
| 24 | target_include_directories(logging PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}") |
| 25 | set(SP_BIN_UUID_CANON "da9dffbd-d590-40ed-975f-19c65a3d52d3") |
| 26 | set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}") |
| 27 | set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes") |
Gabor Toth | 1b0c11a | 2024-04-05 11:43:55 +0200 | [diff] [blame] | 28 | set(SP_BOOT_ORDER "0" CACHE STRING "Boot order of the SP") |
Gabor Ambrus | a84494a | 2023-08-14 23:04:48 +0200 | [diff] [blame] | 29 | set(TRACE_PREFIX "LOGGING" CACHE STRING "Trace prefix") |
| 30 | |
| 31 | target_include_directories(logging PRIVATE |
| 32 | ${CMAKE_CURRENT_LIST_DIR} |
| 33 | ) |
| 34 | |
| 35 | #------------------------------------------------------------------------------- |
| 36 | # Add components - this deployment uses an infrastructure that provides |
| 37 | # ram backed storage for SFS. |
| 38 | # |
| 39 | #------------------------------------------------------------------------------- |
| 40 | add_components(TARGET "logging" |
| 41 | BASE_DIR ${TS_ROOT} |
| 42 | COMPONENTS |
| 43 | environments/opteesp |
| 44 | ) |
| 45 | |
| 46 | include(../../env/commonsp/logging_sp.cmake REQUIRED) |
| 47 | include(../../logging.cmake REQUIRED) |
| 48 | |
| 49 | #------------------------------------------------------------------------------- |
| 50 | # Set target platform to provide drivers needed by the deployment |
| 51 | # |
| 52 | #------------------------------------------------------------------------------- |
| 53 | add_platform(TARGET "logging") |
| 54 | |
| 55 | #------------------------------------------------------------------------------- |
| 56 | # Deployment specific build options |
| 57 | # |
| 58 | #------------------------------------------------------------------------------- |
| 59 | target_compile_definitions(logging PRIVATE |
| 60 | ARM64=1 |
| 61 | ) |
| 62 | |
| 63 | if(CMAKE_C_COMPILER_ID STREQUAL "GNU") |
| 64 | target_compile_options(logging PRIVATE |
| 65 | -std=c99 |
| 66 | ) |
| 67 | |
| 68 | endif() |
| 69 | |
| 70 | #------------------------------------------------------------------------------- |
| 71 | # Deployment specific install options |
| 72 | # |
| 73 | #------------------------------------------------------------------------------- |
| 74 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 75 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 76 | endif() |
Gabor Ambrus | a84494a | 2023-08-14 23:04:48 +0200 | [diff] [blame] | 77 | |
| 78 | install(TARGETS logging |
Gabor Ambrus | a84494a | 2023-08-14 23:04:48 +0200 | [diff] [blame] | 79 | RUNTIME DESTINATION ${TS_ENV}/bin |
| 80 | ) |
| 81 | |
| 82 | include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake) |
| 83 | export_sp( |
| 84 | SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON} |
| 85 | SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON} |
| 86 | SP_UUID_LE ${SP_UUID_LE} |
Gabor Toth | 7e4babe | 2024-03-14 11:09:19 +0100 | [diff] [blame] | 87 | SP_BOOT_ORDER ${SP_BOOT_ORDER} |
Gabor Ambrus | a84494a | 2023-08-14 23:04:48 +0200 | [diff] [blame] | 88 | SP_NAME "logging" |
| 89 | MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in |
| 90 | DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_logging.dts.in |
| 91 | JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in |
| 92 | ) |