ci: Autodetect whether we need cross setup in lava_arm builds.
authorEric Anholt <eric@anholt.net>
Wed, 13 May 2020 19:14:39 +0000 (12:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 18 May 2020 19:39:46 +0000 (19:39 +0000)
The x86 baremetal build would have an armhf cross file, and need the
kernel env setup.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

.gitlab-ci.yml
.gitlab-ci/container/lava_arm.sh

index 863d0ec9864f45b99fda19118f07b9ce603df7e0..e5fe436bdb6fc71d1d981768def989c421d47868 100644 (file)
@@ -177,7 +177,7 @@ arm_build:
     - .fdo.container-build@debian@arm64v8
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_build "2020-05-14-baremetal"
+    FDO_DISTRIBUTION_TAG: &arm_build "2020-05-14-baremetal-2"
 
 .use-arm_build:
   variables:
index 124ed0792ff844d4391dec68b0b755a83c94aa1b..15feb76f69a914482f774e3c749796ae0ce57fc3 100644 (file)
@@ -17,10 +17,15 @@ else
     KERNEL_IMAGE_NAME="zImage"
 fi
 
-############### Build dEQP runner
-if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
-    EXTRA_MESON_ARGS="--cross-file /cross_file-armhf.txt"
+# Determine if we're in a cross build.
+if [[ -e /cross_file-$DEBIAN_ARCH.txt ]]; then
+    EXTRA_MESON_ARGS="--cross-file /cross_file-$DEBIAN_ARCH.txt"
+
+    export ARCH=${KERNEL_ARCH}
+    export CROSS_COMPILE="${GCC_ARCH}-"
 fi
+
+############### Build dEQP runner
 . .gitlab-ci/build-cts-runner.sh
 mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin
 mv /usr/local/bin/deqp-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
@@ -36,11 +41,6 @@ mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
 ############### Cross-build kernel
 KERNEL_URL="https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.5-panfrost-fixes/linux-v5.5-panfrost-fixes.tar.gz"
 
-if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
-    export ARCH=${KERNEL_ARCH}
-    export CROSS_COMPILE="${GCC_ARCH}-"
-fi
-
 mkdir -p kernel
 wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
 pushd kernel