aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorManish Pandey <manish.pandey2@arm.com>2020-03-16 22:25:40 +0000
committerOlivier Deprez <olivier.deprez@arm.com>2020-03-23 15:39:43 +0100
commit270ee15e97f12ee4bde398a7835c451fa62ce322 (patch)
tree4d85fa2c4a0e247b09ea097316b49a0e08f7c047 /tools
parent294a6362f65098a1fcfa75e9048c986c6dbe7288 (diff)
downloadtf-a-tests-270ee15e97f12ee4bde398a7835c451fa62ce322.tar.gz
cactus: generate JSON file required by TF-A
Generate JSON file which is being passed as "SP_LAYOUT_FILE" build parameter to TF-A build. Two instances of cactus is used to demonstrate functioning of multiple SP's. cactus-secondary dts is same as cactus dts except for UUID and load address. Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ib6d8f7d5d4894495754da0ce39f663263eeb182f
Diffstat (limited to 'tools')
-rwxr-xr-xtools/generate_json/generate_json.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/generate_json/generate_json.sh b/tools/generate_json/generate_json.sh
new file mode 100755
index 00000000..8dd26303
--- /dev/null
+++ b/tools/generate_json/generate_json.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Generate a JSON file which will be fed to TF-A as SPM_LAYOUT_FILE to package
+# Secure Partitions as part of FIP.
+
+# $1 = Secure Partition (cactus)
+# $2 = Platform (fvp)
+# $3 = Build Type
+# Output = build/plat/<Build Type>/sp_layout.json
+
+GENERATED_JSON=build/$2/$3/sp_layout.json
+
+# To demonstrate communication between SP's, two cactus S-EL1 instances used.
+# cactus-primary and cactus-secondary has same binary but different
+# partition manifest.
+if [ "$1" == "cactus" ]; then
+ echo -e "{\n\t\"$1-primary\" : {\n \
+ \t\"image\": \"$1.bin\",\n \
+ \t\"pm\": \"../../../spm/$1/$1.dts\"\n\t},\n\n\t\"$1-secondary\" : {\n \
+ \t\"image\": \"$1.bin\",\n \
+ \t\"pm\": \"../../../spm/$1/$1-secondary.dts\" \n \
+ }\n}" \
+ > "$GENERATED_JSON"
+else
+ echo -e "\nWarning: Only Cactus is supported as Secure Partition\n"
+fi