4.19.3.arch1-2: Add vmlinuz symlink for systemd

This commit is contained in:
Jan Alexander Steffens 2018-11-22 17:44:28 +00:00
parent 21df49f85d
commit 41aae07fdf
1 changed files with 7 additions and 2 deletions

View File

@ -6,7 +6,7 @@ pkgbase=linux # Build stock -ARCH kernel
#pkgbase=linux-custom # Build kernel with a different name
_srcver=4.19.3-arch1
pkgver=${_srcver//-/.}
pkgrel=1
pkgrel=2
arch=(x86_64)
url="https://git.archlinux.org/linux.git/log/?h=v$_srcver"
license=(GPL2)
@ -77,13 +77,18 @@ _package() {
cd $_srcname
msg2 "Installing boot image..."
install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-$pkgbase"
local image="$pkgdir/boot/vmlinuz-$pkgbase"
install -Dm644 "$(make -s image_name)" "$image"
msg2 "Installing modules..."
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
mkdir -p "$modulesdir"
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
ln -sr "$image" "$modulesdir/vmlinuz"
# a place for external modules,
# with version file for building modules and running depmod from hook
local extramodules="extramodules$_kernelname"