2022-10-21 18:53:37 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2018-2021 mcumgr authors
|
|
|
|
# Copyright (c) 2022 Laird Connectivity
|
2023-05-22 17:06:32 +08:00
|
|
|
# Copyright (c) 2022-2023 Nordic Semiconductor ASA
|
2022-10-21 18:53:37 +08:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
# File System management group public API is exposed by MCUmgr API
|
|
|
|
# interface, when File System management is enabled.
|
2022-12-08 22:42:59 +08:00
|
|
|
zephyr_library(mgmt_mcumgr_grp_fs)
|
|
|
|
zephyr_library_sources(src/fs_mgmt.c)
|
2022-11-25 00:28:24 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_MCUMGR_GRP_FS_CHECKSUM_HASH src/fs_mgmt_hash_checksum.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_MCUMGR_GRP_FS_CHECKSUM_IEEE_CRC32 src/fs_mgmt_hash_checksum_crc32.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_MCUMGR_GRP_FS_HASH_SHA256 src/fs_mgmt_hash_checksum_sha256.c)
|
2022-10-21 18:53:37 +08:00
|
|
|
|
2023-05-22 17:06:32 +08:00
|
|
|
if(CONFIG_MCUMGR_GRP_FS_CHECKSUM_HASH AND CONFIG_MCUMGR_GRP_FS_HASH_SHA256)
|
2024-05-24 20:09:02 +08:00
|
|
|
if(CONFIG_MBEDTLS_SHA256)
|
2022-12-08 22:42:59 +08:00
|
|
|
zephyr_library_link_libraries(mbedTLS)
|
2022-10-21 18:53:37 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-12-08 22:42:59 +08:00
|
|
|
zephyr_library_include_directories(include)
|
2023-05-22 17:06:32 +08:00
|
|
|
|
|
|
|
if(CONFIG_MCUMGR_GRP_FS AND NOT CONFIG_MCUMGR_GRP_FS_FILE_ACCESS_HOOK)
|
|
|
|
message(WARNING "Note: MCUmgr file system management is enabled but file access hooks are "
|
|
|
|
"disabled, this is an insecure configuration and not recommended for production "
|
|
|
|
"use, as all files on the filesystem can be manipulated by a remote device. See "
|
|
|
|
"https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr_callbacks.html "
|
|
|
|
"for details on enabling and using MCUmgr hooks.")
|
|
|
|
endif()
|