ci: Build ARM baremetal rootfs in native container

Doing so in an x86 container via qemu was slow, and started failing
recently after updating to a newer qemu version.

This also results in smaller arm*_test* docker images, since we need to
install fewer Debian packages in them.

As a bonus, this turns some piglit tests from fail to pass (Or maybe
they'll turn out to be flakes? They've passed at least 3 times in a
row).

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955>
This commit is contained in:
Michel Dänzer 2021-03-29 15:09:06 +02:00 committed by Marge Bot
parent b2ba889856
commit 4b20bd7425
11 changed files with 119 additions and 130 deletions

View File

@ -427,7 +427,7 @@ arm_build:
- .fdo.container-build@debian@arm64v8
- .container
variables:
MESA_IMAGE_TAG: &arm_build "2021-02-15-asan"
MESA_IMAGE_TAG: &arm_build "2021-04-01-u-boot-tools"
.use-arm_build:
extends:
@ -444,7 +444,7 @@ arm_test-base:
- .fdo.container-build@debian
- .container
variables:
MESA_IMAGE_TAG: &arm_test-base "2021-02-08-container-reorg"
MESA_IMAGE_TAG: &arm_test-base "2021-03-31-rootfs"
.use-arm_test-base:
extends:
@ -456,37 +456,69 @@ arm_test-base:
needs:
- arm_test-base
# Kernel & rootfs for ARM64 baremetal testing
kernel+rootfs_arm64-baremetal:
extends:
- .use-arm_build
- .kernel+rootfs
tags:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
DISTRIBUTION_TAG: "${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
KERNEL_URL: "https://github.com/anholt/linux/archive/mesa-ci-2021-02-17-5.11.tar.gz"
MESA_ROOTFS_TAG: &arm64-baremetal "2021-03-31-libxrender"
MINIO_SUFFIX: "baremetal"
# Kernel & rootfs for armhf baremetal testing
kernel+rootfs_armhf-baremetal:
extends:
- kernel+rootfs_arm64-baremetal
variables:
DEBIAN_ARCH: "armhf"
MESA_ROOTFS_TAG: &armhf-baremetal "2021-03-31-libxrender"
# x86 image with ARM64 rootfs for baremetal testing.
arm64_test:
extends:
- .use-arm_test-base
stage: build-misc
needs:
- kernel+rootfs_arm64-baremetal
variables:
MESA_IMAGE_TAG: &arm64_test "2021-03-31-piglit"
DEBIAN_ARCH: "arm64"
FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=baremetal/${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}/${DEBIAN_ARCH} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARM_BUILD_TAG: *arm_build
MESA_IMAGE_TAG: &arm64_test "2021-03-31-rootfs"
MESA_ROOTFS_TAG: *arm64-baremetal
.use-arm64_test:
extends:
- .set-image-base-tag
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_BASE_TAG: *arm_test-base
MESA_IMAGE_PATH: "debian/arm64_test"
MESA_IMAGE_TAG: *arm64_test
MESA_ROOTFS_TAG: *arm64-baremetal
needs:
- arm64_test
# x86 image with armhf rootfs for baremetal testing
armhf_test:
extends:
- .use-arm_test-base
- arm64_test
variables:
MESA_IMAGE_TAG: &armhf_test "2021-03-31-piglit"
DEBIAN_ARCH: "armhf"
MESA_IMAGE_TAG: &armhf_test "2021-03-31-rootfs"
MESA_ROOTFS_TAG: *armhf-baremetal
.use-armhf_test:
extends:
- .set-image-base-tag
- .use-arm64_test
variables:
MESA_BASE_TAG: *arm_test-base
MESA_IMAGE_PATH: "debian/armhf_test"
MESA_IMAGE_TAG: *armhf_test
MESA_ROOTFS_TAG: *armhf-baremetal
needs:
- armhf_test

View File

@ -49,6 +49,7 @@ apt-get -y install \
python3-pip \
python3-requests \
python3-setuptools \
u-boot-tools \
unzip \
wget \
xz-utils \

View File

