subrepo:
  subdir:   "linux-tkg"
  merged:   "9c02fea"
upstream:
  origin:   "https://github.com/Frogging-Family/linux-tkg"
  branch:   "master"
  commit:   "9c02fea"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
This commit is contained in:
Nathan 2022-03-10 20:17:02 -06:00
parent 8f91d9e662
commit d9d05819e1
280 changed files with 1156701 additions and 0 deletions

View file

@ -0,0 +1,21 @@
name: Automatic version bumping
on:
schedule:
- cron: '3 */6 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config user.name "BIG UGLY FROGMINER"
git config user.email BIG_UGLY_FROGMINER@froggi.es
./update-kernel-versions.sh
changes=$(cat kernel_updates)
if [ -n "$changes" ]; then
git add PKGBUILD linux-tkg-config/prepare
git commit --author="Adel KARA SLIMANE <adel.ks@zegrapher.com>" -m "version bumps:$changes"
git push
fi

21
linux-tkg/.gitignore vendored Normal file
View file

@ -0,0 +1,21 @@
.*
!.github
!.gitignore
*~
*.orig
*.log
*.run
*.tgz
*.xz
*.pkg
*.bak
*.tar.gz
*.pkg.*
*.old
*.db
*.files
*/src/
src/*
*/pkg/
pkg/*
*/linux-5*/

12
linux-tkg/.gitrepo Normal file
View file

@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/Frogging-Family/linux-tkg
branch = master
commit = 9c02feac7ab18e7edb62fa748f471752222c2b42
parent = 8f91d9e662a66e9f3cbc4c02bb90dd68eba2d22a
method = merge
cmdver = 0.4.3

996
linux-tkg/PKGBUILD Normal file
View file

