Add gpu_R470_version for compatibility with K80 GPU

NVIDIA has announced that R470 drivers will be the
last driver family that supports K80 GPU. In order
to support newer driver versions and K80 at the same
time, a new driver alias R470 is added.

BUG=b/240587402
TEST=presubmit
RELEASE_NOTE=None

Change-Id: I0066455aacd1b07b22872d9ab0cd7d310b81750e
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/36387
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
diff --git a/project-lakitu/scripts/board_specific_setup.sh b/project-lakitu/scripts/board_specific_setup.sh
index 5c29ae9..0e45033 100644
--- a/project-lakitu/scripts/board_specific_setup.sh
+++ b/project-lakitu/scripts/board_specific_setup.sh
@@ -262,6 +262,18 @@
   cp "${latest_driver_file}" "${latest_driver_artifact}"
 }
 
+# Exports R470 GPU driver version file as an artifact.
+# This is needed for supporting K80 GPU which is not
+# compatible with NVIDIA R510 or newer drivers.
+export_gpu_R470_version() {
+  local -r script_root="$1"
+  local -r R470_driver_file="${script_root}/gpu_R470_version"
+  local -r R470_driver_artifact="${BUILD_DIR}/gpu_R470_version"
+
+  # Copy scripts/gpu_R470_version to BUILD artifact
+  cp "${R470_driver_file}" "${R470_driver_artifact}"
+}
+
 # Apply recommended file permissions by CIS Benchmark
 change_file_permissions_for_cis()  {
   # set permissions of systemd timer files as recommended by CIS
@@ -302,6 +314,7 @@
   cp "${BOARD_ROOT}/usr/lib/debug/boot/vmlinux" "${BUILD_DIR}/vmlinux"
   export_gpu_default_version "${script_root}"
   export_gpu_latest_version "${script_root}"
+  export_gpu_R470_version "${script_root}"
 
   # /etc/machine-id gets installed by sys-apps/dbus and is a symlink.
   # This conflicts with systemd's machine-id generation mechanism,
diff --git a/project-lakitu/scripts/gpu_R470_version b/project-lakitu/scripts/gpu_R470_version
new file mode 100644
index 0000000..75af3f4
--- /dev/null
+++ b/project-lakitu/scripts/gpu_R470_version
@@ -0,0 +1 @@
+470.141.03
\ No newline at end of file