pkgbase=linux pkgname=('linux' 'linux-headers' 'linux-docs') pkgver=4.17.14 _srcname=linux-$pkgver pkgrel=1 arch=('x86_64') url="https://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf') options=('!strip') source=( https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign} config.x86_64 # the main kernel config file 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch 0002-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch 0003-ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch 0004-mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman '8218F88849AAC522E94CF470A5E9288C4FA415FA' # Jan Alexander Steffens (heftig) ) sha256sums=('c846038df44ee74dd910d19b346044a100f62a5b933eec2264d17008758cbaaf' 'SKIP' 'f11c921705c0557ba20817182d9421146316853ce47478eceeebe76b20c79058' '287b43e83535d0aba2797b8fe4c1527788995cbfd858097be37214345e781a25' '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '92f848d0e21fbb2400e50d1c1021514893423641e5450896d7b1d88aa880b2b9' 'fc3c50ae6bd905608e0533a883ab569fcf54038fb9d6569b391107d9fd00abbc' 'bc50c605bd0e1fa7437c21ddef728b83b6de3322b988e14713032993dfa1fc69' '66284102261c4ed53db050e9045c8672ba0e5171884b46e58f6cd417774d8578') _kernelname=-CHAKRA prepare() { cd ${_srcname} # add latest fixes from stable queue, if needed # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git # disable USER_NS for non-root users by default patch -Np1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch # https://bugs.archlinux.org/task/56711 patch -Np1 -i ../0002-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch # https://bugs.archlinux.org/task/56780 patch -Np1 -i ../0003-ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch # Fix iwd provoking a BUG patch -Np1 -i ../0004-mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch cat ../config.x86_64 - >.config < ../version # load configuration # Configure the kernel. Replace the line below with one of your choice. #make menuconfig # CLI menu for configuration #make nconfig # new CLI menu for configuration #make xconfig # X-based configuration #make oldconfig # using old config from previous kernel version # ... or manually edit .config # rewrite configuration yes "" | make config >/dev/null # save configuration for later reuse cat .config > "${startdir}/config.x86_64.last" } build() { cd ${_srcname} make ${MAKEFLAGS} bzImage modules } package_linux() { pkgdesc="The Linux Kernel and modules" groups=('base') depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install local kernver="$( "${startdir}/${install}.pkg" true && install=${install}.pkg # install mkinitcpio preset file sed "${_subst}" ../linux.preset | install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" # install pacman hooks sed "${_subst}" ../60-linux.hook | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook" sed "${_subst}" ../90-linux.hook | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" } package_linux-headers() { pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" local builddir="$pkgdir/usr/lib/modules/$(