@ -0,0 +1,996 @@
# Based on the file created for Arch Linux by:
# Tobias Powalowski <tpowa@archlinux.org>
# Thomas Baechler <thomas@archlinux.org>
# Contributor: Tk-Glitch <ti3nou at gmail dot com>
# Contributor: Hyper-KVM <hyperkvmx86 at gmail dot com>
plain ' .---.` `.---.'
plain ' `/syhhhyso- -osyhhhys/`'
plain ' .syNMdhNNhss/``.---.``/sshNNhdMNys.'
plain ' +sdMh.`+MNsssssssssssssssNM+`.hMds+'
plain ' :syNNdhNNhssssssssssssssshNNhdNNys:'
plain ' /ssyhhhysssssssssssssssssyhhhyss/'
plain ' .ossssssssssssssssssssssssssssso.'
plain ' :sssssssssssssssssssssssssssssssss:'
plain ' /sssssssssssssssssssssssssssssssssss/ Linux-tkg'
plain ' :sssssssssssssoosssssssoosssssssssssss: kernels'
plain ' osssssssssssssoosssssssoossssssssssssso'
plain ' osssssssssssyyyyhhhhhhhyyyyssssssssssso'
plain ' /yyyyyyhhdmmmmNNNNNNNNNNNmmmmdhhyyyyyy/'
plain ' smmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmmms'
plain ' /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNd/'
plain ' `:sdNNNNNNNNNNNNNNNNNNNNNNNNNds:`'
plain ' `-+shdNNNNNNNNNNNNNNNdhs+-`'
plain ' `.-:///////:-.`'
_where="$PWD" # track basedir as different Arch based distros are moving srcdir around
_ispkgbuild="true"
_distro="Arch"
source "$_where"/customization.cfg # load default configuration from file
source "$_where"/linux-tkg-config/prepare
if [ -e "$_EXT_CONFIG_PATH" ]; then
msg2 "External configuration file $_EXT_CONFIG_PATH will be used and will override customization.cfg values."
source "$_EXT_CONFIG_PATH"
fi
# Make sure we're in a clean state
if [ ! -e "$_where"/BIG_UGLY_FROGMINER ]; then
_tkg_initscript
fi
source "$_where"/BIG_UGLY_FROGMINER
if [[ "$_sub" = rc* ]]; then
_srcpath="linux-${_basekernel}-${_sub}"
kernel_site="https://git.kernel.org/torvalds/t/linux-${_basekernel}-${_sub}.tar.gz"
else
_srcpath="linux-${_basekernel}"
kernel_site="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz"
patch_site="https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-${_basekernel}.${_sub}.xz"
fi
if [ -n "$_custom_pkgbase" ]; then
pkgbase="${_custom_pkgbase}"
else
pkgbase=linux"${_basever}"-tkg-"${_cpusched}"${_compiler_name}
fi
pkgname=("${pkgbase}" "${pkgbase}-headers")
pkgver="${_basekernel}"."${_sub}"
pkgrel=247
pkgdesc='Linux-tkg'
arch=('x86_64') # no i686 in here
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('bison' 'xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'pahole' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git' 'cpio' 'perl' 'tar' 'xz' 'wget')
if [ "$_compiler_name" = "-llvm" ]; then
makedepends+=( 'lld' 'clang' 'llvm')
fi
optdepends=('schedtool')
options=('!strip' 'docs')
case $_basever in
54)
#opt_ver="4.19-5.4"
source=("$kernel_site"
"$patch_site"
#"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-4.19-5.4.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.4-ck1.patch
0005-glitched-ondemand-pds.patch
0005-glitched-pds.patch
0005-v5.4_undead-pds099o.patch
0006-add-acs-overrides_iommu.patch
0007-v5.4-fsync.patch
#0008-5.4-bcachefs.patch
0009-glitched-bmq.patch
0009-bmq_v5.4-r2.patch
0012-linux-hardened.patch
)
sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491'
'69c153d9d425273762df1d1f917904e0b9f765fb7a9b49ea32a27f2264a614cc'
#'SKIP'
'b0c4c60669f47ba4d3d1388368a5f9790aa697af42c917ed2ef177f111336d8b'
'1f4a20d6eaaa0d969af93152a65191492400c6aa838fc1c290b0dd29bb6019d8'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
'886ed1d648938d776a795d289af0c83207c1c70c00cd9d79560951d0bc951e25'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'9420cf1a04740956008e535725ae38a2f759188841be3776447a4eb635fa5158'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb'
'815974c65f47301d2a5d1577bf95e8a4b54cad7d77f226e0065f83e763837c48'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'eac7e5d6201528e64f4bdf5e286c842511e1afc52e1518dc8e7d11932bbe0a99'
'29f7dc8930426b9cf86742ca80623b96b97c1d92a4436ba4e2adcde5200b4c29'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'2d9260b80b43bbd605cf420d6bd53aa7262103dfd77196ba590ece5600b6dc0d'
'3832f828a9f402b153fc9a6829c5a4eaf6091804bcda3a0423c8e1b57e26420d'
'c98befca824f761260466410a1dd94d2b9be6f7211b5daefcfc0f3a102bbdc81'
'aeb31404c26ee898d007b1f66cb9572c9884ad8eca14edc4587d68f6cba6de46')
;;
57)
opt_ver="5.7"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/outdated_versions/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.7.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.7-ck1.patch
0005-glitched-ondemand-pds.patch
0005-glitched-pds.patch
0005-v5.7_undead-pds099o.patch
0006-add-acs-overrides_iommu.patch
0007-v5.7-fsync.patch
0008-5.7-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.7-r3.patch
0012-linux-hardened.patch
)
sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0'
'66a0173a13cd58015f5bf1b14f67bfa15dc1db5d8e7225fcd95ac2e9a5341653'
'SKIP'
'357a0db541f7de924ed89c21f5a6f3de4889b134c5d05d5e32ccd234bd81eedf'
'15ce09447b7e9b28425c1df5961c955378f2829e4115037337eef347b1db3d9d'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
'bbf332201423888257c9687bee06916a5dbbac2194f9df5b4126100c40e48d16'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb'
'8d8aec86e34dbec6cc3a47f2cd55dc9212e95d36b6cd34d6e637c66731e7d838'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
'55be5e4c6254da0a9d34bbfac807a70d8b58b3f7b2ec852026195c4db5e263e2'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204'
'd2214504c43f9d297a8ef68dffc198143bfebf85614b71637a71978d7a86bd78'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'965a517a283f265a012545fbb5cc9e516efc9f6166d2aa1baf7293a32a1086b7'
'b2a2ae866fc3f1093f67e69ba59738827e336b8f800fb0487599127f7f3ef881'
'6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d')
;;
58)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
#0004-glitched-ondemand-muqss.patch
#0004-glitched-muqss.patch
#0004-5.8-ck1.patch
0005-undead-glitched-ondemand-pds.patch
0005-undead-glitched-pds.patch
0005-v5.8_undead-pds099o.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.8-fsync.patch
0008-5.8-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.8-r3.patch
#0012-linux-hardened.patch
)
sha256sums=('e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5'
'5b558a40c2fdad2c497fe0b1a64679313fd5a7ccbaecef8803d49b3baaccbacd'
'SKIP'
'f4754fbe2619ef321e49a7b560fad058b2459d17cff0b90e839cb475f46e8b63'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'b9ebe0ae69bc2b2091d6bfcf6c7875a87ea7969fcfa4e306c48d47a60f9ef4d6'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
'31b172eb6a0c635a8d64cc1c2e8181d9f928ee991bd44f6e556d1713b815f8d9'
'87bca363416655bc865fcb2cc0d1532cb010a61d9b9f625e3c15cd12eeee3a59'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204'
'e73c3a8a040a35eb48d1e0ce4f66dd6e6f69fd10ee5b1acf3a0334cbf7ffb0c4'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'965a517a283f265a012545fbb5cc9e516efc9f6166d2aa1baf7293a32a1086b7'
'f5dbff4833a2e3ca94c202e5197894d5f1006c689ff149355353e77d2e17c943')
;;
59)
opt_ver="5.8-5.14"
source=("$kernel_site"
$patch_site
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
"config.x86_64" # stock Arch config
#$hardened_config_file # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.9-ck1.patch
0005-undead-glitched-ondemand-pds.patch
0005-undead-glitched-pds.patch
0005-v5.9_undead-pds099o.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.9-fsync.patch
0008-5.9-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.9-r3.patch
#0012-linux-hardened.patch
)
sha256sums=('3239a4ee1250bf2048be988cc8cb46c487b2c8a0de5b1b032d38394d5c6b1a06'
'46c520da2db82d8f9a15c2117d3a50e0faaaf98f05bd4ea1f3105e2724f207d6'
'SKIP'
'ce2711b9d628e71af62706b830c2f259a43ad1e614871dd90bcb99d8709e1dab'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'902885088ed0748e40372e04a8ec11adf5acf3d935abffc6737dd9e6ec13bb93'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'45a9ab99215ab3313be6e66e073d29154aac55bc58975a4df2dad116c918d27c'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'f9f5f0a3a1d6c5233b9d7a4afe8ed99be97c4ff00a80bde4017d117c7d5f98ed'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'14a261f1940a2b21b6b14df7391fc2c6274694bcfabfac3d0e985a67285dbfe7'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'0d5fe3a9050536fe431564b221badb85af7ff57b330e3978ae90d21989fcad2d')
;;
510)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.10-ck1.patch
0005-undead-glitched-ondemand-pds.patch
0005-undead-glitched-pds.patch
0005-v5.10_undead-pds099o.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.10-fsync.patch
0007-v5.10-futex2_interface.patch
0007-v5.10-winesync.patch
0008-5.10-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.10-r3.patch
0012-linux-hardened.patch
0012-misc-additions.patch
)
sha256sums=('dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43'
'3ce705c37f70db9962bd615329e34b85bc41eb3eff63284eb34e2979da05ce5b'
'SKIP'
'13a39ab2be1301b60565cb6a4bedb2bca16b6b12427407c099a81169feb367d6'
'eb1da1a028a1c967222b5bdac1db2b2c4d8285bafd714892f6fc821c10416341'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'acc50cd9f88b9f12dc4321fab7af66f6cc8299bb83ebcb4056f6189fca22ec9c'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'e00096244e5cddaa5500d08b5f692fd3f25be9401dfa3b0fc624625ff2f5e198'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'd29895468e2113538db457282e6d7a8ca6afec7c4bac5d98811f70fe1cdc333b'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'f46ed0f026490b11b6a6cfb21e78cd253f0d7c308dc5a34e93971659a4eaa19e'
'c2c0c6423d09278e300c481d891b8072ec5fd89e49e75f36a698b610aa819e65'
'377d0eb1df251808b8280d1aec598b4a2986f7d167306cdec9048c337cdcf2e1'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'b9da77449157c36193d4dc8a43f4cebe7f13d9f6bbcdadbcbf1e61da1f5f887e'
'105f51e904d80f63c1421203e093b612fc724edefd3e388b64f8d371c0b3a842'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24')
;;
511)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.11-ck1.patch
0005-undead-glitched-ondemand-pds.patch
0005-undead-glitched-pds.patch
0005-v5.11_undead-pds099o.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.11-fsync.patch
0007-v5.11-futex2_interface.patch
0007-v5.11-winesync.patch
0008-5.11-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.11-r3.patch
0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('04f07b54f0d40adfab02ee6cbd2a942c96728d87c1ef9e120d0cb9ba3fe067b4'
'07aac31956d3f483a91506524befd45962f3bbfda2f8d43cf90713caf872d9ba'
'SKIP'
'fc08ac33e3bc47ed0ee595a2e4b84bc45b02682b383db6acfe281792e88f6231'
'837ad05b68d0443580f78f5eb316db46c6b67abfefa66c22b6cb94f4915a52ba'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'1ac97da07e72ec7e2b0923d32daacacfaa632a44c714d6942d9f143fe239e1b5'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'2f7e24e70ed1f5561155a1b5e5aab9927aea317db0500e8cf83cd059807f9c7e'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'4169fffe69eb5216831e545cb7439fa8e3fc09066757d7d4c496fe024fc373ee'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'073e7b8ab48aa9abdb5cedb5c729a2f624275ebdbe1769476231c9e712145496'
'c2c0c6423d09278e300c481d891b8072ec5fd89e49e75f36a698b610aa819e65'
'6c831d7cdfe4897656b76c4ec60e0a18d6f3618f79c402ebc3bf4453a6616319'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'5cd64937e3a517f49f4311c47bd692eb8e117f09d655cd456e03366373ba8060'
'9e7b1663f5247f15e883ce04e1dc2b18164aa19ebe47f75967be09659eff1101'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
512)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.12-ck1.patch
#0005-undead-glitched-ondemand-pds.patch
#0005-undead-glitched-pds.patch
#0005-v5.12_undead-pds099o.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.12-fsync.patch
0007-v5.12-futex2_interface.patch
0007-v5.12-winesync.patch
0008-5.12-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.12-r1.patch
#0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('7d0df6f2bf2384d68d0bd8e1fe3e071d64364dcdc6002e7b5c87c92d48fac366'
'a41e4a4eb50c670a48f9c9bcc32ccb2195c02e3caa823a6aaed04537fdd8b73d'
'SKIP'
'0a7c40402715f8817c4f40173ca1fa8af84c56f7658be281e5424319000370b6'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'a447e697cb744283e3e89f300c8a8bda04a9c8108f03677fb48bf9675c992cbd'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'3cdc90f272465c2edb6bac8a3c90f2e098ba8ca73d27e4c0cadf70b7e87641ea'
'c8b0f2a1ef84b192c67b61c5a60426a640d5a83ac55a736929f0c4e6ec7b85f8'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'540dda70cccc0cb23f0d0311f9947209cfe377070620e5fca69f66cc1efe817e'
'9b324790ecf0240cbb314b8e02a7dcbfb14e3408267b702ad96f40a2ce77fdc2'
'c6c5bcfac976c2304bdd13b80f8ad0329e5e53a6d9e9d130115204ea09fe2848'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'6325b3d6972725e41adbaf5e2db19a040dbf0856046cecc1c4d6786a064d04ff'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
513)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0004-glitched-ondemand-muqss.patch
0004-glitched-muqss.patch
0004-5.13-ck1.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.13-fsync.patch
0007-v5.13-futex2_interface.patch
0007-v5.13-futex_waitv.patch
0007-v5.13-fsync1_via_futex_waitv.patch
0007-v5.13-winesync.patch
0008-5.13-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.13-r3.patch
0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('3f6baa97f37518439f51df2e4f3d65a822ca5ff016aa8e60d2cc53b95a6c89d9'
'6fadc31348a0c0bbce86b067811d1dadae307bbde5b712c688b3193d73f0fb71'
'SKIP'
'06ad99b810943f7ce4650fe656156f4b40d11fabd9b89e2b1beff06c46836efc'
'49a34dfc8ee7663a8a20c614f086e16ec70e8822db27a91050fd6ffebf87a650'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'ef48eea194c1c101de0461572eaf311f232fee55c155c52904b20085a92db680'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'de718ecea652a74e1d821459397d3dafaa3de1a7dba3df51ba9fc42b8645c3e2'
'12d7c7457d4605ba00cb888383779e591a58e701643d763d8fe05dcdec3e9830'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'89d837bfea3515504b1c99fc881ebdc4f15e2999558127a263e795fc69408a39'
'9ec679871cba674cf876ba836cde969296ae5034bcc10e1ec39b372e6e07aab0'
'0e3473c19e5513bee886f03cf2476f746d8b5b2fbc0841c9d60d609b16a97c14'
'f5ed3062543074472172e30f3db4baa1e292b50e11c1c19e2511b71b28ac7e48'
'9b324790ecf0240cbb314b8e02a7dcbfb14e3408267b702ad96f40a2ce77fdc2'
'b0004bc559653fd8719b8adcfa1ead1075db3425d30d7d7adb8cbc6296386a8f'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'ccf925b6326a8cf63d28c00a7645a0fa120608bfcf5dabb77a4522f249aa306d'
'ab6471e61fad017ef1a5c3544a3c24029f81d7ad5bbdebbf98691ecfd051d4c4'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
514)
opt_ver="5.8-5.14"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.14-fsync.patch
0007-v5.14-futex2_interface.patch
0007-v5.14-futex_waitv.patch
0007-v5.14-fsync1_via_futex_waitv.patch
0007-v5.14-winesync.patch
#0008-5.14-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.14-r3.patch
#0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('7e068b5e0d26a62b10e5320b25dce57588cbbc6f781c090442138c9c9c3271b2'
'578be613998d8aa7e5460d6d5448799e422198d31e157c67eec2e5e58abb9c60'
'SKIP'
'f5d3635520c9eb9519629f6df0d9a58091ed4b1ea4ddb1acd5caf5822d91a060'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'2ed4f07f972f1a5c42fa7746f486a28c28a568404ca0caf7ae9416acbae5555a'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'aa67e81a27d9062e463594acb91eca6dd13388f23cbe53ca56298f9dba61cc10'
'efe5e21706fdf64559ead866c85a5d88c5c3f743d814410df3810ca61cc5b966'
'5742277f41f22bf29fa9742562946b8a01377f8a22adb42ceed3607541c1d5b6'
'5bd2e13d3c70abe4efefa1c4374a5d3801fece087f093ce6a8ca5b8466dc1f20'
'9b324790ecf0240cbb314b8e02a7dcbfb14e3408267b702ad96f40a2ce77fdc2'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'1565038792869f1e99dc321b57d00dbfa14ab824a995f39c4d3effceab0b5415'
'80a965ee61357c8f0a697eb71225976b7e352d4e54d9e576d3a1779d2a06714a'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
515)
opt_ver="5.15%2B"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
'config.x86_64' # stock Arch config
'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
0007-v5.15-fsync.patch
0007-v5.15-futex_waitv.patch
0007-v5.15-fsync1_via_futex_waitv.patch
0007-v5.15-winesync.patch
0008-5.15-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.15-r1.patch
0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8'
'ab323e0994a6bf1e8116a0e26c8e64edba87c7d85ec99f00380fdc11168dcda4'
'SKIP'
'24be2e8863e265195a24d7082804cd4328fd9f0a31b88672c884b9fd42469ed8'
'6e3ef6bc4779ae3b7154642147d5ab3ece6e38e3e08bdb30f86d89d2b4855fa9'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'2e2c5c546fb2aabfa90f31310355324f58c6783d520b45b8898577bb7d1a5277'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'0b73ec751187d899a4c347b9287c7a76d06523abaeca985a76d0f7ae167d4b1f'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'6c4f0099896f69e56ebd8c9eac266ac8ad993acecd50945e0e84ef6f95f9ddca'
'c8f7c50d9b1418ba22b5ca735c47111a162be416109714d26a674162e5b2cb97'
'63a2ddf7ca9d3922f4eac3ac66bc37ffb10ad8b18b3e596832d3faa66b93dfa6'
'751c4b010d3cef24586fa35498d19060691ad4def35066a0048275b2c371781f'
'68659b54bd0c0539c22869feea8017faf947af6883d75c00089f2bfd9f265f8e'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'978b197efa56781a1d5651a3649c3d8b926d55748b4b9063788dfe1a861fc1bc'
'7859fe0537662304a62b8f9bf9f6aff201d27097753f9c61e368a7fd19cc55df'
'4499b55ed1c0b9527feba77160f6f244c93dfed417d04e0ba88a077a8140b281'
'434e4707efc1bc3919597c87d44fa537f7563ae04236479bbf1adb5f410ab69d'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
516)
opt_ver="5.15%2B"
source=("$kernel_site"
"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
#0007-v5.16-fsync.patch
0007-v5.16-fsync1_via_futex_waitv.patch
0007-v5.16-winesync.patch
#0008-5.14-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.16-r0.patch
#0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
'aaa5555a903f794fb753f35427781b608d72ea34993c018ae1289037376037a0'
'SKIP'
'5b54e733edceca75df8d7c44aee4a811f3d058861ce54ab0839a7705d47e59df'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'fc6b5f3d03cacbb8ac547a8829f0c7544aaf7548f26298f8783d693a617b81d9'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
#'4503034f211de3013f8500106da753e5d1bcac14bc5576671cbe6f574805b3cd'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'f91223f98f132602a4fa525917a1f27afe30bdb55a1ac863e739c536188417b3'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'7bd99d10ec9f834de95424d033f940f9531beb3a7b4d9711448f0ed66832c03d'
#'decd4a55c0d47b1eb808733490cdfea1207a2022d46f06d04a3cc60fdcb3f32c'
'1aa0a172e1e27fb8171053f3047dcf4a61bd2eda5ea18f02b2bb391741a69887'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
517)
opt_ver="5.15%2B"
source=("$kernel_site"
#"$patch_site"
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
cleanup
# ARCH Patches
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# TkG
0002-clear-patches.patch
0003-glitched-base.patch
0003-glitched-cfs.patch
0003-glitched-cfs-additions.patch
0005-glitched-pds.patch
0006-add-acs-overrides_iommu.patch
#0007-v5.16-fsync.patch
0007-v5.17-fsync1_via_futex_waitv.patch
0007-v5.17-winesync.patch
#0008-5.14-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.17-r0.patch
#0012-linux-hardened.patch
0012-misc-additions.patch
# MM Dirty Soft for WRITE_WATCH support in Wine
0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
0002-mm-Support-soft-dirty-flag-read-with-reset.patch
)
sha256sums=('35575d4843f405ddd229f358a81fecca460fcd7a4b087bd74f0a34cc4c20b2c1'
#upcoming_kernel_patch_sha256
'SKIP'
'961c380f74b9e28a47a21001fc330460dcd639f7580b7a178472e40af8f4dcd4'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'fc6b5f3d03cacbb8ac547a8829f0c7544aaf7548f26298f8783d693a617b81d9'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
#'4503034f211de3013f8500106da753e5d1bcac14bc5576671cbe6f574805b3cd'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'f91223f98f132602a4fa525917a1f27afe30bdb55a1ac863e739c536188417b3'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'cfaa1a7efd24fb7967511ae0423362d33631bf355516c6ef524403e8e343e448'
#'decd4a55c0d47b1eb808733490cdfea1207a2022d46f06d04a3cc60fdcb3f32c'
'1aa0a172e1e27fb8171053f3047dcf4a61bd2eda5ea18f02b2bb391741a69887'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
esac
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
rm -rf $pkgdir # Nuke the entire pkg folder so it'll get regenerated clean on next build
ln -s "${_where}/customization.cfg" "${srcdir}" # workaround
cd "${srcdir}/${_srcpath}"
_tkg_srcprep
}
build() {
cd "${srcdir}/${_srcpath}"
# Use custom compiler paths if defined
if [ "$_compiler_name" = "-llvm" ] && [ -n "${CUSTOM_LLVM_PATH}" ]; then
PATH=${CUSTOM_LLVM_PATH}/bin:${CUSTOM_LLVM_PATH}/lib:${CUSTOM_LLVM_PATH}/include:${PATH}
elif [ -n "${CUSTOM_GCC_PATH}" ]; then
PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH}
fi
if [ "$_force_all_threads" = "true" ]; then
_force_all_threads="-j$((`nproc`+1))"
else
_force_all_threads="${MAKEFLAGS}"
fi
# ccache
if [ "$_noccache" != "true" ] && pacman -Qq ccache &> /dev/null; then
export PATH="/usr/lib/ccache/bin/:$PATH"
export CCACHE_SLOPPINESS="file_macro,locale,time_macros"
export CCACHE_NOHASHDIR="true"
msg2 'ccache was found and will be used'
fi
# document the TkG variables, excluding "_", "_EXT_CONFIG_PATH", "_where", and "_path".
declare -p | cut -d ' ' -f 3 | grep -P '^_(?!=|EXT_CONFIG_PATH|where|path)' > "${srcdir}/customization-full.cfg"
# remove -O2 flag and place user optimization flag
CFLAGS=${CFLAGS/-O2/}
CFLAGS+=" ${_compileropt}"
# build!
_runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 make ${_force_all_threads} ${llvm_opt} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( make ${_force_all_threads} ${llvm_opt} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 )
}
hackbase() {
pkgdesc="The $pkgdesc kernel and modules"
depends=('coreutils' 'kmod' 'initramfs')
optdepends=('linux-docs: Kernel hackers manual - HTML documentation that comes with the Linux kernel.'
'crda: to set the correct wireless channels of your country.'
'linux-firmware: Firmware files for Linux'
'modprobed-db: Keeps track of EVERY kernel module that has ever been probed. Useful for make localmodconfig.'
'nvidia-tkg: NVIDIA drivers for all installed kernels - non-dkms version.'
'nvidia-dkms-tkg: NVIDIA drivers for all installed kernels - dkms version.'
'update-grub: Simple wrapper around grub-mkconfig.')
if [ -e "${srcdir}/winesync.rules" ]; then
provides=("linux=${pkgver}" "${pkgbase}" VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE WINESYNC-MODULE winesync-header)
else
provides=("linux=${pkgver}" "${pkgbase}" VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
fi
replaces=(virtualbox-guest-modules-arch wireguard-arch)
cd "${srcdir}/${_srcpath}"
# get kernel version
local _kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$_kernver"
msg2 "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make ${llvm_opt} -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
msg2 "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
# remove build and source links
rm "$modulesdir"/{source,build}
# install cleanup pacman hook and script
sed -e "s|cleanup|${pkgbase}-cleanup|g" "${srcdir}"/90-cleanup.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
install -Dm755 "${srcdir}"/cleanup "${pkgdir}/usr/share/libalpm/scripts/${pkgbase}-cleanup"
# install customization file, for reference
install -Dm644 "${srcdir}"/customization-full.cfg "${pkgdir}/usr/share/doc/${pkgbase}/customization.cfg"
# workaround for missing header with winesync
if [ -e "${srcdir}/${_srcpath}/include/uapi/linux/winesync.h" ]; then
msg2 "Workaround missing winesync header"
install -Dm644 "${srcdir}/${_srcpath}"/include/uapi/linux/winesync.h "${pkgdir}/usr/include/linux/winesync.h"
fi
# load winesync module at boot
if [ -e "${srcdir}/winesync.conf" ]; then
msg2 "Set the winesync module to be loaded at boot through /etc/modules-load.d"
install -Dm644 "${srcdir}"/winesync.conf "${pkgdir}/etc/modules-load.d/winesync.conf"
fi
# install udev rule for winesync
if [ -e "${srcdir}/winesync.rules" ]; then
msg2 "Installing udev rule for winesync"
install -Dm644 "${srcdir}"/winesync.rules "${pkgdir}/etc/udev/rules.d/winesync.rules"
fi
}
hackheaders() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
provides=("linux-headers=${pkgver}" "${pkgbase}-headers=${pkgver}")
case $_basever in
54|57|58|59|510)
;;
*)
depends=('pahole')
;;
esac
cd "${srcdir}/${_srcpath}"
local builddir="${pkgdir}/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
# add resolve_btfids on 5.16+
if [ $_basever -ge 516 ]; then
install -Dt "$builddir"/tools/bpf/resolve_btfids tools/bpf/resolve_btfids/resolve_btfids
fi
msg2 "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# http://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
msg2 "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
msg2 "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
msg2 "Removing documentation..."
rm -r "$builddir/Documentation"
msg2 "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
msg2 "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
msg2 "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
msg2 "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
if [ "$_STRIP" = "true" ]; then
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
fi
if [ "$_NUKR" = "true" ]; then
rm -rf "$srcdir" # Nuke the entire src folder so it'll get regenerated clean on next build
fi
}
source /dev/stdin <<EOF
package_${pkgbase}() {
hackbase
}
package_${pkgbase}-headers() {
hackheaders
}
EOF

