mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-14 22:32:22 +00:00
CI: Parameterise kernel build a bit more
AArch64 needs different names and paths to x86-64, so let's allow for that. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
2de949f723
commit
20bb260f7d
|
@ -73,7 +73,7 @@ stages:
|
||||||
variables:
|
variables:
|
||||||
BUILD_OS: debian
|
BUILD_OS: debian
|
||||||
FDO_DISTRIBUTION_VERSION: buster
|
FDO_DISTRIBUTION_VERSION: buster
|
||||||
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
|
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} BUILD_ARCH=${BUILD_ARCH} KERNEL_IMAGE=${KERNEL_IMAGE} KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG} bash .gitlab-ci/debian-install.sh'
|
||||||
|
|
||||||
.ci-rules:
|
.ci-rules:
|
||||||
rules:
|
rules:
|
||||||
|
@ -101,6 +101,8 @@ check-commit:
|
||||||
- .os-debian
|
- .os-debian
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: "x86-64"
|
BUILD_ARCH: "x86-64"
|
||||||
|
KERNEL_IMAGE: "bzImage"
|
||||||
|
KERNEL_DEFCONFIG: "x86_64_defconfig"
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -139,11 +141,11 @@ x86_64-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/bzImage --kopt quiet --script-dir ../.gitlab-ci/virtme-scripts --qemu-opts -m 4096 -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 ${FDO_CI_CONCURRENT:-4}
|
||||||
- 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 ./
|
||||||
- rm weston-virtme/bzImage
|
- rm weston-virtme/${KERNEL_IMAGE}
|
||||||
- exit $TEST_RES
|
- exit $TEST_RES
|
||||||
artifacts:
|
artifacts:
|
||||||
name: weston-$CI_COMMIT_SHA
|
name: weston-$CI_COMMIT_SHA
|
||||||
|
|
|
@ -31,14 +31,25 @@ pip3 install sphinx_rtd_theme==0.4.3 --user
|
||||||
# version here so we see predictable results.
|
# version here so we see predictable results.
|
||||||
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
|
||||||
make x86_64_defconfig
|
if [[ "${BUILD_ARCH}" = "x86-64" ]]; then
|
||||||
make kvmconfig
|
LINUX_ARCH=x86
|
||||||
|
fi
|
||||||
|
if [[ -z "${KERNEL_DEFCONFIG}" ]]; then
|
||||||
|
echo "Invalid or missing \$KERNEL_DEFCONFIG"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [[ -z "${KERNEL_IMAGE}" ]]; then
|
||||||
|
echo "Invalid or missing \$KERNEL_IMAGE"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
make ARCH=${LINUX_ARCH} ${KERNEL_DEFCONFIG}
|
||||||
|
make ARCH=${LINUX_ARCH} kvmconfig
|
||||||
./scripts/config --enable CONFIG_DRM_VKMS
|
./scripts/config --enable CONFIG_DRM_VKMS
|
||||||
make oldconfig
|
make ARCH=${LINUX_ARCH} oldconfig
|
||||||
make
|
make ARCH=${LINUX_ARCH}
|
||||||
cd ..
|
cd ..
|
||||||
mkdir /weston-virtme
|
mkdir /weston-virtme
|
||||||
mv linux/arch/x86/boot/bzImage /weston-virtme/bzImage
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue