summaryrefslogtreecommitdiffstats
path: root/mkosi.presets
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-09-09 11:31:26 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-09-09 15:35:00 +0200
commit1adae328ed8d4668ed68d5c3483b11b6fc89cad9 (patch)
treecfed93ce8260d9a25f0ba784c2c43794089df9ab /mkosi.presets
parentMerge pull request #29117 from Werkov/memory_available (diff)
downloadsystemd-1adae328ed8d4668ed68d5c3483b11b6fc89cad9.tar.xz
systemd-1adae328ed8d4668ed68d5c3483b11b6fc89cad9.zip
mkosi: Make sure custom installkernel scripts are not used
The kernel has this horrible build system feature where distros can ship /sbin/installkernel and it'll automatically be used by make install. Let's make sure that doesn't happen as on Debian this script puts the kernel under the wrong name causing mkosi build failures.
Diffstat (limited to 'mkosi.presets')
-rwxr-xr-xmkosi.presets/system/mkosi.kernel.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/mkosi.presets/system/mkosi.kernel.build b/mkosi.presets/system/mkosi.kernel.build
index 5938330d4b..a21585c4ca 100755
--- a/mkosi.presets/system/mkosi.kernel.build
+++ b/mkosi.presets/system/mkosi.kernel.build
@@ -12,6 +12,11 @@ if [ -d "$SRCDIR"/mkosi.kernel/ ]; then
cd "$SRCDIR"
mkdir -p "$BUILDDIR"
+ # Prevent a distro's custom installkernel script from being used.
+ if [ -x /sbin/installkernel ]; then
+ mount --bind /dev/null /sbin/installkernel
+ fi
+
# Ensure fast incremental builds by fixating these values which usually change for each build.
export KBUILD_BUILD_TIMESTAMP="Fri Jun 5 15:58:00 CEST 2015"
export KBUILD_BUILD_HOST="mkosi"