Sherry Zhang | 7146895 | 2022-10-19 14:09:05 +0800 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2022, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
Kevin Peng | cc91402 | 2023-01-13 15:39:13 +0800 | [diff] [blame] | 8 | # It requires platform to enable network connectivity and |
| 9 | # bootloader to support Firmware Update service |
| 10 | if(NOT DEFINED PLATFORM_HAS_FIRMWARE_UPDATE_SUPPORT) |
| 11 | set(PLATFORM_HAS_FIRMWARE_UPDATE_SUPPORT OFF) |
| 12 | endif() |
| 13 | |
Sherry Zhang | 7146895 | 2022-10-19 14:09:05 +0800 | [diff] [blame] | 14 | set(TFM_PARTITION_FIRMWARE_UPDATE OFF CACHE BOOL "Enable firmware update partition") |
| 15 | set(TFM_FWU_BOOTLOADER_LIB "mcuboot" CACHE STRING "Bootloader configure file for Firmware Update partition") |
| 16 | set(TFM_CONFIG_FWU_MAX_WRITE_SIZE 1024 CACHE STRING "The maximum permitted size for block in psa_fwu_write, in bytes.") |
| 17 | set(TFM_CONFIG_FWU_MAX_MANIFEST_SIZE 0 CACHE STRING "The maximum permitted size for manifest in psa_fwu_start(), in bytes.") |
Sherry Zhang | 7146895 | 2022-10-19 14:09:05 +0800 | [diff] [blame] | 18 | set(FWU_DEVICE_CONFIG_FILE "" CACHE STRING "The device configuration file for Firmware Update partition") |
| 19 | if (DEFINED MCUBOOT_UPGRADE_STRATEGY) |
| 20 | if(${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "SWAP_USING_SCRATCH" OR ${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "SWAP_USING_MOVE") |
| 21 | set(FWU_SUPPORT_TRIAL_STATE ON CACHE BOOL "Device support TRIAL component state.") |
| 22 | endif() |
| 23 | else() |
| 24 | set(FWU_SUPPORT_TRIAL_STATE OFF CACHE BOOL "Device support TRIAL component state.") |
| 25 | endif() |