diff mbox series

[1/1] arm/trusted-services: Add recipe for block storage service

Message ID 20240314155920.345936-2-emekcan.aras@arm.com
State New
Headers show
Series arm/trusted-services: Add recipe for block storage service | expand

Commit Message

Emekcan Aras March 14, 2024, 3:59 p.m. UTC
From: Emekcan Aras <Emekcan.Aras@arm.com>

Adds a recipe (ts-sp-block-storage) to build the Block Storage
secure partition to enable feature development for downstream users.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
---
 .../trusted-services/ts-sp-block-storage_%.bbappend |  1 +
 meta-arm/recipes-security/optee/optee-os-ts.inc     |  7 +++++++
 .../trusted-services/ts-sp-block-storage_git.bb     | 13 +++++++++++++
 .../recipes-security/trusted-services/ts-uuid.inc   |  3 ++-
 4 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm-bsp/recipes-security/trusted-services/ts-sp-block-storage_%.bbappend
 create mode 100644 meta-arm/recipes-security/trusted-services/ts-sp-block-storage_git.bb
diff mbox series

Patch

diff --git a/meta-arm-bsp/recipes-security/trusted-services/ts-sp-block-storage_%.bbappend b/meta-arm-bsp/recipes-security/trusted-services/ts-sp-block-storage_%.bbappend
new file mode 100644
index 00000000..5c9ef210
--- /dev/null
+++ b/meta-arm-bsp/recipes-security/trusted-services/ts-sp-block-storage_%.bbappend
@@ -0,0 +1 @@ 
+require ts-arm-platforms.inc
diff --git a/meta-arm/recipes-security/optee/optee-os-ts.inc b/meta-arm/recipes-security/optee/optee-os-ts.inc
index 057dde25..ce5b8b86 100644
--- a/meta-arm/recipes-security/optee/optee-os-ts.inc
+++ b/meta-arm/recipes-security/optee/optee-os-ts.inc
@@ -59,4 +59,11 @@  SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
 EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
                                         ' CFG_SPMC_TESTS=y', '' , d)}"
 
+# Block Storage SP
+DEPENDS:append  = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-block-storage', \
+                                        ' ts-sp-block-storage', '' , d)}"
+
+SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-block-storage', \
+                                        ' ${TS_BIN}/${BLOCK_STORAGE_UUID}.stripped.elf', '', d)}"
+
 EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_MAP_EXT_DT_SECURE=y CFG_SECURE_PARTITION=y SP_PATHS="${SP_PATHS}" ', d)}"
diff --git a/meta-arm/recipes-security/trusted-services/ts-sp-block-storage_git.bb b/meta-arm/recipes-security/trusted-services/ts-sp-block-storage_git.bb
new file mode 100644
index 00000000..efbaad14
--- /dev/null
+++ b/meta-arm/recipes-security/trusted-services/ts-sp-block-storage_git.bb
@@ -0,0 +1,13 @@ 
+# SPDX-FileCopyrightText: <text>Copyright 2023 Arm Limited and/or its
+# affiliates <open-source-office@arm.com></text>
+#
+# SPDX-License-Identifier: MIT
+
+DESCRIPTION = "Trusted Services block storage service provider"
+
+require ts-sp-common.inc
+
+SP_UUID = "${BLOCK_STORAGE_UUID}"
+TS_SP_BLOCK_STORAGE_CONFIG ?= "default"
+
+OECMAKE_SOURCEPATH="${S}/deployments/block-storage/config/${TS_SP_BLOCK_STORAGE_CONFIG}-${TS_ENV}"
diff --git a/meta-arm/recipes-security/trusted-services/ts-uuid.inc b/meta-arm/recipes-security/trusted-services/ts-uuid.inc
index c18ec5d7..1eb05d8b 100644
--- a/meta-arm/recipes-security/trusted-services/ts-uuid.inc
+++ b/meta-arm/recipes-security/trusted-services/ts-uuid.inc
@@ -9,4 +9,5 @@  SMM_GATEWAY_UUID = "ed32d533-99e6-4209-9cc0-2d72cdd998a7"
 STORAGE_UUID     = "751bf801-3dde-4768-a514-0f10aeed1790"
 SPM_TEST1_UUID   = "5c9edbc3-7b3a-4367-9f83-7c191ae86a37"
 SPM_TEST2_UUID   = "7817164c-c40c-4d1a-867a-9bb2278cf41a"
-SPM_TEST3_UUID   = "23eb0100-e32a-4497-9052-2f11e584afa6"
\ No newline at end of file
+SPM_TEST3_UUID   = "23eb0100-e32a-4497-9052-2f11e584afa6"
+BLOCK_STORAGE_UUID = "63646e80-eb52-462f-ac4f-8cdf3987519c"