summaryrefslogtreecommitdiff
path: root/mkosi.build
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-04-05 16:20:28 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-04-05 16:20:28 +0200
commit74f2a3ae0d2d0bfa26fccd5d5a26abf87687f088 (patch)
tree5ff955d3a88f4853e705c41953fbe0e9ca9e4938 /mkosi.build
parent89c8328fc946521fbc4f7bbbc4ca3b0f81eba93f (diff)
downloadsystemd-74f2a3ae0d2d0bfa26fccd5d5a26abf87687f088.tar.gz
mkosi: Make sure we always boot our built from source kernel
If we build a kernel from source, let's make sure it's always booted by giving it a very high version number.
Diffstat (limited to 'mkosi.build')
-rwxr-xr-xmkosi.build11
1 files changed, 6 insertions, 5 deletions
diff --git a/mkosi.build b/mkosi.build
index 24114af4ec..7ad3371ee7 100755
--- a/mkosi.build
+++ b/mkosi.build
@@ -178,14 +178,15 @@ if [ -d mkosi.kernel/ ]; then
tools/testing/selftests/bpf/config.x86_64 \
tools/testing/selftests/bpf/config
- make O="$BUILDDIR" -j "$(nproc)"
+ # Make sure systemd-boot boots this kernel and not the distro provided one by overriding the version.
+ make O="$BUILDDIR" VERSION=99 -j "$(nproc)"
- KERNEL_RELEASE=$(make O="$BUILDDIR" -s kernelrelease)
+ KERNEL_RELEASE=$(make O="$BUILDDIR" VERSION=99 -s kernelrelease)
mkdir -p "$DESTDIR/usr/lib/modules/$KERNEL_RELEASE"
- make O="$BUILDDIR" INSTALL_MOD_PATH="$DESTDIR/usr" modules_install
- make O="$BUILDDIR" INSTALL_PATH="$DESTDIR/usr/lib/modules/$KERNEL_RELEASE" install
+ make O="$BUILDDIR" VERSION=99 INSTALL_MOD_PATH="$DESTDIR/usr" modules_install
+ make O="$BUILDDIR" VERSION=99 INSTALL_PATH="$DESTDIR/usr/lib/modules/$KERNEL_RELEASE" install
mkdir -p "$DESTDIR/usr/lib/kernel/selftests"
- make -C tools/testing/selftests -j "$(nproc)" O="$BUILDDIR" KSFT_INSTALL_PATH="$DESTDIR/usr/lib/kernel/selftests" SKIP_TARGETS="" install
+ make -C tools/testing/selftests -j "$(nproc)" O="$BUILDDIR" VERSION=99 KSFT_INSTALL_PATH="$DESTDIR/usr/lib/kernel/selftests" SKIP_TARGETS="" install
ln -sf /usr/lib/kernel/selftests/bpf/bpftool "$DESTDIR/usr/bin/bpftool"
fi