CI: Add full AArch64 KVM support
Build a kernel for AArch64 and run it under virtme just like we do for x86-64. This requires adding support for the AArch64 defconfig variant, and accommodating for the fact that it builds DRM as a module by default rather than built in. The virtme branch we are using has also been rebased on top of newer virtme upstream which unbreaks AArch64. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
daaa518b0e
commit
3530c522f8
@ -43,7 +43,7 @@
|
|||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: wayland/weston
|
FDO_UPSTREAM_REPO: wayland/weston
|
||||||
FDO_REPO_SUFFIX: "$BUILD_OS/$BUILD_ARCH"
|
FDO_REPO_SUFFIX: "$BUILD_OS/$BUILD_ARCH"
|
||||||
FDO_DISTRIBUTION_TAG: '2021-08-02.2-meson'
|
FDO_DISTRIBUTION_TAG: '2021-08-02.3-aarch64-virt'
|
||||||
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
@ -109,6 +109,9 @@ check-commit:
|
|||||||
- .os-debian
|
- .os-debian
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: "aarch64"
|
BUILD_ARCH: "aarch64"
|
||||||
|
KERNEL_IMAGE: "Image"
|
||||||
|
KERNEL_DEFCONFIG: "defconfig"
|
||||||
|
QEMU_SMP: 8 # built-in QEmu limit
|
||||||
|
|
||||||
# Build our base container image, which contains the core distribution, the
|
# Build our base container image, which contains the core distribution, the
|
||||||
# toolchain, and all our build dependencies. This will be reused in the build
|
# toolchain, and all our build dependencies. This will be reused in the build
|
||||||
@ -156,7 +159,8 @@ aarch64-debian-container_prep:
|
|||||||
- meson --prefix="$PREFIX" -Db_sanitize=address ${MESON_OPTIONS} ..
|
- meson --prefix="$PREFIX" -Db_sanitize=address ${MESON_OPTIONS} ..
|
||||||
- ninja -k0 -j${FDO_CI_CONCURRENT:-4}
|
- ninja -k0 -j${FDO_CI_CONCURRENT:-4}
|
||||||
- ninja install
|
- ninja install
|
||||||
- virtme-run --rw --pwd --kimg /weston-virtme/${KERNEL_IMAGE} --kopt quiet --script-dir ../.gitlab-ci/virtme-scripts --qemu-opts -m 4096 -smp ${FDO_CI_CONCURRENT:-4}
|
- test -n "${QEMU_SMP}" || QEMU_SMP=${FDO_CI_CONCURRENT:-4}
|
||||||
|
- virtme-run --rw --pwd --kimg /weston-virtme/${KERNEL_IMAGE} --kopt quiet --script-dir ../.gitlab-ci/virtme-scripts --qemu-opts -m 4096 -smp ${QEMU_SMP}
|
||||||
- TEST_RES=$(cat $TESTS_RES_PATH)
|
- TEST_RES=$(cat $TESTS_RES_PATH)
|
||||||
- rm $TESTS_RES_PATH
|
- rm $TESTS_RES_PATH
|
||||||
- cp -R /weston-virtme ./
|
- cp -R /weston-virtme ./
|
||||||
@ -222,9 +226,18 @@ aarch64-debian-container_prep:
|
|||||||
- job: x86_64-debian-container_prep
|
- job: x86_64-debian-container_prep
|
||||||
artifacts: false
|
artifacts: false
|
||||||
|
|
||||||
|
.test-env-debian-aarch64:
|
||||||
|
tags:
|
||||||
|
- kvm-aarch64
|
||||||
|
extends:
|
||||||
|
- .build-env-debian-aarch64
|
||||||
|
- .build-and-test
|
||||||
|
needs:
|
||||||
|
- job: aarch64-debian-container_prep
|
||||||
|
artifacts: false
|
||||||
|
|
||||||
# Full build, used for testing under KVM.
|
# Full build, used for testing under KVM.
|
||||||
x86_64-debian-full-build:
|
.build-options-full:
|
||||||
extends: .test-env-debian-x86_64
|
|
||||||
variables:
|
variables:
|
||||||
MESON_OPTIONS: >
|
MESON_OPTIONS: >
|
||||||
-Doptimization=0
|
-Doptimization=0
|
||||||
@ -240,6 +253,16 @@ x86_64-debian-full-build:
|
|||||||
reports:
|
reports:
|
||||||
cobertura: $BUILDDIR/meson-logs/coverage.xml
|
cobertura: $BUILDDIR/meson-logs/coverage.xml
|
||||||
|
|
||||||
|
x86_64-debian-full-build:
|
||||||
|
extends:
|
||||||
|
- .test-env-debian-x86_64
|
||||||
|
- .build-options-full
|
||||||
|
|
||||||
|
aarch64-debian-full-build:
|
||||||
|
extends:
|
||||||
|
- .test-env-debian-aarch64
|
||||||
|
- .build-options-full
|
||||||
|
|
||||||
# Docs should be invariant on all architectures, so we only do it on Debian
|
# Docs should be invariant on all architectures, so we only do it on Debian
|
||||||
# x86-64.
|
# x86-64.
|
||||||
docs-build:
|
docs-build:
|
||||||
@ -269,8 +292,7 @@ x86_64-debian-no-gl-build:
|
|||||||
|
|
||||||
aarch64-debian-no-gl-build:
|
aarch64-debian-no-gl-build:
|
||||||
extends:
|
extends:
|
||||||
- .build-env-debian-aarch64
|
- .test-env-debian-aarch64
|
||||||
- .build-no-test
|
|
||||||
- .build-options-no-gl
|
- .build-options-no-gl
|
||||||
|
|
||||||
# Expose docs and coverage reports, so we can show users any changes to these
|
# Expose docs and coverage reports, so we can show users any changes to these
|
||||||
|
@ -44,12 +44,17 @@ pip3 install sphinx_rtd_theme==0.4.3 --user
|
|||||||
# results: --script-sh and --script-exec. Unfornutately they are not completely
|
# results: --script-sh and --script-exec. Unfornutately they are not completely
|
||||||
# implemented yet, so we had some trouble to use them and it was becoming
|
# implemented yet, so we had some trouble to use them and it was becoming
|
||||||
# hackery.
|
# hackery.
|
||||||
if [[ -n "${KERNEL_DEFCONFIG}" ]]; then
|
#
|
||||||
|
# The fork pulls in this support from the original GitHub PR, rebased on top of
|
||||||
|
# a newer upstream version which fixes AArch64 support.
|
||||||
|
if [[ -n "$KERNEL_DEFCONFIG" ]]; then
|
||||||
git clone --depth=1 --branch=drm-next-2020-06-11-1 https://anongit.freedesktop.org/git/drm/drm.git linux
|
git clone --depth=1 --branch=drm-next-2020-06-11-1 https://anongit.freedesktop.org/git/drm/drm.git linux
|
||||||
cd linux
|
cd linux
|
||||||
|
|
||||||
if [[ "${BUILD_ARCH}" = "x86-64" ]]; then
|
if [[ "${BUILD_ARCH}" = "x86-64" ]]; then
|
||||||
LINUX_ARCH=x86
|
LINUX_ARCH=x86
|
||||||
|
elif [[ "$BUILD_ARCH" = "aarch64" ]]; then
|
||||||
|
LINUX_ARCH=arm64
|
||||||
else
|
else
|
||||||
echo "Invalid or missing \$BUILD_ARCH"
|
echo "Invalid or missing \$BUILD_ARCH"
|
||||||
exit 1
|
exit 1
|
||||||
@ -66,18 +71,23 @@ if [[ -n "${KERNEL_DEFCONFIG}" ]]; then
|
|||||||
|
|
||||||
make ARCH=${LINUX_ARCH} ${KERNEL_DEFCONFIG}
|
make ARCH=${LINUX_ARCH} ${KERNEL_DEFCONFIG}
|
||||||
make ARCH=${LINUX_ARCH} kvmconfig
|
make ARCH=${LINUX_ARCH} kvmconfig
|
||||||
./scripts/config --enable CONFIG_DRM_VKMS
|
./scripts/config \
|
||||||
|
--enable CONFIG_DRM \
|
||||||
|
--enable CONFIG_DRM_KMS_HELPER \
|
||||||
|
--enable CONFIG_DRM_KMS_FB_HELPER \
|
||||||
|
--enable CONFIG_DRM_VKMS
|
||||||
make ARCH=${LINUX_ARCH} oldconfig
|
make ARCH=${LINUX_ARCH} oldconfig
|
||||||
make ARCH=${LINUX_ARCH}
|
make ARCH=${LINUX_ARCH}
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
mkdir /weston-virtme
|
mkdir /weston-virtme
|
||||||
mv linux/arch/${LINUX_ARCH}/boot/${KERNEL_IMAGE} /weston-virtme/
|
mv linux/arch/${LINUX_ARCH}/boot/${KERNEL_IMAGE} /weston-virtme/
|
||||||
mv linux/.config /weston-virtme/.config
|
mv linux/.config /weston-virtme/.config
|
||||||
rm -rf linux
|
rm -rf linux
|
||||||
|
|
||||||
git clone https://github.com/ezequielgarcia/virtme
|
git clone https://github.com/fooishbar/virtme
|
||||||
cd virtme
|
cd virtme
|
||||||
git checkout -b snapshot 69e3cb83b3405edc99fcf9611f50012a4f210f78
|
git checkout -b snapshot 70e390c564cd09e0da287a7f2c04a6592e59e379
|
||||||
./setup.py install
|
./setup.py install
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user