Skip to content

Commit 13191cc

Browse files
committed
rootfs-config.yaml: Add bookworm-deqp-runner
Add bookworm rootfs image with rust and deqp-runner, for drm igt tests. Signed-off-by: Vignesh Raman <[email protected]>
1 parent ee24c50 commit 13191cc

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed

config/core/rootfs-configs.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,19 @@ rootfs_configs:
117117
script: "scripts/bookworm-cros-ec-tests.sh"
118118
test_overlay: ""
119119

120+
bookworm-deqp-runner:
121+
rootfs_type: debos
122+
debian_release: bookworm
123+
arch_list:
124+
- amd64
125+
extra_packages:
126+
- build-essential
127+
- git
128+
script: "scripts/debian-deqp-runner.sh"
129+
imagesize: 4GB
130+
debos_memory: 8G
131+
debos_scratchsize: 16G
132+
120133
bookworm-gst-fluster:
121134
rootfs_type: debos
122135
debian_release: bookworm
@@ -363,6 +376,15 @@ rootfs_configs:
363376
- rtla
364377
script: "scripts/bookworm-rt.sh"
365378

379+
bookworm-rust:
380+
rootfs_type: debos
381+
debian_release: bookworm
382+
arch_list:
383+
- amd64
384+
extra_packages:
385+
- curl
386+
script: "scripts/build-rust.sh"
387+
366388
bookworm-tast:
367389
rootfs_type: debos
368390
debian_release: bookworm
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
#
4+
# Copyright (C) 2025 Collabora, Vignesh Raman <[email protected]>
5+
#
6+
# Based on the build-rust.sh script from the mesa project:
7+
# https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/.gitlab-ci/container/build-rust.sh
8+
9+
# Note that this script is not actually "building" rust, but build- is the
10+
# convention for the shared helpers for putting stuff in our containers.
11+
12+
set -ex
13+
14+
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
15+
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
16+
# are just available to all build jobs.
17+
mkdir -p "$HOME"/.cargo
18+
ln -s /usr/local/bin "$HOME"/.cargo/bin
19+
20+
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
21+
RUST_VERSION=1.78.0-2024-05-02
22+
23+
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
24+
# version of the compiler, rather than whatever the container's Debian comes
25+
# with.
26+
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
27+
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
28+
--default-toolchain $RUST_VERSION \
29+
--profile minimal \
30+
-y
31+
32+
rustup component add clippy rustfmt
33+
34+
# Set up a config script for cross compiling -- cargo needs your system cc for
35+
# linking in cross builds, but doesn't know what you want to use for system cc.
36+
cat > /root/.cargo/config <<EOF
37+
[target.armv7-unknown-linux-gnueabihf]
38+
linker = "arm-linux-gnueabihf-gcc"
39+
40+
[target.aarch64-unknown-linux-gnu]
41+
linker = "aarch64-linux-gnu-gcc"
42+
EOF
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
#
4+
# Copyright (C) 2025 Collabora, Vignesh Raman <[email protected]>
5+
#
6+
# Based on the build-deqp-runner.sh script from the mesa project:
7+
# https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/.gitlab-ci/container/build-deqp-runner.sh
8+
#
9+
# shellcheck disable=SC2086 # we want word splitting
10+
11+
set -uex
12+
13+
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://github.com/vigneshraman/deqp-runner.git}"
14+
DEQP_RUNNER_GIT_TAG="${DEQP_RUNNER_GIT_TAG:-v0.20.0}"
15+
16+
git clone $DEQP_RUNNER_GIT_URL --single-branch --no-checkout
17+
pushd deqp-runner
18+
git checkout $DEQP_RUNNER_GIT_TAG
19+
20+
RUST_TARGET="${RUST_TARGET:-}"
21+
22+
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
23+
# this variable when cross-compiling arm32 and build fails for zsys-sys.
24+
# So unset the CC variable when cross-compiling for arm32.
25+
SAVEDCC=${CC:-}
26+
if [ "$RUST_TARGET" = "armv7-unknown-linux-gnueabihf" ]; then
27+
unset CC
28+
fi
29+
cargo install --locked \
30+
-j ${FDO_CI_CONCURRENT:-4} \
31+
--root /usr/local \
32+
${EXTRA_CARGO_ARGS:-} \
33+
--path .
34+
CC=$SAVEDCC
35+
36+
popd
37+
rm -rf deqp-runner
38+
39+
# remove unused test runners
40+
if [ -z "${DEQP_RUNNER_GIT_TAG:-}" ]; then
41+
rm -f /usr/local/bin/igt-runner
42+
fi

0 commit comments

Comments
 (0)