summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimão Gomes Viana2021-09-10 18:30:34 +0200
committerSimão Gomes Viana2021-09-10 18:30:34 +0200
commit6129b58aa34257c78821db501d49a4463df56480 (patch)
tree2b250a4a642da88a014607de473021bb8f572e65
parentdaef2e44e18c07e27c6ce6e2e3c199ebebeeedc8 (diff)
downloadaur-6129b58aa34257c78821db501d49a4463df56480.tar.gz
use initramfs generators instead of doing it explicitly
Thanks @tam1m for the patch
-rw-r--r--PKGBUILD12
-rw-r--r--linux-nitrous-fire.install16
2 files changed, 14 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7088d72e2783..b7aaea33db26 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -89,7 +89,17 @@ _package() {
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
$make_env_variant INSTALL_MOD_PATH="${pkgdir}" modules_install
- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${__kernelname}"
+
+ local modulesdir="$pkgdir/lib/modules/${_kernver}"
+
+ echo "Installing boot image..."
+ # systemd expects to find the kernel here to allow hibernation
+ # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
+ # Also initramfs generators are using this for install/remove/upgrade detection
+ install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
+
+ # Used by mkinitcpio to name the kernel
+ echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
# set correct depmod command for install
cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
diff --git a/linux-nitrous-fire.install b/linux-nitrous-fire.install
index 0ca7cbd7aa1b..983bdd69fb4f 100644
--- a/linux-nitrous-fire.install
+++ b/linux-nitrous-fire.install
@@ -5,17 +5,11 @@ KERNEL_NAME=
KERNEL_VERSION=
post_install () {
- echo ">>> Generating kernel initramfs..."
- mkinitcpio -p ${KERNEL_NAME}
+ echo ">>> Don't forget to generate kernel initramfs, if this is not done automatically by your initramfs generator!"
}
post_upgrade() {
- if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
- echo "WARNING: /boot appears to be a separate partition but is not mounted."
- fi
-
- echo ">>> Generating kernel initramfs..."
- mkinitcpio -p ${KERNEL_NAME}
+ echo ">>> Don't forget to generate kernel initramfs, if this is not done automatically by your initramfs generator!"
if [ $(vercmp $2 3.13) -lt 0 ]; then
echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
@@ -24,8 +18,4 @@ post_upgrade() {
fi
}
-post_remove() {
- # also remove the compat symlinks
- rm -f boot/initramfs-linux${KERNEL_NAME}.img
- rm -f boot/initramfs-linux${KERNEL_NAME}-fallback.img
-}
+