chore(fvp): bump OP-TEE version to 4.5.0

Update OP-TEE to version 4.5.0 in fvp_utils.sh to align with the latest
OP-TEE release.

The OP-TEE dispatcher (OPTEED) assumes the split binary format of OP-TEE
is being used (tee-header_v2.bin, tee-pager_v2.bin). The existing test
setup uses the raw binary alone. OPTEED warns at runtime about an
unexpected header format.

Update the FVP CI boot flow to support this bootflow:

* In fvp-optee, fetch and archive the split binaries.
* In fvp-fip.tftf+bl32, pass BL32_EXTRA1 and, if available, BL32_EXTRA2
  to build_fip.

Change-Id: Ia415223562521429ee81e6e2ab155b0a96c16622
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/fvp_utils.sh b/fvp_utils.sh
index d241cd1..1702869 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -47,7 +47,7 @@
 
 rootfs_url="$linaro_release/lt-vexpress64-openembedded_minimal-armv8-gcc-5.2_20170127-761.img.gz"
 
-optee_version="4.4.0"
+optee_version="4.5.0"
 optee_path=$tfa_downloads/optee/${optee_version}
 
 # Default FVP model variables
diff --git a/run_config/fvp-fip.tftf+bl32 b/run_config/fvp-fip.tftf+bl32
index 8f33926..2778e83 100644
--- a/run_config/fvp-fip.tftf+bl32
+++ b/run_config/fvp-fip.tftf+bl32
@@ -6,5 +6,18 @@
 #
 
 post_tf_build() {
-	build_fip BL33="$archive/tftf.bin" BL32="$archive/bl32.bin"
+	# Set initial FIP (Firmware Image Package) options
+	options="BL33=$archive/tftf.bin BL32=$archive/bl32.bin"
+
+	# If TF-A config is 'opteed', include additional OP-TEE binary options
+	if [[ "$tf_config" == *opteed* ]]; then
+		options="$options BL32_EXTRA1=$archive/bl32_extra1.bin"
+
+		if [[ -f "$archive/bl32_extra2.bin" ]]; then
+			options="$options BL32_EXTRA2=$archive/bl32_extra2.bin"
+		fi
+	fi
+
+	# Build the FIP with the collected options
+	build_fip $options
 }
diff --git a/run_config/fvp-optee b/run_config/fvp-optee
index 612a424..59ff66c 100644
--- a/run_config/fvp-optee
+++ b/run_config/fvp-optee
@@ -6,5 +6,11 @@
 #
 
 post_tf_build() {
-	url="${optee_path}/tee-raw.bin" filename="bl32.bin" fetch_and_archive
+	# Fetch and archive the OP-TEE header binary as 'bl32.bin'
+	url="${optee_path}/tee-header_v2.bin" filename="bl32.bin" \
+		fetch_and_archive
+
+	# Fetch and archive the OP-TEE pager binary as 'bl32_extra1.bin'
+	url="${optee_path}/tee-pager_v2.bin" filename="bl32_extra1.bin" \
+		fetch_and_archive
 }