diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-27 19:20:00 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-27 19:26:54 -0300 |
commit | d284da9293a9088cfe4dc0aea2baa220eb590254 (patch) | |
tree | d1c50947651f1b6d4ef9027e81714ff1048c328a | |
parent | d3fff86fb7d77716f3ca171b633bd462202a3b18 (diff) | |
download | abslibre-d284da9293a9088cfe4dc0aea2baa220eb590254.tar.gz abslibre-d284da9293a9088cfe4dc0aea2baa220eb590254.tar.bz2 abslibre-d284da9293a9088cfe4dc0aea2baa220eb590254.zip |
remove mkinitcpio support for armv7h kernels
-rw-r--r-- | kernels/linux-libre-grsec-knock/PKGBUILD | 25 | ||||
-rw-r--r-- | kernels/linux-libre-grsec-knock/linux.install | 42 | ||||
-rw-r--r-- | kernels/linux-libre-knock/PKGBUILD | 25 | ||||
-rw-r--r-- | kernels/linux-libre-knock/linux.install | 42 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/PKGBUILD | 25 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/linux.install | 42 | ||||
-rw-r--r-- | kernels/linux-libre-rt/PKGBUILD | 25 | ||||
-rw-r--r-- | kernels/linux-libre-rt/linux.install | 42 | ||||
-rw-r--r-- | libre-testing/linux-libre-pck/PKGBUILD | 25 | ||||
-rw-r--r-- | libre-testing/linux-libre-pck/linux.install | 42 | ||||
-rw-r--r-- | libre-testing/linux-libre/PKGBUILD | 25 | ||||
-rw-r--r-- | libre-testing/linux-libre/linux.install | 42 | ||||
-rw-r--r-- | libre/linux-libre-grsec/PKGBUILD | 25 | ||||
-rw-r--r-- | libre/linux-libre-grsec/linux.install | 42 | ||||
-rw-r--r-- | libre/linux-libre-lts/PKGBUILD | 25 | ||||
-rw-r--r-- | libre/linux-libre-lts/linux.install | 42 | ||||
-rw-r--r-- | libre/linux-libre/PKGBUILD | 27 | ||||
-rw-r--r-- | libre/linux-libre/linux.install | 42 |
18 files changed, 388 insertions, 217 deletions
diff --git a/kernels/linux-libre-grsec-knock/PKGBUILD b/kernels/linux-libre-grsec-knock/PKGBUILD index 0c58a7edf..f783389c1 100644 --- a/kernels/linux-libre-grsec-knock/PKGBUILD +++ b/kernels/linux-libre-grsec-knock/PKGBUILD @@ -196,7 +196,7 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with grsecurity/PaX patches and support for stealth TCP sockets" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'grsec-common' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod' 'grsec-common') optdepends=('crda: to set the correct wireless channels of your country' 'gradm: to configure and enable Role Based Access Control (RBAC)' 'paxd-libre: to enable PaX exploit mitigations and apply exceptions automatically' @@ -206,7 +206,10 @@ _package() { conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -236,14 +239,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/kernels/linux-libre-grsec-knock/linux.install b/kernels/linux-libre-grsec-knock/linux.install index 70e177ef2..3ab31da58 100644 --- a/kernels/linux-libre-grsec-knock/linux.install +++ b/kernels/linux-libre-grsec-knock/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/kernels/linux-libre-knock/PKGBUILD b/kernels/linux-libre-knock/PKGBUILD index fc72d2f49..690f894dc 100644 --- a/kernels/linux-libre-knock/PKGBUILD +++ b/kernels/linux-libre-knock/PKGBUILD @@ -172,7 +172,7 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with support for stealth TCP sockets" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country' 'systemd-knock: to use system and service manager with TCP Stealth support' 'openssh-knock: to use SSH with TCP Stealth support') @@ -180,7 +180,10 @@ _package() { conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -210,14 +213,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/kernels/linux-libre-knock/linux.install b/kernels/linux-libre-knock/linux.install index 70e177ef2..3ab31da58 100644 --- a/kernels/linux-libre-knock/linux.install +++ b/kernels/linux-libre-knock/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/kernels/linux-libre-lts-knock/PKGBUILD b/kernels/linux-libre-lts-knock/PKGBUILD index eb84a4bb9..cfa56ade6 100644 --- a/kernels/linux-libre-lts-knock/PKGBUILD +++ b/kernels/linux-libre-lts-knock/PKGBUILD @@ -186,7 +186,7 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules - stable longtime supported kernel package suitable for servers with support for stealth TCP sockets" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country' 'systemd-knock: to use system and service manager with TCP Stealth support' 'openssh-knock: to use SSH with TCP Stealth support') @@ -194,7 +194,10 @@ _package() { conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -224,14 +227,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/kernels/linux-libre-lts-knock/linux.install b/kernels/linux-libre-lts-knock/linux.install index 70e177ef2..3ab31da58 100644 --- a/kernels/linux-libre-lts-knock/linux.install +++ b/kernels/linux-libre-lts-knock/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index fe64fc742..a74898882 100644 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -188,13 +188,16 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with realtime preemption" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -224,14 +227,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/kernels/linux-libre-rt/linux.install b/kernels/linux-libre-rt/linux.install index 70e177ef2..3ab31da58 100644 --- a/kernels/linux-libre-rt/linux.install +++ b/kernels/linux-libre-rt/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/libre-testing/linux-libre-pck/PKGBUILD b/libre-testing/linux-libre-pck/PKGBUILD index 3465643b3..0b3ee9828 100644 --- a/libre-testing/linux-libre-pck/PKGBUILD +++ b/libre-testing/linux-libre-pck/PKGBUILD @@ -172,7 +172,7 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with a handful of awesome features not merged into mainline [AUFS, BFQ, BFS, KDBUS, Knock, TuxOnIce, UKSM]" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country' 'systemd-knock: to use system and service manager with TCP Stealth support' 'openssh-knock: to use SSH with TCP Stealth support') @@ -180,7 +180,10 @@ _package() { conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -210,14 +213,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/libre-testing/linux-libre-pck/linux.install b/libre-testing/linux-libre-pck/linux.install index 70e177ef2..3ab31da58 100644 --- a/libre-testing/linux-libre-pck/linux.install +++ b/libre-testing/linux-libre-pck/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/libre-testing/linux-libre/PKGBUILD b/libre-testing/linux-libre/PKGBUILD index 7277d6d44..fa46687bb 100644 --- a/libre-testing/linux-libre/PKGBUILD +++ b/libre-testing/linux-libre/PKGBUILD @@ -195,13 +195,16 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -231,14 +234,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/libre-testing/linux-libre/linux.install b/libre-testing/linux-libre/linux.install index 70e177ef2..3ab31da58 100644 --- a/libre-testing/linux-libre/linux.install +++ b/libre-testing/linux-libre/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/libre/linux-libre-grsec/PKGBUILD b/libre/linux-libre-grsec/PKGBUILD index 90abea1e7..aaca96319 100644 --- a/libre/linux-libre-grsec/PKGBUILD +++ b/libre/linux-libre-grsec/PKGBUILD @@ -185,7 +185,7 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with grsecurity/PaX patches" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'grsec-common' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod' 'grsec-common') optdepends=('crda: to set the correct wireless channels of your country' 'gradm: to configure and enable Role Based Access Control (RBAC)' 'paxd-libre: to enable PaX exploit mitigations and apply exceptions automatically') @@ -193,7 +193,10 @@ _package() { conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -223,14 +226,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/libre/linux-libre-grsec/linux.install b/libre/linux-libre-grsec/linux.install index 70e177ef2..3ab31da58 100644 --- a/libre/linux-libre-grsec/linux.install +++ b/libre/linux-libre-grsec/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index 93532038f..ecc33143f 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -175,13 +175,16 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules - stable longtime supported kernel package suitable for servers" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -211,14 +214,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/libre/linux-libre-lts/linux.install b/libre/linux-libre-lts/linux.install index 70e177ef2..3ab31da58 100644 --- a/libre/linux-libre-lts/linux.install +++ b/libre/linux-libre-lts/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index 6ab92072d..a3edd435e 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -20,7 +20,7 @@ _replacesoldmodules=() # '%' gets replaced with _kernelname _srcname=linux-${_pkgbasever%-*} _archpkgver=${_pkgver%-*} pkgver=${_pkgver//-/_} -pkgrel=2 +pkgrel=3 rcnrel=armv7-x2 arch=('i686' 'x86_64' 'armv7h') url="http://linux-libre.fsfla.org/" @@ -176,13 +176,16 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") [ "${CARCH}" = "armv7h" ] && conflicts+=("${_replacesarchkernel}-uimage") && replaces+=("${_replacesarchkernel}-uimage") - backup=("etc/mkinitcpio.d/${pkgbase}.preset") + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + depends+=('mkinitcpio>=0.7') + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + fi install=linux.install cd "${srcdir}/${_srcname}" @@ -212,14 +215,16 @@ _package() { -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ -i "${startdir}/${install}" - # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - sed \ - -e "1s|'linux.*'|'${pkgbase}'|" \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + fi # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} diff --git a/libre/linux-libre/linux.install b/libre/linux-libre/linux.install index 70e177ef2..3ab31da58 100644 --- a/libre/linux-libre/linux.install +++ b/libre/linux-libre/linux.install @@ -8,30 +8,44 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if [ "$(uname -m)" = "armv7h" ]; then + echo ">>> NOTE: Using this kernel requires GRUB!" + echo ">>> See the Migration Guide for instructions:" + echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } 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 + if [ "$(uname -m)" = "armv7h" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + 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 - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} - if [ $(vercmp $2 3.13) -lt 0 ]; then - echo ">>> WARNING: AT keyboard support is no longer built into the kernel." - echo ">>> In order to use your keyboard during early init, you MUST" - echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + if [ $(vercmp $2 3.13) -lt 0 ]; then + echo ">>> WARNING: AT keyboard support is no longer built into the kernel." + echo ">>> In order to use your keyboard during early init, you MUST" + echo ">>> include the 'keyboard' hook in your mkinitcpio.conf." + fi fi } +if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img } +fi |