Mesa (master): ci/freedreno: Switch the fastboot boards to using nfsroot.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 3 21:25:36 UTC 2021
Module: Mesa
Branch: master
Commit: bcdfee3bcdfd9cfc081ebd8d5fa7870e88e1fdaa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcdfee3bcdfd9cfc081ebd8d5fa7870e88e1fdaa
Author: Eric Anholt <eric at anholt.net>
Date: Fri Feb 26 10:24:31 2021 -0800
ci/freedreno: Switch the fastboot boards to using nfsroot.
This saves time in packing the rootfs, allows for larger rootfses, and
avoids the need for webdav.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314>
---
.gitlab-ci/bare-metal/fastboot.sh | 96 +++++++++++++++++++++++++--------------
src/freedreno/ci/gitlab-ci.yml | 3 +-
2 files changed, 63 insertions(+), 36 deletions(-)
diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh
index eede57fff94..eea2fd55bd5 100755
--- a/.gitlab-ci/bare-metal/fastboot.sh
+++ b/.gitlab-ci/bare-metal/fastboot.sh
@@ -45,41 +45,68 @@ if [ -z "$BM_ROOTFS" ]; then
exit 1
fi
-if [ -z "$BM_WEBDAV_IP" -o -z "$BM_WEBDAV_PORT" ]; then
- echo "BM_WEBDAV_IP and/or BM_WEBDAV_PORT is not set - no results will be uploaded from DUT!"
- WEBDAV_CMDLINE=""
-else
- WEBDAV_CMDLINE="webdav=http://$BM_WEBDAV_IP:$BM_WEBDAV_PORT"
+if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
+ BM_FASTBOOT_NFSROOT=1
+fi
+
+if [ -z "$BM_FASTBOOT_NFSROOT" ]; then
+ if [ -z "$BM_WEBDAV_IP" -o -z "$BM_WEBDAV_PORT" ]; then
+ echo "BM_WEBDAV_IP and/or BM_WEBDAV_PORT is not set - no results will be uploaded from DUT!"
+ WEBDAV_CMDLINE=""
+ else
+ WEBDAV_CMDLINE="webdav=http://$BM_WEBDAV_IP:$BM_WEBDAV_PORT"
+ fi
fi
set -ex
# Clear out any previous run's artifacts.
rm -rf results/
-mkdir -p results
-
-# Create the rootfs in a temp dir
-rsync -a --delete $BM_ROOTFS/ rootfs/
-. $BM/rootfs-setup.sh rootfs
-
-# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
-# these devices use it and it would take up space in the initrd.
-
-if [ -n "$PIGLIT_PROFILES" ]; then
- EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
+mkdir -p results/
+
+if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
+ # Create the rootfs in the NFS directory. rm to make sure it's in a pristine
+ # state, since it's volume-mounted on the host.
+ rsync -a --delete $BM_ROOTFS/ /nfs/
+ mkdir -p /nfs/results
+ . $BM/rootfs-setup.sh /nfs
+
+ # Root on NFS, no need for an inintramfs.
+ rm -f rootfs.cpio.gz
+ touch rootfs.cpio
+ gzip rootfs.cpio
else
- EXCLUDE_FILTER="piglit|python"
+ # Create the rootfs in a temp dir
+ rsync -a --delete $BM_ROOTFS/ rootfs/
+ . $BM/rootfs-setup.sh rootfs
+
+ # Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
+ # these devices use it and it would take up space in the initrd.
+
+ if [ -n "$PIGLIT_PROFILES" ]; then
+ EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
+ else
+ EXCLUDE_FILTER="piglit|python"
+ fi
+
+ pushd rootfs
+ find -H | \
+ egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
+ egrep -v "traces-db|apitrace|renderdoc" | \
+ egrep -v $EXCLUDE_FILTER | \
+ cpio -H newc -o | \
+ xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
+ popd
+
+ # Start nginx to get results from DUT
+ if [ -n "$WEBDAV_CMDLINE" ]; then
+ ln -s `pwd`/results /results
+ sed -i s/80/$BM_WEBDAV_PORT/g /etc/nginx/sites-enabled/default
+ sed -i s/www-data/root/g /etc/nginx/nginx.conf
+ nginx
+ fi
fi
-pushd rootfs
-find -H | \
- egrep -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
- egrep -v "traces-db|apitrace|renderdoc" | \
- egrep -v $EXCLUDE_FILTER | \
- cpio -H newc -o | \
- xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
-popd
-
# Make the combined kernel image and dtb for passing to fastboot. For normal
# Mesa development, we build the kernel and store it in the docker container
# that this script is running in.
@@ -108,14 +135,6 @@ abootimg \
-c cmdline="$BM_CMDLINE $WEBDAV_CMDLINE"
rm Image.gz-dtb
-# Start nginx to get results from DUT
-if [ -n "$WEBDAV_CMDLINE" ]; then
- ln -s `pwd`/results /results
- sed -i s/80/$BM_WEBDAV_PORT/g /etc/nginx/sites-enabled/default
- sed -i s/www-data/root/g /etc/nginx/nginx.conf
- nginx
-fi
-
export PATH=$BM:$PATH
# Start background command for talking to serial if we have one.
@@ -127,8 +146,17 @@ if [ -n "$BM_SERIAL_SCRIPT" ]; then
done
fi
+set +e
$BM/fastboot_run.py \
--dev="$BM_SERIAL" \
--fbserial="$BM_FASTBOOT_SERIAL" \
--powerup="$BM_POWERUP" \
--powerdown="$BM_POWERDOWN"
+ret=$?
+set -e
+
+# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
+# will look for them.
+cp -Rp /nfs/results/. results/
+
+exit $ret
diff --git a/src/freedreno/ci/gitlab-ci.yml b/src/freedreno/ci/gitlab-ci.yml
index 56a531f945b..411994885a8 100644
--- a/src/freedreno/ci/gitlab-ci.yml
+++ b/src/freedreno/ci/gitlab-ci.yml
@@ -8,6 +8,7 @@
BM_ROOTFS: /lava-files/rootfs-arm64
FLAKES_CHANNEL: "#freedreno-ci"
PIGLIT_PLATFORM: mixed_glx_egl
+ BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init $BM_KERNELARGS"
script:
- ./install/bare-metal/fastboot.sh
needs:
@@ -30,7 +31,6 @@
variables:
BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8016-sbc.dtb
- BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
GPU_VERSION: freedreno-a307
DEQP_EXPECTED_RENDERER: FD307
@@ -68,7 +68,6 @@ a306_gles3_options:
variables:
BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8096-db820c.dtb
- BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
GPU_VERSION: freedreno-a530
DEQP_EXPECTED_RENDERER: FD530
tags:
More information about the mesa-commit
mailing list