diff options
author | Simão Gomes Viana | 2021-09-10 18:30:34 +0200 |
---|---|---|
committer | Simão Gomes Viana | 2021-09-10 18:30:34 +0200 |
commit | 6129b58aa34257c78821db501d49a4463df56480 (patch) | |
tree | 2b250a4a642da88a014607de473021bb8f572e65 | |
parent | daef2e44e18c07e27c6ce6e2e3c199ebebeeedc8 (diff) | |
download | aur-6129b58aa34257c78821db501d49a4463df56480.tar.gz |
use initramfs generators instead of doing it explicitly
Thanks @tam1m for the patch
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | linux-nitrous-fire.install | 16 |
2 files changed, 14 insertions, 14 deletions
@@ -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 -} + |