@ -3,29 +3,17 @@
set -e
set -o xtrace
############### Install packages for building
############### Install packages for baremetal testing
apt-get install -y ca-certificates
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
apt-get update
apt-get install -y --no-remove \
abootimg \
android-sdk-ext4-utils \
bc \
bison \
bzip2 \
ccache \
cmake \
cpio \
debootstrap \
fastboot \
flex \
g++ \
git \
netcat \
nginx-full \
pkg-config \
procps \
python3-distutils \
python3-minimal \
@ -33,14 +21,9 @@ apt-get install -y --no-remove \
python3.7 \
rsync \
telnet \
u-boot-tools \
unzip
apt install -t buster-backports -y --no-remove \
meson
unzip \
wget
# setup nginx
sed -i '/gzip_/ s/#\ //g' /etc/nginx/nginx.conf
cp .gitlab-ci/bare-metal/nginx-default-site /etc/nginx/sites-enabled/default
. .gitlab-ci/container/container_post_build.sh

View File

@ -3,60 +3,33 @@
set -e
set -o xtrace
ROOTFS=/lava-files/rootfs-${arch}
# Fetch the arm-built rootfs image and unpack it in our x86 container (saves
# network transfer, disk usage, and runtime on test jobs)
dpkg --add-architecture $arch
apt-get update
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}"
else
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}"
fi
# Cross-build test deps
BAREMETAL_EPHEMERAL=" \
autoconf \
automake \
crossbuild-essential-$arch \
git-lfs \
libboost-dev:$arch \
libdrm-dev:$arch \
libegl1-mesa-dev:$arch \
libelf-dev:$arch \
libexpat1-dev:$arch \
libffi-dev:$arch \
libgbm-dev:$arch \
libgl1-mesa-dev:$arch \
libgles2-mesa-dev:$arch \
libpciaccess-dev:$arch \
libpcre3-dev:$arch \
libpng-dev:$arch \
libpython3-dev:$arch \
libstdc++6:$arch \
libtinfo-dev:$arch \
libudev-dev:$arch \
libvulkan-dev:$arch \
libwaffle-dev:$arch \
libxcb-keysyms1-dev:$arch \
libxkbcommon-dev:$arch \
python3-dev \
qt5-default \
qt5-qmake \
qtbase5-dev:$arch \
"
wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz
mkdir -p /rootfs
tar -C /rootfs -zxvf rootfs.tgz
rm rootfs.tgz
apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
if [[ $arch == "arm64" ]]; then
mkdir -p /baremetal-files
pushd /baremetal-files
mkdir /var/cache/apt/archives/$arch
wget ${ARTIFACTS_URL}/Image
wget ${ARTIFACTS_URL}/Image.gz
wget ${ARTIFACTS_URL}/cheza-kernel
############### Create cross-files
DEVICE_TREES="apq8016-sbc.dtb apq8096-db820c.dtb"
. .gitlab-ci/container/create-cross-file.sh $arch
for DTB in $DEVICE_TREES; do
wget ${ARTIFACTS_URL}/$DTB
done
. .gitlab-ci/container/container_pre_build.sh
############### Create rootfs
KERNEL_URL=https://github.com/anholt/linux/archive/mesa-ci-2021-02-17-5.11.tar.gz
DEBIAN_ARCH=$arch . .gitlab-ci/container/lava_build.sh
############### Uninstall the build software
apt-get purge -y $BAREMETAL_EPHEMERAL
. .gitlab-ci/container/container_post_build.sh
popd
fi

View File

@ -51,6 +51,7 @@ apt-get -y install --no-install-recommends \
libxext6 \
libxfixes3 \
libxkbcommon0 \
libxrender1 \
libxshmfence1 \
libxxf86vm1 \
netcat-openbsd \

View File

