# Maintainer: graysky # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-rc pkgrel=1 _srcname=linux-5.11 _major=5.11 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc _minor=13 _minorc=$((_minor+1)) ### on initial release this is just $_major _fullver=$_major.$_minor #_fullver=$_major _rcver=1 _rcpatch=patch-${_major}.${_minorc}-rc${_rcver} pkgver=${_major}.${_minorc}rc${_rcver} arch=(x86_64) license=(GPL2) url="https://www.kernel.org/" makedepends=( bc kmod libelf cpio perl tar xz ) options=('!strip') _modprobeddb= source=( https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/"$_rcpatch".{xz,sign} # https://lkml.org/lkml/2019/8/23/712 #"$_rcpatch.patch::https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/patch/?id=$_srcname.y&id2=v${_major}.${_minor}" https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_fullver.tar.{xz,sign} config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch 0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch 0003-drm-i915-ilk-glk-Fix-link-training-on-links-with-LTT.patch 0004-drm-i915-dp-Prevent-setting-the-LTTPR-LT-mode-if-no-.patch 0005-drm-i915-Disable-LTTPR-support-when-the-DPCD-rev-1.4.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) b2sums=('1146f808dee9bf29b02e135caea52ee49ea8cbc6d4718ecddd9a296239484baa9d06f5968495949973fe22bddd2bd49dc85508cd12c7959d2291b3dc0e5f0d3b' 'SKIP' 'fd9537a0eb265660ed25d12ff4098ca208035576c580f81cb6a1355eedde2748bdb65521641f68e626a1aee49e7494c79627015a376b7ee4a6373622605ac760' 'SKIP' '4f43af91d2b6a3ddca56c187595538b1920fbc5a9ec87cb7c714501f7a03ec8513c7ef09e76ac9350feb815e09c68b57fca6adb1d47c41d7583d7e1ff5a5de08' '2c197117aa915971edb97ec98233d4c394f6790829486403bc51732a18fe12338d82e680ccafd138153affe9830d815ee1b52c7d1f3ed7937bc7a0c1fac3a5ef' 'b1cdc2e8d99ff59d57897fc99aa2a11b07f96f9461420d6d8d499fb4ff0740e317a8f9ede72b3041018ac89ab07a53c0014d19c06a9bb038055c4d5ed79f3b0d' 'ce586c65af54313c93e4dc55d56cf46840ac1b6a4f2a83b115529f4d9ef402158d28fa042967f1b685a11955371360513662f4b2eb1c75b5bba2ecd7ec31d8a9' '5a93bf75f5c9995270af06d8ded3e57f53f0a11fd5c2e24909c9af9140a5275555c0ae7d50b2a064d76517d6d3536beb7850930ab5aec829be81b59b5a6b55aa' '782e1ddb0400a7155b92f71e86ab1e717d3dbd159b4f003d2d4bdcd0baa660466ecdbc899f3b5e371c7e7400a940d4de0a3e46ff7418a641cd614ed738b16c86') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { # hacky work around for ck1 not getting extracted # https://bbs.archlinux.org/viewtopic.php?id=265115 if [[ ! -f "$srcdir/$_rcpatch" ]]; then xz -dc "$SRCDEST/$_rcpatch.xz" > "$_rcpatch" fi cd linux-${_fullver} msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname echo "Applying $_rcpatch..." patch -Np1 <"../$_rcpatch" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = 0*.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config .config # disable CONFIG_DEBUG_INFO at build time otherwise memory usage blows up and # can easily overwhelm a system with 32 GB of memory using a tmpfs build. # introduced by FS#66260, see: # https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=663b08666b269eeeeaafbafaee07fd03389ac8d7 scripts/config --disable CONFIG_DEBUG_INFO scripts/config --disable CONFIG_CGROUP_BPF scripts/config --disable CONFIG_BPF_LSM scripts/config --disable CONFIG_BPF_PRELOAD scripts/config --disable CONFIG_BPF_LIRC_MODE2 scripts/config --disable CONFIG_BPF_KPROBE_OVERRIDE if [[ -n "$_modprobeddb" ]]; then #msg "Running Steven Rostedt's make localmodconfig now" #sudo /usr/bin/modprobed-db recall #make localmodconfig msg "Running Steven Rostedt's make localmodconfig now" if [[ -f $HOME/.config/modprobed.db ]]; then _useit="$HOME/.config/modprobed.db" else _useit="../modprobed.db" fi make LSMOD="$_useit" localmodconfig fi make olddefconfig # make nconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(