From: Daan De Meyer Date: Sat, 9 Sep 2023 09:31:26 +0000 (+0200) Subject: mkosi: Make sure custom installkernel scripts are not used X-Git-Tag: v255-rc1~537 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1adae328ed8d4668ed68d5c3483b11b6fc89cad9;p=thirdparty%2Fsystemd.git 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. --- diff --git a/mkosi.presets/system/mkosi.kernel.build b/mkosi.presets/system/mkosi.kernel.build index 5938330d4b9..a21585c4cab 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"