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>
This commit is contained in:
Eric Anholt 2021-02-26 10:24:31 -08:00 committed by Marge Bot
parent 5c89f6ed17
commit bcdfee3bcd
2 changed files with 61 additions and 34 deletions

View file

@ -45,19 +45,37 @@ if [ -z "$BM_ROOTFS" ]; then
exit 1 exit 1
fi fi
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 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!" echo "BM_WEBDAV_IP and/or BM_WEBDAV_PORT is not set - no results will be uploaded from DUT!"
WEBDAV_CMDLINE="" WEBDAV_CMDLINE=""
else else
WEBDAV_CMDLINE="webdav=http://$BM_WEBDAV_IP:$BM_WEBDAV_PORT" WEBDAV_CMDLINE="webdav=http://$BM_WEBDAV_IP:$BM_WEBDAV_PORT"
fi fi
fi
set -ex set -ex
# Clear out any previous run's artifacts. # Clear out any previous run's artifacts.
rm -rf results/ rm -rf results/
mkdir -p results 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
# Create the rootfs in a temp dir # Create the rootfs in a temp dir
rsync -a --delete $BM_ROOTFS/ rootfs/ rsync -a --delete $BM_ROOTFS/ rootfs/
. $BM/rootfs-setup.sh rootfs . $BM/rootfs-setup.sh rootfs
@ -80,6 +98,15 @@ find -H | \
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
popd 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
# Make the combined kernel image and dtb for passing to fastboot. For normal # 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 # Mesa development, we build the kernel and store it in the docker container
# that this script is running in. # that this script is running in.
@ -108,14 +135,6 @@ abootimg \
-c cmdline="$BM_CMDLINE $WEBDAV_CMDLINE" -c cmdline="$BM_CMDLINE $WEBDAV_CMDLINE"
rm Image.gz-dtb 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 export PATH=$BM:$PATH
# Start background command for talking to serial if we have one. # Start background command for talking to serial if we have one.
@ -127,8 +146,17 @@ if [ -n "$BM_SERIAL_SCRIPT" ]; then
done done
fi fi
set +e
$BM/fastboot_run.py \ $BM/fastboot_run.py \
--dev="$BM_SERIAL" \ --dev="$BM_SERIAL" \
--fbserial="$BM_FASTBOOT_SERIAL" \ --fbserial="$BM_FASTBOOT_SERIAL" \
--powerup="$BM_POWERUP" \ --powerup="$BM_POWERUP" \
--powerdown="$BM_POWERDOWN" --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

View file

@ -8,6 +8,7 @@
BM_ROOTFS: /lava-files/rootfs-arm64 BM_ROOTFS: /lava-files/rootfs-arm64
FLAKES_CHANNEL: "#freedreno-ci" FLAKES_CHANNEL: "#freedreno-ci"
PIGLIT_PLATFORM: mixed_glx_egl 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: script:
- ./install/bare-metal/fastboot.sh - ./install/bare-metal/fastboot.sh
needs: needs:
@ -30,7 +31,6 @@
variables: variables:
BM_KERNEL: /lava-files/Image.gz BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8016-sbc.dtb BM_DTB: /lava-files/apq8016-sbc.dtb
BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
GPU_VERSION: freedreno-a307 GPU_VERSION: freedreno-a307
DEQP_EXPECTED_RENDERER: FD307 DEQP_EXPECTED_RENDERER: FD307
@ -68,7 +68,6 @@ a306_gles3_options:
variables: variables:
BM_KERNEL: /lava-files/Image.gz BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8096-db820c.dtb BM_DTB: /lava-files/apq8096-db820c.dtb
BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
GPU_VERSION: freedreno-a530 GPU_VERSION: freedreno-a530
DEQP_EXPECTED_RENDERER: FD530 DEQP_EXPECTED_RENDERER: FD530
tags: tags: