]>
git.ipfire.org Git - thirdparty/systemd.git/blob - mkosi.images/system/kernel/mkosi.build.chroot
1b33ed9b060c84823238e51f16d9749c99a5ac91
2 # SPDX-License-Identifier: LGPL-2.1-or-later
7 BUILDDIR
="$BUILDDIR/kernel"
10 # Prevent a distro's custom installkernel script from being used.
11 if [ -x /sbin
/installkernel
]; then
12 mount
--bind /dev
/null
/sbin
/installkernel
15 # Ensure fast incremental builds by fixating these values which usually change for each build.
16 export KBUILD_BUILD_TIMESTAMP
="Fri Jun 5 15:58:00 CEST 2015"
17 export KBUILD_BUILD_HOST
="mkosi"
19 scripts
/kconfig
/merge_config.sh
-O "$BUILDDIR" \
20 ..
/mkosi.kernel.config \
21 tools
/testing
/selftests
/bpf
/config.x86_64 \
22 tools
/testing
/selftests
/bpf
/config
24 # Make sure systemd-boot boots this kernel and not the distro provided one by overriding the version.
25 make O
="$BUILDDIR" VERSION
=99 -j "$(nproc)"
26 make O
="$BUILDDIR" VERSION
=99 -j "$(nproc)" headers
28 KERNEL_RELEASE
=$
(make O
="$BUILDDIR" VERSION
=99 -s kernelrelease
)
29 mkdir
-p "$DESTDIR/usr/lib/modules/$KERNEL_RELEASE"
30 make O
="$BUILDDIR" VERSION
=99 INSTALL_MOD_PATH
="$DESTDIR/usr" modules_install
31 make O
="$BUILDDIR" VERSION
=99 INSTALL_PATH
="$DESTDIR/usr/lib/modules/$KERNEL_RELEASE" install
32 mkdir
-p "$DESTDIR/usr/lib/kernel/selftests"
33 make -C tools
/testing
/selftests
-j "$(nproc)" O
="$BUILDDIR" VERSION
=99 KSFT_INSTALL_PATH
="$DESTDIR/usr/lib/kernel/selftests" SKIP_TARGETS
="hid" install
35 mkdir
-p "$DESTDIR"/usr
/bin
36 ln -sf /usr
/lib
/kernel
/selftests
/bpf
/bpftool
"$DESTDIR/usr/bin/bpftool"