blob: 73a8524b6f64d31609c079fba2eeae2252936cba [file] [log] [blame]
Julian Hall351a0722023-01-12 11:58:42 +00001#-------------------------------------------------------------------------------
2# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Includes components needed for deploying the fwu update_agent within a
7# Posix environment as a command-line application. Can be used to apply an
8# update to a disk image file. Uses the same fwu components as a fw deployment
9# of the fwu service.
10#-------------------------------------------------------------------------------
11
Gyorgy Szing386433f2023-03-31 12:52:25 +000012if (NOT DEFINED TGT)
13 message(FATAL_ERROR "Mandatory parameter TGT is not defined.")
14endif()
Julian Hall351a0722023-01-12 11:58:42 +000015#-------------------------------------------------------------------------------
16# Common components for fwu posix deployments
17#
18#-------------------------------------------------------------------------------
Gyorgy Szing386433f2023-03-31 12:52:25 +000019add_components(TARGET ${TGT}
Julian Hall351a0722023-01-12 11:58:42 +000020 BASE_DIR ${TS_ROOT}
21 COMPONENTS
Julian Hall351a0722023-01-12 11:58:42 +000022 "components/common/crc32/native"
23 "components/common/trace"
24 "components/common/utils"
Julian Hall351a0722023-01-12 11:58:42 +000025)
26
Gyorgy Szing386433f2023-03-31 12:52:25 +000027target_sources(${TGT} PRIVATE
Julian Hall351a0722023-01-12 11:58:42 +000028 ${CMAKE_CURRENT_LIST_DIR}/fwu_main.cpp
29 ${CMAKE_CURRENT_LIST_DIR}/cmd_update_image.cpp
30 ${CMAKE_CURRENT_LIST_DIR}/cmd_print_image_dir.cpp
31 ${CMAKE_CURRENT_LIST_DIR}/cmd_print_metadata_v1.cpp
32 ${CMAKE_CURRENT_LIST_DIR}/cmd_print_metadata_v2.cpp
33 ${CMAKE_CURRENT_LIST_DIR}/print_uuid.cpp
Gyorgy Szing386433f2023-03-31 12:52:25 +000034 ${CMAKE_CURRENT_LIST_DIR}/app/fwu_app.cpp
35 ${CMAKE_CURRENT_LIST_DIR}/app/metadata_reader.cpp
36 ${CMAKE_CURRENT_LIST_DIR}/app/metadata_v1_reader.cpp
37 ${CMAKE_CURRENT_LIST_DIR}/app/metadata_v2_reader.cpp
Julian Hall351a0722023-01-12 11:58:42 +000038)