154
linux-tkg/README.md Normal file
View file

@ -0,0 +1,154 @@
## linux-tkg
This repository provides scripts to automatically download, patch and compile the Linux Kernel from [the official Linux git repository](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git), with a selection of patches aiming for better desktop/gaming experience. The provided patches can be enabled/disabled by editing the `customization.cfg` file and/or by following the interactive install script. You can also use your own patches (more information in `customization.cfg` file).
### Important information
- **Non-pacman distros support can be considered experimental. You're invited to report issues you might encounter with it.**
- In `intel_pstate` driver, frequency scaling aggressiveness has been changed with kernel 5.5 which results in stutters and poor performance in low/medium load scenarios (for higher power savings). As a workaround for our gaming needs, we are setting it to passive mode to make use of the `acpi_cpufreq` governor passthrough, keeping full support for turbo frequencies. It's combined with our aggressive ondemand governor by default for good performance on most CPUs while keeping frequency scaling for power savings. In a typical low/medium load scenario (Core i7 9700k, playing Mario Galaxy on Dolphin emulator) intel_pstate in performance mode gives a stuttery 45-50 fps experience, while passive mode + aggressive ondemand offers a locked 60 fps.
- Nvidia's proprietary drivers might need to be patched if they don't support your chosen kernel OOTB: [Frogging-Family nvidia-all](https://github.com/Frogging-Family/nvidia-all) can do that automatically for you.
- Note regarding kernels older than 5.9 on Arch Linux: since the switch to `zstd` compressed `initramfs` by default, you will face an `invalid magic at start of compress` error by default. You can workaround the issue by editing `/etc/mkinitcpio.conf` to uncomment the `COMPRESSION="lz4"` (for example, since that's the best option after zstd) line and regenerating `initramfs` for all kernels with `sudo mkinitpcio -P`
### Customization options
#### Alternative CPU schedulers
[CFS](https://en.wikipedia.org/wiki/Completely_Fair_Scheduler) is the only CPU scheduler available in the "vanilla" kernel sources. Its current implementation doesn't allow for injecting additional schedulers, and requires replacing it. Only one scheduler can be patched in at a time.
Alternative schedulers are available to you in linux-tkg:
- Project C / PDS & BMQ by Alfred Chen: [blog](http://cchalpha.blogspot.com/ ), [code repository](https://gitlab.com/alfredchen/projectc)
- MuQSS by Con Kolivas : [blog](http://ck-hack.blogspot.com/), [code repository](https://github.com/ckolivas/linux)
- CacULE by Hamad Marri: [code repository](https://github.com/hamadmarri/cacule-cpu-scheduler)
- Undead PDS: TkG's port of the pre-Project C "PDS-mq" scheduler by Alfred Chen. While PDS-mq got dropped with kernel 5.1 in favor of its BMQ evolution/rework, it wasn't on par with PDS-mq in gaming. "U" PDS still performs better in some cases than other schedulers, so it's been kept undead.
These alternative schedulers can offer a better performance/latency ratio for gaming and desktop use. The availability of each scheduler depends on the chosen Kernel version: the script will display what's available on a per-version basis.
#### Default tweaks
- Memory management and swapping tweaks
- Scheduling tweaks
- `CFS` tweaks
- Using the ["Cake"](https://www.bufferbloat.net/projects/codel/wiki/CakeTechnical/) network queue management system
- Using `vm.max_map_count=524288` by default
- Cherry-picked patches from [Clear Linux's patchset](https://github.com/clearlinux-pkgs/linux)
#### Optional tweaks
The `customization.cfg` file offers many toggles for extra tweaks:
- `Fsync`, `Futex2` and `Fastsync+winesync` support: can improve the performance in games, needs a patched wine like [wine-tkg](https://github.com/Frogging-Family/wine-tkg-git)
- [Graysky's per-CPU-arch native optimizations](https://github.com/graysky2/kernel_compiler_patch): tunes the compiled code to to a specified CPU
- Compile with GCC or Clang with optional `O2`/`O3` and `LTO` (Clang only) optimizations.
- **Warning regarding DKMS modules and Clang:** `DKMS` will default to using GCC, which will fail to build modules against a Clang-built kernel. This will - for example - break Nvidia drivers. Forcing `DKMS` to use Clang can be done but isn't recommended.
- Using [Modprobed-db](https://github.com/graysky2/modprobed-db)'s database can reduce the compilation time and produce a smaller kernel which will only contain the modules listed in it. **NOT recommended**
- **Warning**: make sure to read [thoroughly about it first](https://wiki.archlinux.org/index.php/Modprobed-db) since it comes with caveats that can lead to an unbootable kernel.
- "Zenify" patchset using core blk, mm and scheduler tweaks from Zen
- [Anbox](https://wiki.archlinux.org/title/Anbox) support (See [Anbox usage](https://github.com/Frogging-Family/linux-tkg#anbox-usage))
- `ZFS` FPU symbols (<5.9)
- Overrides for missing ACS capabilities
- Provide own kernel `.config` file
- ...
#### User patches
To apply your own patch files using the provided scripts, you will need to put them in a `linux5y-tkg-userpatches` folder -- `y` needs to be changed with the kernel version the patch works on, _e.g_ `linux510-tkg-userpatches` -- at the same level as the `PKGBUILD` file, with the `.mypatch` extension. The script will by default ask if you want to apply them, one by one. The option `_user_patches` should be set to `true` in the `customization.cfg` file for this to work.
#### Anbox usage
When enabling the anbox support option, the `binder` and `ashmem` modules are built-in. You don't have to load them. However you'll need to mount binderfs :
```shell
sudo mkdir /dev/binderfs
sudo mount -t binder binder /dev/binderfs
```
To make this persistent, you can create `/etc/tmpfiles.d/anbox.conf` with the following content :
```
d! /dev/binderfs 0755 root root
```
After which you can add the following to your `/etc/fstab` :
```
binder /dev/binderfs binder nofail 0 0
```
Then, if needed, start the anbox service :
```shell
systemctl start anbox-container-manager.service
```
You can also enable the service for it to be auto-started on boot :
```shell
systemctl enable anbox-container-manager.service
```
You're set to run Anbox.
If you prefer automatic setup you can install `anbox-support` from AUR which will take care of everything by itself.
### Install procedure
#### Arch & derivatives
```shell
git clone https://github.com/Frogging-Family/linux-tkg.git
cd linux-tkg
# Optional: edit the "customization.cfg" file
makepkg -si
```
The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`. The options selected at build-time are installed to `/usr/share/doc/$pkgbase/customization.cfg`, where `$pkgbase` is the package name.
#### DEB (Debian, Ubuntu and derivatives) and RPM (Fedora, SUSE and derivatives) based distributions
The interactive `install.sh` script will create, depending on the selected distro, `.deb` or `.rpm` packages, move them in the the subfolder `DEBS` or `RPMS` then prompts to install them with the distro's package manager.
```shell
git clone https://github.com/Frogging-Family/linux-tkg.git
cd linux-tkg
# Optional: edit the "customization.cfg" file
./install.sh install
```
Uninstalling custom kernels installed through the script has to be done
manually. `install.sh` can can help out with some useful information:
```shell
cd path/to/linux-tkg
./install.sh uninstall-help
```
The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`.
#### Void Linux
```shell
git clone -b tkg https://github.com/Hyper-KVM/void-packages/
cd void-packages
./xbps-src binary-bootstrap
# Optional: edit customization.cfg located in srcpkgs/linux-tkg/files
# Optional: add custom userpatches with the ".mypatch" extension to srcpkgs/linux-tkg/files/mypatches
./xbps-src pkg -j$(nproc) linux-tkg
```
If you have to restart the build for any reason, run `./xbps-src clean linux-tkg` first.
#### Generic install
The interactive `install.sh` script can be used to perform a "Generic" install by choosing `Generic` when prompted. It git clones the kernel tree in the `linux-src-git` folder, patches the code and edits a `.config` file in it. The commands to do are the following:
```shell
git clone https://github.com/Frogging-Family/linux-tkg.git
cd linux-tkg
# Optional: edit the "customization.cfg" file
./install.sh install
```
The script will compile the kernel then prompt before doing the following:
```shell
sudo cp -R . /usr/src/linux-tkg-${kernel_flavor}
cd /usr/src/linux-tkg-${kernel_flavor}
sudo make modules_install
sudo make install
sudo dracut --force --hostonly --kver $_kernelname $_dracut_options
sudo grub-mkconfig -o /boot/grub/grub.cfg
```
**Notes:**
- All the needed dependencies to patch, configure, compile or install the kernel are expected to be installed by the user beforehand.
- If you only want the script to patch the sources in `linux-src-git`, you can use `./install.sh config`
- `${kernel_flavor}` is a default naming scheme but can be customized with the variable `_kernel_localversion` in `customization.cfg`.
- `_dracut_options` is a variable that can be changed in `customization.cfg`.
- The script uses Arch's `.config` file as a base. A custom one can be provided through `_configfile` in `customization.cfg`.
- The installed files will not be tracked by your package manager and uninstalling requires manual intervention. `./install.sh uninstall-help` can help with useful information if your install procedure follows the `Generic` approach.
#### Gentoo
The interactive `install.sh` script supports Gentoo by following the same procedure as `Generic`, symlinks the sources folder in `/usr/src/` to `/usr/src/linux`, then offers to do an `emerge @module-rebuild` for convenience
```shell
git clone https://github.com/Frogging-Family/linux-tkg.git
cd linux-tkg
# Optional: edit the "customization.cfg" file
./install.sh install
```
**Notes:**
- The script will prompt for using `llvm-libunwind`, it can only work with the `llvm-libunwind` `USE` flag in `sys-devel/clang` but it is experimental:
- Manual intervention is needed on the `net-fs/samba` EBUILD, see [here](https://bugs.gentoo.org/791349)
- The `-unwind` `USE` flag is needed in `app-emulation/wine*` EBUILDs

271
linux-tkg/customization.cfg Normal file
View file

@ -0,0 +1,271 @@
# linux-TkG config file
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
# It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt
_distro=""
# Kernel Version - Options are "5.4", "5.7", "5.8", "5.9", "5.10", "5.11", "5.12", "5.13", "5.14"
_version=""
#### MISC OPTIONS ####
# External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/linux-tkg.cfg
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
# [Arch specific] Set to anything else than "true" to limit cleanup operations and keep source and files generated during compilation.
# Default is "true".
_NUKR="true"
# [install.sh specific] Git mirror to use to get the kernel sources, possible values are "googlesource.com" and "kernel.org"
_git_mirror="kernel.org"
# Custom compiler root dirs - Leave empty to use system compilers
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH=""
# Custom LLVM compiler root dirs - Leave empty to use system llvm compiler
# Example: CUSTOM_LLVM_PATH="/home/frog/PKGBUILDS/mostlyportable-llvm/llvm-mostlyportable-11.0.0"
CUSTOM_LLVM_PATH=""
# Set to true to bypass makepkg.conf and use all available threads for compilation. False will respect your makepkg.conf options.
_force_all_threads="true"
# Set to true to prevent ccache from being used and set CONFIG_GCC_PLUGINS=y (which needs to be disabled for ccache to work properly)
_noccache="false"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time
_modprobeddb="false"
# modprobed-db database file location
_modprobeddb_db_path=~/.config/modprobed.db
# Set to "1" to call make menuconfig, "2" to call make nconfig, "3" to call make xconfig, before building the kernel. Set to false to disable and skip the prompt.
_menunconfig=""
# Set to true to generate a kernel config fragment from your changes in menuconfig/nconfig. Set to false to disable and skip the prompt.
_diffconfig=""
# Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active.
_diffconfig_name=""
# [install.sh specific] Use tmpfs as a work directory, recommended when RAM >= 32GB to reduce HDD/SSD usage. For more information, see https://wiki.archlinux.org/title/Tmpfs
_use_tmpfs="false"
# [install.sh specific] tmpfs folder path, only used when _use_tmpfs="true".
# Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg"
_tmpfs_path="/tmp"
# [install.sh: Generic and Gentoo specific] Dracut options when generating initramfs
_dracut_options="--lz4"
#### KERNEL OPTIONS ####
# Name of the default config file to use for the kernel
# Default (empty) : "config.x86_64" from the linux-tkg-config/5.y folder.
# "running-kernel" : Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.13", "5.10" and "5.4" .
# To get a complete hardened setup, you have to use "cfs" as _cpusched.
# User provided value : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
_configfile=""
# Determine whether to call "olddefconfig" (default) or "oldconfig" for manual config updating interaction.
_config_updating="olddefconfig"
# Disable some non-module debugging - See PKGBUILD for the list
_debugdisable="false"
# Strip the vmlinux file after build is done. Set to anything other than "true" if you require debug headers. Default is "true"
_STRIP="true"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule" or "cfs" (kernel's default)
_cpusched=""
# Compiler to use - Options are "gcc" or "llvm".
# For advanced users.
_compiler=""
# Force the use of the LLVM Integrated Assembler whether using LLVM, LTO or not.
# Set to "1" to enable.
_llvm_ias=""
# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
# ! This is currently experimental and might result in an unbootable kernel - Not recommended !
# "no: do not enable LTO"
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
_lto_mode=""
# Apply PREEMPT_RT patchset to the kernel.
# ! Only CFS CPU scheduler is compatible with this patchset !
# Set to "1" to enable.
_preempt_rt=""
# Forcibly apply the PREEMPT_RT patchset to the kernel, even when upstream does not officially support the kernel subversion.
# ! This will still not apply when the patch itself or linux-tkg (see _version) do not support the kernel major version - Not recommended !
# Set to "1" to enable.
_preempt_rt_force=""
# CPU sched_yield_type - Choose what sort of yield sched_yield will perform
# For PDS and MuQSS: 0: No yield. (Recommended option for gaming on PDS and MuQSS)
# 1: Yield only to better priority/deadline tasks. (Default - can be unstable with PDS on some platforms)
# 2: Expire timeslice and recalculate deadline. (Usually the slowest option for PDS and MuQSS, not recommended)
# For BMQ: 0: No yield.
# 1: Deboost and requeue task. (Default)
# 2: Set rq skip task.
_sched_yield_type=""
# Round Robin interval is the longest duration two tasks with the same nice level will be delayed for. When CPU time is requested by a task, it receives a time slice equal
# to the rr_interval in addition to a virtual deadline. When using yield_type 2, a low value can help offset the disadvantages of rescheduling a process that has yielded.
# MuQSS default: 6ms"
# PDS default: 4ms"
# BMQ default: 2ms"
# Set to "1" for 2ms, "2" for 4ms, "3" for 6ms, "4" for 8ms, or "default" to keep the chosen scheduler defaults.
_rr_interval=""
# Set to "true" to disable FUNCTION_TRACER/GRAPH_TRACER, lowering overhead but limiting debugging and analyzing of kernel functions - Kernel default is "false"
_ftracedisable="false"
# Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false"
_numadisable="false"
# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true"
_misc_adds="true"
# Set to "0" for periodic ticks, "1" to use CattaRappa mode (enabling full tickless) and "2" for tickless idle only.
# Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
_tickless=""
# Set to "true" to use ACS override patch - https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29 - Kernel default is "false"
_acs_override=""
# Set to "true" to add Bcache filesystem support. You'll have to install bcachefs-tools-git from AUR for utilities - https://bcachefs.org/ - If in doubt, set to "false"
_bcachefs=""
# Set to "true" to enable support for fsync, an experimental replacement for esync found in Valve Proton 4.11+ - https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305
# Can be enabled alongside _futex_waitv on 5.13+ to use it as a fallback for older Proton builds
_fsync="true"
# Set to "true" to enable support for futex2, an experimental interface that can be used by proton-tkg and proton 5.13 experimental through Fsync - Can be enabled alongside fsync to use it as a fallback
# https://gitlab.collabora.com/tonyk/linux/-/tree/futex2-dev
_futex2="true"
# Set to "true" to enable backported patches to add support for the futex_waitv() syscall, a new interface for fsync. It will appear in mainline at Linux 5.16 release and requires a wine/proton with builtin support for it. It's expected to be available in Valve Proton 6.3 stable soon - https://github.com/ValveSoftware/wine/pull/128
# !! Disables futex2 interfaces support !!
# https://github.com/andrealmeid/futex_waitv_patches
_futex_waitv="false"
# Set to "true" to enable support for winesync, an experimental replacement for esync - requires patched wine - https://repo.or.cz/linux/zf.git/shortlog/refs/heads/winesync
# ! Can't be used on multiple kernels installed side-by-side, which will require https://aur.archlinux.org/packages/winesync-dkms/ instead of this option !
_winesync="false"
# Set to "true" to enable Binder and Ashmem, the kernel modules required to use the android emulator Anbox. ! This doesn't apply to 5.4.y !
_anbox=""
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
_zenify="true"
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
_compileroptlevel="1"
# CPU compiler optimizations - Defaults to prompt at kernel config if left empty
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2" "zen3" (zen3 opt support depends on GCC11)
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake"
# Other options :
# - "native_amd" (use compiler autodetection - Selecting your arch manually in the list above is recommended instead of this option)
# - "native_intel" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
# - "generic" (kernel's default - to share the package between machines with different CPU µarch as long as they are x86-64)
#
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_Levels)
# - "generic_v2" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v2
# - "generic_v3" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v3
# - "generic_v4" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v4
_processor_opt=""
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
_irq_threading="false"
# CacULE only - Enable Response Driven Balancer, an experimental load balancer for CacULE
_cacule_rdb="false"
# CacULE only - Load balance time period - Default is 19
# https://github.com/hamadmarri/cacule-cpu-scheduler/blob/master/patches/CacULE/RDB/rdb.patch#L56
_cacule_rdb_interval="19"
# MuQSS and PDS only - SMT (Hyperthreading) aware nice priority and policy support (SMT_NICE) - Kernel default is "true" - You can disable this on non-SMT/HT CPUs for lower overhead
_smt_nice=""
# Trust the CPU manufacturer to initialize Linux's CRNG (RANDOM_TRUST_CPU) - Kernel default is "false"
_random_trust_cpu="false"
# MuQSS only - CPU scheduler runqueue sharing - No sharing (RQ_NONE), SMT (hyperthread) siblings (RQ_SMT), Multicore siblings (RQ_MC), Symmetric Multi-Processing (RQ_SMP), NUMA (RQ_ALL)
# Valid values are "none", "smt", "mc", "mc-llc"(for zen), "smp", "all" - Kernel default is "smt"
_runqueue_sharing=""
# Timer frequency - "100" "500", "750" or "1000" ("2000" can be set for cacule cpu sched, and will fallback to default if set while on another schedulers) - More options available in kernel config prompt when left empty depending on selected cpusched with the default option pointed with a ">"
_timer_freq=""
# Default CPU governor - "performance", "ondemand", "schedutil" or leave empty for default (schedutil)
_default_cpu_gov="ondemand"
# Use an aggressive ondemand governor instead of default ondemand to improve performance on low loads/high core count CPUs while keeping some power efficiency from frequency scaling.
# It still requires you to either set ondemand as default governor or to select it in some way at runtime.
_aggressive_ondemand="true"
# [Advanced] Default TCP IPv4 algorithm to use. Options are: "yeah", "bbr", "cubic", "reno", "vegas" and "westwood". Leave empty if unsure.
# This config option will not be prompted
# Can be changed at runtime with the command line `# echo "$name" > /proc/sys/net/ipv4/tcp_congestion_control` where $name is one of the options above.
# Default (empty) and fallback : cubic
_tcp_cong_alg=""
# You can pass a default set of kernel command line options here - example: "intel_pstate=passive nowatchdog amdgpu.ppfeaturemask=0xfffd7fff mitigations=off"
_custom_commandline="intel_pstate=passive"
#### SPESHUL OPTION ####
# If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# !!! It will also change pkgname - If you don't explicitely need this, don't use it !!!
_custom_pkgbase=""
# [non-Arch specific] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# If left empty, it will use "-tkg-${_cpusched}${_compiler}" where "${_cpusched}" will be replaced by the user chosen scheduler, ${_compiler} will be replaced by "-llvm" if clang is used (nothing for GCC).
_kernel_localversion=""
# Set to "true" to add back missing symbol for AES-NI/AVX support on ZFS - This is a legacy option that can be ignored on 5.10+ kernels - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch
_zfsfix="true"
#### USER PATCHES ####
# community patches - add patches (separated by a space) of your choice by name from the community-patches dir
# example: _community_patches="clear_nack_in_tend_isr.myrevert ffb_regression_fix.mypatch 0008-drm-amd-powerplay-force-the-trim-of-the-mclk-dpm-levels-if-OD-is-enabled.mypatch"
_community_patches=""
# You can use your own patches by putting them in a subfolder called linux<version>-tkg-userpatches (e.g. linux510-tkg-userpatches) next to the PKGBUILD and giving them the .mypatch extension.
# You can also revert patches by putting them in that same folder and giving them the .myrevert extension.
# Also, userpatches variable below must be set to true for the above to work.
_user_patches="true"
# Apply all user patches without confirmation - !!! NOT RECOMMENDED !!!
_user_patches_no_confirm="false"
#### CONFIG FRAGMENTS ####
# You can use your own kernel config fragments by putting them in the same folder as the PKGBUILD and giving them the .myfrag extension.
# Also, the config fragments variable below must be set to true for the above to work.
_config_fragments="true"
# Apply all config fragments without confirmation - !!! NOT RECOMMENDED !!!
_config_fragments_no_confirm="false"

552
linux-tkg/install.sh Executable file
View file

@ -0,0 +1,552 @@
#!/bin/bash
# Stop the script at any ecountered error
set -e
_where=`pwd`
srcdir="$_where"
source customization.cfg
source linux-tkg-config/prepare
msg2() {
echo -e " \033[1;34m->\033[1;0m \033[1;1m$1\033[1;0m" >&2
}
error() {
echo -e " \033[1;31m==> ERROR: $1\033[1;0m" >&2
}
warning() {
echo -e " \033[1;33m==> WARNING: $1\033[1;0m" >&2
}
plain() {
echo -e "$1" >&2
}
_distro_prompt() {
echo "Which linux distribution are you running ?"
echo "if it's not on the list, chose the closest one to it: Fedora/Suse for RPM, Ubuntu/Debian for DEB"
_prompt_from_array "Debian" "Fedora" "Suse" "Ubuntu" "Gentoo" "Generic"
_distro="${_selected_value}"
}
_install_dependencies() {
if [ "$_compiler_name" = "llvm" ]; then
clang_deps="llvm clang lld"
fi
if [ "$_distro" = "Debian" -o "$_distro" = "Ubuntu" ]; then
msg2 "Installing dependencies"
sudo apt install bc bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd ${clang_deps} -y
elif [ "$_distro" = "Fedora" ]; then
msg2 "Installing dependencies"
if [ $(rpm -E %fedora) = "32" ]; then
sudo dnf install bison ccache dwarves elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 ncurses-devel openssl-devel pesign qt5-devel rpm-build rpmdevtools schedtool zstd ${clang_deps} -y
else
sudo dnf install bison ccache dwarves elfutils-devel elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 make ncurses-devel openssl openssl-devel perl-devel perl-generators pesign python3-devel qt5-qtbase-devel rpm-build rpmdevtools schedtool zstd -y ${clang_deps} -y
fi
elif [ "$_distro" = "Suse" ]; then
msg2 "Installing dependencies"
sudo zypper install -y bc bison ccache dwarves elfutils flex gcc-c++ git libXi-devel libelf-devel libqt5-qtbase-common-devel libqt5-qtbase-devel lz4 make ncurses-devel openssl-devel patch pesign rpm-build rpmdevtools schedtool ${clang_deps}
fi
}
_linux_git_branch_checkout() {
cd "$_where"
if [[ -z "$_git_mirror" || ! "$_git_mirror" =~ ^(kernel\.org|googlesource\.com)$ ]]; then
while true; do
echo "Which git repository would you like to clone the linux sources from ?"
echo " 0) kernel.org (official)"
echo " 1) googlesource.com (faster mirror)"
read -p "[0-1]: " _git_repo_index
if [ "$_git_repo_index" = "0" ]; then
_git_mirror="kernel.org"
break
elif [ "$_git_repo_index" = "1" ]; then
_git_mirror="googlesource.com"
break
else
echo "Wrong index."
fi
done
fi
if ! [ -d linux-src-git ]; then
msg2 "First initialization of the linux source code git folder"
mkdir linux-src-git
cd linux-src-git
git init
git remote add kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git remote add googlesource.com https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
else
cd linux-src-git
# Remove "origin" remote if present
if git remote -v | grep -w "origin" ; then
git remote rm origin
fi
if ! git remote -v | grep -w "kernel.org" ; then
git remote add kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
fi
if ! git remote -v | grep -w "googlesource.com" ; then
git remote add googlesource.com https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
fi
msg2 "Current branch: $(git branch | grep "\*")"
msg2 "Reseting files to their original state"
git reset --hard HEAD
git clean -f -d -x
fi
if [[ "$_sub" = rc* ]]; then
msg2 "Switching to master branch for RC Kernel"
if ! git branch --list | grep "master-${_git_mirror}" ; then
msg2 "master branch doesn't locally exist, shallow cloning..."
git remote set-branches --add kernel.org master
git remote set-branches --add googlesource.com master
git fetch --depth=1 $_git_mirror master
git fetch --depth 1 $_git_mirror tag "v${_basekernel}-${_sub}"
git checkout -b master-${_git_mirror} ${_git_mirror}/master
else
msg2 "master branch exists locally, updating..."
git checkout master-${_git_mirror}
git fetch --depth 1 $_git_mirror tag "v${_basekernel}-${_sub}"
git reset --hard ${_git_mirror}/master
fi
msg2 "Checking out latest RC tag: v${_basekernel}-${_sub}"
git checkout "v${_basekernel}-${_sub}"
else
# define kernel tag so we treat the 0 subver properly
_kernel_tag="v${_basekernel}.${_sub}"
if [ "$_sub" = "0" ];then
_kernel_tag="v${_basekernel}"
fi
msg2 "Switching to linux-${_basekernel}.y"
if ! git branch --list | grep -w "linux-${_basekernel}-${_git_mirror}" ; then
msg2 "${_basekernel}.y branch doesn't locally exist, shallow cloning..."
git remote set-branches --add kernel.org linux-${_basekernel}.y
git remote set-branches --add googlesource.com linux-${_basekernel}.y
git fetch --depth=1 $_git_mirror linux-${_basekernel}.y
git fetch --depth=1 $_git_mirror tag "${_kernel_tag}"
git checkout -b linux-${_basekernel}-${_git_mirror} ${_git_mirror}/linux-${_basekernel}.y
else
msg2 "${_basekernel}.y branch exists locally, updating..."
git checkout linux-${_basekernel}-${_git_mirror}
git fetch --depth 1 $_git_mirror tag "${_kernel_tag}"
git reset --hard ${_git_mirror}/linux-${_basekernel}.y
fi
msg2 "Checking out latest release: ${_kernel_tag}"
git checkout "${_kernel_tag}"
fi
}
if [ "$1" != "install" ] && [ "$1" != "config" ] && [ "$1" != "uninstall-help" ]; then
msg2 "Argument not recognised, options are:
- config : interactive script that shallow clones the linux 5.x.y git tree into the folder linux-src-git, then applies extra patches and prepares the .config file
by copying the one from the currently running linux system and updates it.
- install : does the config step, proceeds to compile, then prompts to install
- 'DEB' distros: it creates .deb packages that will be installed then stored in the DEBS folder.
- 'RPM' distros: it creates .rpm packages that will be installed then stored in the RPMS folder.
- 'Generic' distro: it uses 'make modules_install' and 'make install', uses 'dracut' to create an initramfs, then updates grub's boot entry.
- uninstall-help : [RPM and DEB based distros only], lists the installed kernels in this system, then gives hints on how to uninstall them manually."
exit 0
fi
# Load external configuration file if present. Available variable values will overwrite customization.cfg ones.
if [ -e "$_EXT_CONFIG_PATH" ]; then
msg2 "External configuration file $_EXT_CONFIG_PATH will be used and will override customization.cfg values."
source "$_EXT_CONFIG_PATH"
fi
if [ "$1" = "install" ] || [ "$1" = "config" ]; then
if [ -z "$_distro" ] && [ "$1" = "install" ]; then
_distro_prompt
fi
if [ "$1" = "config" ]; then
_distro="Unknown"
fi
# Run init script that is also run in PKGBUILD, it will define some env vars that we will use
_tkg_initscript
if [[ "${_compiler}" = "llvm" && "${_distro}" =~ ^(Generic|Gentoo)$ ]]; then
read -p "Replace \"libunwind\" with \"llvm-libunwind\" ? Y/[n]:" _libunwind_replace
if [[ "${_libunwind_replace}" =~ ^(y|yes|Yes|Y)$ ]]; then
export LDFLAGS_MODULE="-unwindlib=libunwind"
export HOSTLDFLAGS="-unwindlib=libunwind"
fi
fi
if [[ "$1" = "install" && ! "$_distro" =~ ^(Ubuntu|Debian|Fedora|Suse|Gentoo|Generic)$ ]]; then
msg2 "Variable \"_distro\" in \"customization.cfg\" has been set to an unkown value. Prompting..."
_distro_prompt
fi
# Install the needed dependencies if the user wants to install the kernel
# Not needed if the user asks for install.sh config
if [ "$1" == "install" ]; then
_install_dependencies
fi
# Force prepare script to avoid Arch specific commands if the user is using `config`
if [ "$1" = "config" ]; then
_distro=""
fi