mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
ci: Build Crosvm in our container
And also add the required bits to the x86_64 kernel. syslogd is needed by Crosvm. iptables is needed to route packets in and out the VM. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10862>
This commit is contained in:
parent
f4531bd11e
commit
dc9cd18f52
4 changed files with 94 additions and 4 deletions
50
.gitlab-ci/container/build-crosvm.sh
Normal file
50
.gitlab-ci/container/build-crosvm.sh
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# Pull down repositories that crosvm depends on to cros checkout-like locations.
|
||||||
|
CROS_ROOT=/
|
||||||
|
THIRD_PARTY_ROOT=$CROS_ROOT/third_party
|
||||||
|
mkdir -p $THIRD_PARTY_ROOT
|
||||||
|
AOSP_EXTERNAL_ROOT=$CROS_ROOT/aosp/external
|
||||||
|
mkdir -p $AOSP_EXTERNAL_ROOT
|
||||||
|
PLATFORM2_ROOT=/platform2
|
||||||
|
|
||||||
|
PLATFORM2_COMMIT=2079dd5fcd61f1ac39e2fc16595956617f3f1e9e
|
||||||
|
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/platform2 $PLATFORM2_ROOT
|
||||||
|
pushd $PLATFORM2_ROOT
|
||||||
|
git checkout $PLATFORM2_COMMIT
|
||||||
|
popd
|
||||||
|
|
||||||
|
# minijail does not exist in upstream linux distros.
|
||||||
|
MINIJAIL_COMMIT=5f9e3001c61626d2863dad91248ba8496c3ef511
|
||||||
|
git clone --single-branch --no-checkout https://android.googlesource.com/platform/external/minijail $AOSP_EXTERNAL_ROOT/minijail
|
||||||
|
pushd $AOSP_EXTERNAL_ROOT/minijail
|
||||||
|
git checkout $MINIJAIL_COMMIT
|
||||||
|
make
|
||||||
|
cp libminijail.so /usr/lib/x86_64-linux-gnu/
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Pull the cras library for audio access.
|
||||||
|
ADHD_COMMIT=5068bdd18b51de8f2d5bcff754cdecda80de8f44
|
||||||
|
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/third_party/adhd $THIRD_PARTY_ROOT/adhd
|
||||||
|
pushd $THIRD_PARTY_ROOT/adhd
|
||||||
|
git checkout $ADHD_COMMIT
|
||||||
|
popd
|
||||||
|
|
||||||
|
CROSVM_VERSION=f70350ba51e9631e3b7fe711c0296e041a61a499
|
||||||
|
git clone --single-branch --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
|
||||||
|
pushd /platform/crosvm
|
||||||
|
git checkout "$CROSVM_VERSION"
|
||||||
|
|
||||||
|
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
||||||
|
-j ${FDO_CI_CONCURRENT:-4} \
|
||||||
|
--locked \
|
||||||
|
--features 'default-no-sandbox gpu x virtio-gpu-next' \
|
||||||
|
--path . \
|
||||||
|
--root /usr/local \
|
||||||
|
$EXTRA_CARGO_ARGS
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
rm -rf $PLATFORM2_ROOT $AOSP_EXTERNAL_ROOT/minijail $THIRD_PARTY_ROOT/adhd /platform/crosvm
|
||||||
|
|
@ -4,13 +4,13 @@ set -ex
|
||||||
|
|
||||||
mkdir -p /epoxy
|
mkdir -p /epoxy
|
||||||
pushd /epoxy
|
pushd /epoxy
|
||||||
wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz | tar -xJ --strip-components=1
|
wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.8/libepoxy-1.5.8.tar.xz | tar -xJ --strip-components=1
|
||||||
meson build/ $EXTRA_MESON_ARGS
|
meson build/ $EXTRA_MESON_ARGS
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
popd
|
popd
|
||||||
rm -rf /epoxy
|
rm -rf /epoxy
|
||||||
|
|
||||||
VIRGLRENDERER_VERSION=43148d1115a12219a0560a538c9872d07c28c558
|
VIRGLRENDERER_VERSION=7db2faa354a895b75cee9e9c872c87500e1be7cb
|
||||||
git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git --single-branch --no-checkout /virglrenderer
|
git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git --single-branch --no-checkout /virglrenderer
|
||||||
pushd /virglrenderer
|
pushd /virglrenderer
|
||||||
git checkout "$VIRGLRENDERER_VERSION"
|
git checkout "$VIRGLRENDERER_VERSION"
|
||||||
|
|
|
||||||
|
|
@ -70,3 +70,26 @@ CONFIG_CHROME_PLATFORMS=y
|
||||||
|
|
||||||
#options for Intel devices
|
#options for Intel devices
|
||||||
CONFIG_MFD_INTEL_LPSS_PCI=y
|
CONFIG_MFD_INTEL_LPSS_PCI=y
|
||||||
|
|
||||||
|
#options for KVM guests
|
||||||
|
CONFIG_FUSE_FS=y
|
||||||
|
CONFIG_HYPERVISOR_GUEST=y
|
||||||
|
CONFIG_KVM=y
|
||||||
|
CONFIG_KVM_GUEST=y
|
||||||
|
CONFIG_VIRT_DRIVERS=y
|
||||||
|
CONFIG_VIRTIO_FS=y
|
||||||
|
CONFIG_DRM_VIRTIO_GPU=y
|
||||||
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
|
CONFIG_VIRTIO_NET=y
|
||||||
|
CONFIG_VIRTIO_CONSOLE=y
|
||||||
|
CONFIG_PARAVIRT=y
|
||||||
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
CONFIG_VIRTUALIZATION=y
|
||||||
|
CONFIG_VIRTIO=y
|
||||||
|
CONFIG_VIRTIO_PCI=y
|
||||||
|
CONFIG_VIRTIO_MMIO=y
|
||||||
|
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||||
|
CONFIG_CRYPTO_DEV_VIRTIO=y
|
||||||
|
CONFIG_HW_RANDOM_VIRTIO=y
|
||||||
|
CONFIG_BLK_MQ_VIRTIO=y
|
||||||
|
CONFIG_TUN=y
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,16 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
STABLE_EPHEMERAL=" \
|
STABLE_EPHEMERAL=" \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
|
cargo \
|
||||||
ccache \
|
ccache \
|
||||||
clang-11 \
|
clang-11 \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
glslang-tools \
|
glslang-tools \
|
||||||
|
libasound2-dev \
|
||||||
|
libcap-dev \
|
||||||
libclang-cpp11-dev \
|
libclang-cpp11-dev \
|
||||||
|
libfdt-dev \
|
||||||
libgbm-dev \
|
libgbm-dev \
|
||||||
libgles2-mesa-dev \
|
libgles2-mesa-dev \
|
||||||
libllvmspirvlib-dev \
|
libllvmspirvlib-dev \
|
||||||
|
|
@ -25,6 +29,7 @@ STABLE_EPHEMERAL=" \
|
||||||
libwaffle-dev \
|
libwaffle-dev \
|
||||||
libwayland-dev \
|
libwayland-dev \
|
||||||
libx11-xcb-dev \
|
libx11-xcb-dev \
|
||||||
|
libxext-dev \
|
||||||
libxkbcommon-dev \
|
libxkbcommon-dev \
|
||||||
libxrender-dev \
|
libxrender-dev \
|
||||||
llvm-11-dev \
|
llvm-11-dev \
|
||||||
|
|
@ -35,6 +40,7 @@ STABLE_EPHEMERAL=" \
|
||||||
patch \
|
patch \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3-distutils \
|
python3-distutils \
|
||||||
|
wayland-protocols \
|
||||||
wget \
|
wget \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
"
|
"
|
||||||
|
|
@ -42,21 +48,25 @@ STABLE_EPHEMERAL=" \
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
$STABLE_EPHEMERAL \
|
$STABLE_EPHEMERAL \
|
||||||
clinfo \
|
clinfo \
|
||||||
|
inetutils-syslogd \
|
||||||
|
iptables \
|
||||||
libclang-common-11-dev \
|
libclang-common-11-dev \
|
||||||
libclang-cpp11 \
|
libclang-cpp11 \
|
||||||
|
libcap2 \
|
||||||
libegl1 \
|
libegl1 \
|
||||||
|
libfdt1 \
|
||||||
libllvmspirvlib11 \
|
libllvmspirvlib11 \
|
||||||
libxcb-shm0 \
|
libxcb-shm0 \
|
||||||
ocl-icd-libopencl1 \
|
ocl-icd-libopencl1 \
|
||||||
python3-lxml \
|
python3-lxml \
|
||||||
python3-renderdoc \
|
python3-renderdoc \
|
||||||
python3-simplejson \
|
python3-simplejson \
|
||||||
spirv-tools
|
spirv-tools \
|
||||||
|
sysvinit-core
|
||||||
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
|
||||||
############### Build libdrm
|
############### Build libdrm
|
||||||
|
|
||||||
. .gitlab-ci/container/build-libdrm.sh
|
. .gitlab-ci/container/build-libdrm.sh
|
||||||
|
|
@ -73,6 +83,13 @@ apt-get install -y --no-remove \
|
||||||
|
|
||||||
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
|
||||||
|
|
||||||
|
############### Build Rust deps (Crosvm and deqp-runner)
|
||||||
|
|
||||||
|
. .gitlab-ci/container/build-crosvm.sh
|
||||||
|
. .gitlab-ci/container/build-deqp-runner.sh
|
||||||
|
|
||||||
|
rm -rf /root/.cargo
|
||||||
|
|
||||||
############### Build dEQP GL
|
############### Build dEQP GL
|
||||||
|
|
||||||
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue