From 52b82ffc3416205a56c5acc8841c4a172d318ec2 Mon Sep 17 00:00:00 2001 From: Mohamed Omar Asaker Date: Wed, 14 Aug 2024 17:27:28 +0100 Subject: [PATCH] doc/user-guide: custom instructions for TC Adding custom instructions for TC2 to make it work with the latest SCP. As TC release uses an old version of SCP before the directory restructure. Hence, some modification has to be applied to TC scp build script. Along with instructions to rebuild only SCP-firmware and all it's dependencies. Signed-off-by: Mohamed Omar Asaker --- user_guide.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/user_guide.md b/user_guide.md index 652e9b668..a54f8f631 100644 --- a/user_guide.md +++ b/user_guide.md @@ -258,7 +258,7 @@ building the system and running it on an FVP, please refer to, and follow, the privileges. [TC2 User guide]: -https://totalcompute.docs.arm.com/en/latest/totalcompute/tc2/user-guide.html +https://totalcompute.docs.arm.com/en/tc2-2024.02.22-lsc/totalcompute/tc2/user-guide.html The instructions within this section use TC2 BSP only without Android (buildroot) as an example platform, but they are relevant for all TC platforms. @@ -272,6 +272,41 @@ git fetch git checkout FETCH_HEAD ``` +#### Patch build-scripts +The current TC2 release is not using the latest SCP-firmware. Hence, In order to build the latest a few modification need to be applied on `build-scp.sh` + +To do so, please apply the following patch in `/build-scripts` +
+ tc2-scp-build-script-modification + +```diff +diff --git a/build-scp.sh b/build-scp.sh +index 4b4118d..c5fbe65 100755 +--- a/build-scp.sh ++++ b/build-scp.sh +@@ -59,8 +59,8 @@ do_build() { + (*) die "Unsupported value for SCP_BUILD_MODE: $SCP_BUILD_MODE" + esac + +- if [ ! -d "$SCP_OUTDIR/$scp_fw/product/$PLATFORM/${scp_fw}_${scp_type}" ]; then +- makeopts+=("-DSCP_FIRMWARE_SOURCE_DIR:PATH="$PLATFORM/${scp_fw}_${scp_type}"") ++ if [ ! -d "$SCP_OUTDIR/$scp_fw/product/totalcompute/$PLATFORM/${scp_fw}_${scp_type}" ]; then ++ makeopts+=("-DSCP_FIRMWARE_SOURCE_DIR:PATH=totalcompute/"$PLATFORM/${scp_fw}_${scp_type}"") + $CMAKE -GNinja "${makeopts[@]}" + fi +``` + +
+ +Please run +```sh +cd /build-scripts +git apply +``` +__Note:__ This patch is required only with SCP-firmware from this [Version] + +[Version]:https://gitlab.arm.com/firmware/SCP-firmware/-/commit/09d41f6db3d7551516d7a1b0a6a998ae8ba83761 + ### Build all components ```sh @@ -279,6 +314,24 @@ export PLATFORM=tc2 export FILESYSTEM=buildroot /build-scripts/run_docker.sh /build-scripts/build-all.sh -p $PLATFORM -f $FILESYSTEM build ``` +### Re-build SCP only +To re build SCP without rebuilding all the components please run the following: +```sh +set -e + +export PLATFORM=tc2 +export FILESYSTEM=buildroot +export TC_TARGET_FLAVOR=fvp + +components=("build-scp.sh" "build-tfa.sh" "build-rss.sh" "build-flash-image.sh") + +for component in "${components[@]}" +do + ./run_docker.sh $component clean + ./run_docker.sh $component build + ./run_docker.sh $component deploy +done +``` ### Running Buildroot -- GitLab