@ -5,7 +5,7 @@ set -o xtrace
check_minio()
{
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${MINIO_SUFFIX}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
exit
fi
@ -194,7 +194,7 @@ if [ -n "$INSTALL_KERNEL_MODULES" ]; then
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
fi
if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then
if [[ ${DEBIAN_ARCH} = "arm64" ]] && [[ ${MINIO_SUFFIX} = "baremetal" ]]; then
make Image.lzma
mkimage \
-f auto \
@ -204,6 +204,7 @@ if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then
-C lzma\
-b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
/lava-files/cheza-kernel
KERNEL_IMAGE_NAME+=" cheza-kernel"
fi
popd
@ -241,14 +242,10 @@ find /libdrm/ -name lib\*\.so\* | xargs cp -t /lava-files/rootfs-${DEBIAN_ARCH}/
rm -rf /libdrm
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
pushd /lava-files/rootfs-${DEBIAN_ARCH}
tar czf /lava-files/lava-rootfs.tgz .
popd
if [ ${DEBIAN_ARCH} = arm64 ]; then
if [ ${DEBIAN_ARCH} = arm64 ] && [ ${MINIO_SUFFIX} = baremetal ]; then
# Make a gzipped copy of the Image for db410c.
gzip -k /lava-files/Image
KERNEL_IMAGE_NAME+=" Image.gz"
# Add missing a630 firmware, added to debian packge in apr 2020
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a630_gmu.bin \
@ -257,24 +254,26 @@ if [ ${DEBIAN_ARCH} = arm64 ]; then
-O /lava-files/rootfs-arm64/lib/firmware/qcom/a630_sqe.fw
fi
du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
pushd /lava-files/rootfs-${DEBIAN_ARCH}
tar czf /lava-files/lava-rootfs.tgz .
popd
. .gitlab-ci/container/container_post_build.sh
############### Upload the files!
if [ -n "$UPLOAD_FOR_LAVA" ]; then
ci-fairy minio login $CI_JOB_JWT
FILES_TO_UPLOAD="lava-rootfs.tgz \
$KERNEL_IMAGE_NAME"
ci-fairy minio login $CI_JOB_JWT
FILES_TO_UPLOAD="lava-rootfs.tgz \
$KERNEL_IMAGE_NAME"
if [[ -n $DEVICE_TREES ]]; then
FILES_TO_UPLOAD="$FILES_TO_UPLOAD $(basename -a $DEVICE_TREES)"
fi
for f in $FILES_TO_UPLOAD; do
ci-fairy minio cp /lava-files/$f \
minio://${MINIO_PATH}/$f
done
touch /lava-files/done
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done
if [[ -n $DEVICE_TREES ]]; then
FILES_TO_UPLOAD="$FILES_TO_UPLOAD $(basename -a $DEVICE_TREES)"
fi
for f in $FILES_TO_UPLOAD; do
ci-fairy minio cp /lava-files/$f \
minio://${MINIO_PATH}/$f
done
touch /lava-files/done
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done

View File

@ -1,33 +1,36 @@
variables:
MESA_LAVA_TAG: "2021-03-31-piglit"
.kernel+rootfs:
stage: container-2
extends:
- .ci-run-policy
stage: container-2
variables:
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_LAVA_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
GIT_STRATEGY: fetch
KERNEL_URL: "https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.10-rc2-for-mesa-ci/linux-v5.10-rc2-for-mesa-ci.tar.gz"
UPLOAD_FOR_LAVA: 1
INSTALL_KERNEL_MODULES: 1
PIGLIT_BUILD_TARGETS: "piglit_replayer"
script:
- .gitlab-ci/container/lava_build.sh
.kernel+rootfs-lava:
extends:
- .kernel+rootfs
variables:
KERNEL_URL: "https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.10-rc2-for-mesa-ci/linux-v5.10-rc2-for-mesa-ci.tar.gz"
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
INSTALL_KERNEL_MODULES: 1
MESA_ROOTFS_TAG: &lava-rootfs "2021-03-31-libxrender"
MINIO_SUFFIX: "lava"
PIGLIT_BUILD_TARGETS: "piglit_replayer"
kernel+rootfs_amd64:
extends:
- .use-x86_build-base
- .kernel+rootfs
- .kernel+rootfs-lava
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_LAVA_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
kernel+rootfs_arm64:
extends:
- .use-arm_build
- .kernel+rootfs
- .kernel+rootfs-lava
tags:
- aarch64
variables:
@ -51,14 +54,15 @@ kernel+rootfs_armhf:
FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_PAGES_DOMAIN=${CI_PAGES_DOMAIN} CI_PROJECT_NAME=${CI_PROJECT_NAME} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_PROJECT_ROOT_NAMESPACE=${CI_PROJECT_ROOT_NAMESPACE} CI_JOB_JWT=${CI_JOB_JWT} CI_SERVER_URL=${CI_SERVER_URL} DRIVER_NAME=${DRIVER_NAME} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} PIGLIT_NO_WINDOW=1 PIGLIT_REPLAY_UPLOAD_TO_MINIO=1 MINIO_HOST=${MINIO_HOST}"
DEQP_VERSION: gles2
ARTIFACTS_PREFIX: "https://${MINIO_HOST}/mesa-lava/"
MESA_ROOTFS_TAG: *lava-rootfs
MESA_URL: "https://${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-${ARCH}.tar.gz"
script:
# Try to use the kernel and rootfs built in mainline first, to save cycles
- >
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${ARCH}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/mesa/mesa/${DISTRIBUTION_TAG}/${ARCH}"
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/lava/${DISTRIBUTION_TAG}/${ARCH}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/lava/${DISTRIBUTION_TAG}/${ARCH}"
else
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}"
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/lava/${DISTRIBUTION_TAG}/${ARCH}"
fi
- >
artifacts/generate_lava.py \

