feat: create test config for fvp_r platform

This configuration file outlines the build and run settings for the
fvp-r platform. It build TF using the fvp-r-default config and applies
the fvp-aemv8r.linux run settings.

fvp-aemv8r.linux: update dtb_addr based on the vexpress_* board
configuration which supports FVP_BaseR_AEMv8R

Update boot expect script and enable the FVP-R model in Open-CI

Signed-off-by: Divin Raj <divin.raj@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I59be6e39e3096445c2841b0f729f136aac10a26b
diff --git a/expect-lava/fvp-r-yocto.exp b/expect-lava/fvp-r-yocto.exp
index 9f56db2..3f116e0 100644
--- a/expect-lava/fvp-r-yocto.exp
+++ b/expect-lava/fvp-r-yocto.exp
@@ -13,7 +13,8 @@
 # Uboot
 expect_string+=('i;U-Boot')
 
+# Linux kernel boot section
+source $ci_root/expect-lava/linux.inc
+
 # Yocto
-expect_string+=('i;Booting Linux on physical CPU')
-expect_string+=('i;fvp-baser-aemv8r64 login:;;;root\n')
-expect_string+=('i;#')
+expect_string+=('i;fvp-baser-aemv8r64 login:')
diff --git a/expect/fvp-r-yocto.exp b/expect/fvp-r-yocto.exp
index 34117a4..8f3189d 100644
--- a/expect/fvp-r-yocto.exp
+++ b/expect/fvp-r-yocto.exp
@@ -28,22 +28,12 @@
 	}

 }

 

-# Yocto

-expect {

-	"Booting Linux on physical CPU" {

-		message "Booting Linux"

-	}

-}

+# Linux kernel boot section

+source [file join [file dirname [info script]] linux.inc]

 

+# Yocto

 expect {

 	"fvp-baser-aemv8r64 login:" {

 		message "Yocto Login Prompt Received"

-		send "root\n"

-	}

-}

-

-expect {

-	"#" {

-		message "Successfully Reached Yocto Shell"

 	}

 }

diff --git a/fvp_utils.sh b/fvp_utils.sh
index 14c1e38..7e5ee3b 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -115,6 +115,7 @@
 [css-rdv1]="${fvp_rd_v1};FVP_RD_V1"
 [tc1]="${fvp_tc1};FVP_TC1"
 [tc2]="${fvp_tc2};FVP_TC2"
+[baser-aemv8r]="${fvp_base_aemv8r};FVP_BaseR_AEMv8R"
 )
 
 
diff --git a/group/tf-l1-boot-tests-plat/fvp-r-default:fvp-aemv8r.linux b/group/tf-l1-boot-tests-plat/fvp-r-default:fvp-aemv8r.linux
new file mode 100644
index 0000000..b452bbf
--- /dev/null
+++ b/group/tf-l1-boot-tests-plat/fvp-r-default:fvp-aemv8r.linux
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2023 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/model/baser-aemv8r.sh b/model/baser-aemv8r.sh
index e74688c..5eee3a7 100644
--- a/model/baser-aemv8r.sh
+++ b/model/baser-aemv8r.sh
@@ -10,7 +10,11 @@
 	set_model_path "$warehouse/SysGen/Models/$model_version/$model_build/external/models/$model_flavour/FVP_BaseR_AEMv8R"
 else
 	# OpenCI support will be added in a future patch
-	set_model_path ""
+	source "$ci_root/fvp_utils.sh"
+	# fvp_models variable contains the information for FVP paths, where 2nd field
+	# points to the /opt/model/*/models/${model_flavour}
+	models_dir="$(echo ${fvp_models[$model]} | awk -F ';' '{print $2}')"
+	set_model_path "$models_dir"
 fi
 
 # Write model command line options
diff --git a/run_config/fvp-aemv8r.linux b/run_config/fvp-aemv8r.linux
index 29c9a9c..74598c0 100755
--- a/run_config/fvp-aemv8r.linux
+++ b/run_config/fvp-aemv8r.linux
@@ -7,10 +7,10 @@
 
 post_tf_build() {
 	# Download and archive FVP-R files
-	url="$tfa_downloads/fvp_r/core-image-minimal-fvp-baser-aemv8r64.wic" saveas="rootfs.bin" fetch_file
-	url="$tfa_downloads/fvp_r/fvp-baser-aemv8r64.dtb" saveas="dtb.bin" fetch_file
-	url="$tfa_downloads/fvp_r/Image" saveas="kernel.bin" fetch_file
-	url="$tfa_downloads/fvp_r/u-boot.bin" saveas="uboot.bin" fetch_file
+	url="$tfa_downloads/fvp_r_2023/core-image-minimal-fvp-baser-aemv8r64.wic" saveas="rootfs.bin" fetch_file
+	url="$tfa_downloads/fvp_r_2023/fvp-baser-aemv8r64.dtb" saveas="dtb.bin" fetch_file
+	url="$tfa_downloads/fvp_r_2023/Image" saveas="kernel.bin" fetch_file
+	url="$tfa_downloads/fvp_r_2023/u-boot.bin" saveas="uboot.bin" fetch_file
 
 	archive_file "rootfs.bin"
 	archive_file "dtb.bin"
@@ -28,10 +28,11 @@
 generate_lava_job() {
 	local model="baser-aemv8r"
 
+	uart="0" set_expect_variable "num_cpus" "1"
 	uart="0" file="fvp-r-yocto.exp" track_expect
 
 	model="$model" \
-		dtb_addr="0x03000000" \
+		dtb_addr="0x0fc00000" \
 		fip_addr="0x40000000" \
 		kernel_addr="0x00800000" \
 		gen_model_params