blob: 78a13dda29d76f1de567d50b268be303274793c5 [file] [log] [blame]
Gabor Tothee7c4a12024-11-11 16:51:31 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Lists components that provide an infrastructure layer for the block-storage
7# service provider that uses a ram-backed block store, partitioned and encrypted
8# by default using the 'ref' configuration. This infrastructure is intended for
9# test purposes.
10#-------------------------------------------------------------------------------
11
12#-------------------------------------------------------------------------------
13# Infrastructure components
14#
15#-------------------------------------------------------------------------------
16add_components(TARGET "block-storage"
17 BASE_DIR ${TS_ROOT}
18 COMPONENTS
19 "components/service/block_storage/block_store/device"
20 "components/service/block_storage/block_store/device/ram"
21 "components/service/block_storage/block_store/partitioned"
22 "components/service/block_storage/block_store/encrypted"
23 "components/service/block_storage/config/ref"
24 "components/service/block_storage/factory/ref_encrypt_ram"
25 "components/service/crypto/backend/mbedcrypto/mbedtls_fake_external_get_random"
26)
27
28#-------------------------------------------------------------------------------
29# External project source-level dependencies
30#
31#-------------------------------------------------------------------------------
32set(MBEDTLS_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/blk_encrypt_config.h"
33 CACHE STRING "Configuration file for Mbed TLS")
34set(MBEDTLS_PSA_CRYPTO_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/blk_encrypt_config_psa_aes_cbc_ecb_hkdf.h"
35 CACHE STRING "PSA crypto config file for Mbed TLS")
36include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
37target_link_libraries(block-storage PRIVATE MbedTLS::mbedcrypto)
38
39# Pass the location of the mbedtls config file to C preprocessor.
40target_compile_definitions(block-storage PRIVATE
41 MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}"
42 MBEDTLS_PSA_CRYPTO_CONFIG_FILE="${MBEDTLS_PSA_CRYPTO_CONFIG_FILE}"
43)