View File

@ -6,7 +6,7 @@
variables:
BM_BOOTFS: /boot/raspberrypi_armhf
BM_KERNEL_MODULES: vc4
BM_ROOTFS: /lava-files/rootfs-armhf
BM_ROOTFS: /rootfs
GPU_VERSION: vc4-rpi3
DEQP_EXPECTED_RENDERER: VC4
script:
@ -66,7 +66,7 @@ vc4-rpi3-piglit-quick_shader:armhf:
BM_BOOTFS: /boot/raspberrypi_armhf
BM_KERNEL_MODULES: v3d,vc4
BM_POE_TIMEOUT: 300
BM_ROOTFS: /lava-files/rootfs-armhf
BM_ROOTFS: /rootfs
DEQP_EXPECTED_RENDERER: V3D
GPU_VERSION: v3d-rpi4
script:
@ -131,7 +131,7 @@ v3dv-rpi4-vk:armhf:
BM_BOOTFS: /boot/raspberrypi_armhf
BM_KERNEL_MODULES: v3d,vc4
BM_POE_TIMEOUT: 300
BM_ROOTFS: /lava-files/rootfs-armhf
BM_ROOTFS: /rootfs
CPU: arm7hlf
DEQP_EXPECTED_RENDERER: "V3D 4.2"
DEQP_FRACTION: 7

View File

@ -5,7 +5,7 @@
- .freedreno-rules
variables:
MINIO_ARTIFACT_NAME: mesa-arm64
BM_ROOTFS: /lava-files/rootfs-arm64
BM_ROOTFS: /rootfs
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"
@ -29,8 +29,8 @@
extends:
- .freedreno-test
variables:
BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8016-sbc.dtb
BM_KERNEL: /baremetal-files/Image.gz
BM_DTB: /baremetal-files/apq8016-sbc.dtb
GPU_VERSION: freedreno-a307
DEQP_EXPECTED_RENDERER: FD307
@ -65,8 +65,8 @@ a306_gles3_options:
extends:
- .freedreno-test
variables:
BM_KERNEL: /lava-files/Image.gz
BM_DTB: /lava-files/apq8096-db820c.dtb
BM_KERNEL: /baremetal-files/Image.gz
BM_DTB: /baremetal-files/apq8096-db820c.dtb
GPU_VERSION: freedreno-a530
DEQP_EXPECTED_RENDERER: FD530
tags:
@ -123,7 +123,7 @@ a530_piglit_shader:
extends:
- .freedreno-test
variables:
BM_KERNEL: /lava-files/cheza-kernel
BM_KERNEL: /baremetal-files/cheza-kernel
BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
GPU_VERSION: freedreno-a630
DEQP_EXPECTED_RENDERER: FD630

View File

@ -347,9 +347,6 @@ spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3,Crash
wgl@wgl-multi-context-single-window,Fail
wgl@wgl-multi-window-single-context,Fail
wgl@wgl-sanity,Fail
spec@glsl-1.10@execution@interpolation@interpolation-none-gl_frontcolor-flat-vertex,Fail
spec@glsl-1.10@execution@interpolation@interpolation-none-gl_frontcolor-smooth-vertex,Fail
spec@glsl-1.10@execution@interpolation@interpolation-none-gl_frontsecondarycolor-smooth-vertex,Fail
spec@glsl-1.10@execution@interpolation@interpolation-none-other-flat-vertex,Fail
spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash
spec@glsl-1.30@execution@fs-large-local-array-vec2,Crash

View File

@ -5,7 +5,6 @@ glx@glx-make-current,Crash
glx@glx-multi-window-single-context,Fail
glx@glx-query-drawable-glx_fbconfig_id-window,Fail
glx@glx-swap-pixmap-bad,Fail
glx@glx-tfp,Fail
glx@glx-visuals-depth -pixmap,Crash
glx@glx-visuals-stencil -pixmap,Crash
glx@glx_arb_create_context_es2_profile@invalid opengl es version,Fail