Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [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) |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 8 | include(../../deployment.cmake REQUIRED) |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 9 | |
| 10 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 11 | # The CMakeLists.txt for building the fwu-tool deployment for linux-pc |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 12 | # |
| 13 | # This configuration builds the FWU update agent into a command-line app |
| 14 | # that can be used to apply updates to disk image files. |
| 15 | #------------------------------------------------------------------------------- |
| 16 | project(trusted-services LANGUAGES CXX C) |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 17 | add_executable(fwu-tool) |
| 18 | set(TGT "fwu-tool") |
| 19 | target_include_directories(fwu-tool PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}") |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Configure trace output for command-line app |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 25 | set(TRACE_PREFIX "fwu-tool" CACHE STRING "Trace prefix") |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 26 | set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level") |
| 27 | |
| 28 | #------------------------------------------------------------------------------- |
| 29 | # Deployment specific build configuration |
| 30 | # |
| 31 | #------------------------------------------------------------------------------- |
| 32 | |
| 33 | # Scale number of partitions for pretty complicated fw images |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 34 | target_compile_definitions(${TGT} PRIVATE |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 35 | PARTITIONED_BLOCK_STORE_MAX_PARTITIONS=24) |
| 36 | |
| 37 | #------------------------------------------------------------------------------- |
| 38 | # This configuration builds for linux-pc |
| 39 | # |
| 40 | #------------------------------------------------------------------------------- |
| 41 | include(${TS_ROOT}/environments/linux-pc/env.cmake) |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 42 | add_components(TARGET ${TGT} |
| 43 | BASE_DIR ${TS_ROOT} |
| 44 | COMPONENTS "environments/linux-pc" |
| 45 | ) |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 46 | |
| 47 | #------------------------------------------------------------------------------- |
| 48 | # External project source-level dependencies |
| 49 | # |
| 50 | #------------------------------------------------------------------------------- |
| 51 | include(${TS_ROOT}/external/tf_a/tf-a.cmake) |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 52 | add_tfa_dependency(TARGET ${TGT}) |
Julian Hall | 351a072 | 2023-01-12 11:58:42 +0000 | [diff] [blame] | 53 | |
| 54 | #------------------------------------------------------------------------------- |
| 55 | # Deployment specific components |
| 56 | # |
| 57 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 386433f | 2023-03-31 12:52:25 +0000 | [diff] [blame^] | 58 | include(../fwu.cmake REQUIRED) |
| 59 | include(../file-block-store.cmake REQUIRED) |