modules: tfa: integrate trusted-firmware-a
This commit integrates trusted-firmware-a as a zephyr module Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
This commit is contained in:
parent
86de6b71a4
commit
97897a003d
|
@ -2583,6 +2583,18 @@ West:
|
|||
labels:
|
||||
- manifest-tf-m-tests
|
||||
|
||||
"West project: trusted-firmware-a":
|
||||
status: maintained
|
||||
maintainers:
|
||||
- povergoing
|
||||
- sgrrzhf
|
||||
collaborators:
|
||||
- carlocaione
|
||||
files:
|
||||
- modules/trusted-firmware-a/
|
||||
labels:
|
||||
- manifest-trusted-firmware-a
|
||||
|
||||
"West project: psa-arch-tests":
|
||||
status: maintained
|
||||
maintainers:
|
||||
|
|
|
@ -74,6 +74,9 @@ comment "mbedtls module not available."
|
|||
comment "Trusted-firmware-m module not available."
|
||||
depends on !ZEPHYR_TRUSTED_FIRMWARE_M_MODULE
|
||||
|
||||
comment "Trusted-firmware-a module not available."
|
||||
depends on !ZEPHYR_TRUSTED_FIRMWARE_A_MODULE
|
||||
|
||||
comment "Nanopb module not available."
|
||||
depends on !ZEPHYR_NANOPB_MODULE
|
||||
|
||||
|
|
36
modules/trusted-firmware-a/CMakeLists.txt
Normal file
36
modules/trusted-firmware-a/CMakeLists.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if (CONFIG_BUILD_WITH_TFA)
|
||||
set(TFA_BINARY_DIR ${CMAKE_BINARY_DIR}/tfa)
|
||||
|
||||
file(MAKE_DIRECTORY ${TFA_BINARY_DIR})
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(
|
||||
tfa
|
||||
SOURCE_DIR ${ZEPHYR_TRUSTED_FIRMWARE_A_MODULE_DIR}
|
||||
BINARY_DIR ${TFA_BINARY_DIR}
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_ALWAYS True
|
||||
USES_TERMINAL_BUILD True
|
||||
)
|
||||
|
||||
if (CONFIG_TFA_MAKE_BUILD_TYPE_DEBUG)
|
||||
set(TFA_BUILD_DEBUG "1")
|
||||
else()
|
||||
set(TFA_BUILD_DEBUG "0")
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
COMMAND make -C ${ZEPHYR_TRUSTED_FIRMWARE_A_MODULE_DIR}
|
||||
DEBUG=${TFA_BUILD_DEBUG}
|
||||
CROSS_COMPILE=${CROSS_COMPILE}
|
||||
BUILD_BASE=${TFA_BINARY_DIR} PLAT=${TFA_PLAT}
|
||||
BL33=${CMAKE_BINARY_DIR}/zephyr/${KERNEL_BIN_NAME}
|
||||
all fip
|
||||
)
|
||||
endif()
|
22
modules/trusted-firmware-a/Kconfig
Normal file
22
modules/trusted-firmware-a/Kconfig
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config ZEPHYR_TRUSTED_FIRMWARE_A_MODULE
|
||||
bool
|
||||
|
||||
menuconfig BUILD_WITH_TFA
|
||||
bool "Build with TF-A as the Secure Execution Environment"
|
||||
help
|
||||
When enabled, this option instructs the Zephyr build process to
|
||||
additionally generate a TF-A image for the Secure Execution
|
||||
environment, along with the Zephyr image. The Zephyr image
|
||||
itself is to be executed in the Non-Secure Processing Environment.
|
||||
|
||||
if BUILD_WITH_TFA
|
||||
|
||||
config TFA_MAKE_BUILD_TYPE_DEBUG
|
||||
bool "Debug build"
|
||||
help
|
||||
When enabled, the build type of TF-A would be debug.
|
||||
|
||||
endif # BUILD_WITH_TFA
|
5
west.yml
5
west.yml
|
@ -239,6 +239,11 @@ manifest:
|
|||
path: modules/tee/tf-m/trusted-firmware-m
|
||||
groups:
|
||||
- tee
|
||||
- name: trusted-firmware-a
|
||||
revision: d29cddecde614d81cbec1fb0086cdaebd77d3575
|
||||
path: modules/tee/tf-a/trusted-firmware-a
|
||||
groups:
|
||||
- tee
|
||||
- name: tf-m-tests
|
||||
revision: c99a86b295c4887520da9d8402566d7f225c974e
|
||||
path: modules/tee/tf-m/tf-m-tests
|
||||
|
|
Loading…
Reference in a new issue