use git for kernel sources & improved CI workflow (#591)

* prepare: auto-fetch latest versions + harmonize kernel version var

- Latest version is fetched from git: this prepares the road to
  moving to git cloning and fetching
- Introduce the $_kver variable that follows a three digit
  convention (e.g. '600', '519', '504') to enable comparing
  simply between kernel versions

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* All distros: use git to fetch/update kernel sources

- Force git cloning `linux-tkg` so the patches and config
  files are automatically checksummed
- Arch: remove all the sha256sums and source files and automatically
  populate them on script run.
- Move git cloning/fetching script to 'prepare' script file

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* accept customization.cfg vars as env vars

This makes CLI way easier by enabling e.g.
_version="5.19" makepkg or
_version="5.19" ./install.sh install

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: better handle git remotes

now there's a dictionary that gives the list of remotes

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: add default git remote if not set or not recognized

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* customization.cfg: allow specific kernel versions

e.g. "6.0-rc4" or "5.10.51"

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* ci: improved workflow

1. Check periodically for newer kernels with git
2. If a newer kernel exists, with respect to l
   latest Github release:
   1. Build for cfs, pds, bmq for Arch
   2. Make release

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
This commit is contained in:
Adel Kara Slimane
2022-09-22 16:17:05 +02:00
committed by GitHub
parent cb4c79a2fb
commit 59afa4083c
12 changed files with 518 additions and 1334 deletions

20
.github/get_latest_kver.sh vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
msg2() {
echo -e " \033[1;34m->\033[1;0m \033[1;1m$1\033[1;0m" >&2
}
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "$SCRIPT_DIR/../linux-tkg-config/prepare"
trap - EXIT
# needed to call _set_kver_internal_vars
_where="$SCRIPT_DIR/.."
_kernel_git_tag="${_kver_latest_tags_map[${_current_kernels[0]}]}"
[[ "$_kernel_git_tag" == *rc* ]] && _kernel_git_tag="${_kver_latest_tags_map[${_current_kernels[1]}]}"
_latest_kernel="$_kernel_git_tag"
echo "$_latest_kernel" > "$SCRIPT_DIR/latest-kernel"

View File

@@ -1,21 +0,0 @@
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

View File

@@ -1,28 +0,0 @@
name: Arch Linux BMQ current CI
on: [workflow_dispatch, push]
jobs:
build:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: Compile
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
sed -i 's/noccache="false"/noccache="true"/' customization.cfg
sed -i 's/cpusched=""/cpusched="bmq"/' customization.cfg
sed -i 's/anbox=""/anbox="true"/' customization.cfg
sed -i 's/processor_opt=""/processor_opt="generic"/' customization.cfg
su user -c "yes ''|PKGDEST=/tmp/linux-tkg makepkg --noconfirm -s"
- name: Archive the artifacts
uses: actions/upload-artifact@v2
with:
name: linux-tkg-build
path: /tmp/linux-tkg

View File

@@ -0,0 +1,220 @@
name: Latest Kernel for archlinux
on:
schedule:
- cron: '17 */12 * * *' # “At minute 17 past every 12th hour.”
workflow_dispatch:
env:
_anbox: "true"
_processor_opt: "generic"
PKGDEST: "/tmp/linux-tkg"
_debugdisable: "true"
# _modprobeddb: "true"
# _modprobeddb_db_path: ${{ github.workspace }}/modprobed.db
jobs:
check-for-newer-kernel:
runs-on: ubuntu-latest
outputs:
new_kernel: ${{ steps.check_for_new_kernel.outputs.new_kernel }}
latest_kernel: ${{ steps.check_for_new_kernel.outputs.latest_kernel }}
steps:
- name: Checkount linux-tkg
uses: actions/checkout@v3.0.2
# Get latest release in repo, so we compare its version
# with the latest kernel available so far
- name: Get latest release
id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
# it fails when there's no release
continue-on-error: true
- name: Get latest kernel version
id: check_for_new_kernel
run: |
./.github/get_latest_kver.sh
latest_kernel="$(cat .github/latest-kernel)"
echo "::set-output name=latest_kernel::$latest_kernel"
new_kernel=0
[[ "$latest_kernel" != "$latest_release" ]] || new_kernel=$?
echo "::set-output name=new_kernel::$new_kernel"
env:
latest_release: ${{ steps.latest_release.outputs.release }}
build-pds:
env:
_cpusched: "pds"
# The following code is repeated in each build job
# Can be factorized once YAML anchors get implemented in Github
# See https://github.com/actions/runner/issues/1182 for status
runs-on: ubuntu-latest
container: archlinux:latest
needs: ["check-for-newer-kernel"]
# the == 0 test is for "true" because it tests the exit code of a bash test
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
steps:
# We need to install git so the checkout is done with it
- name: Install git
run: pacman -Syu --noconfirm git
- name: Checkount linux-tkg
uses: actions/checkout@v3.0.2
# 1. Install deps needed for building and sudo
# 2. create a user "user" and give it passwordless sudo
# and necessary permissions
# because makepkg absolutely refuses to run as root
- name: Prepare for makepkg
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
# - name: "[debug] make dummy modprobed-db file for faster ci"
# run: |
# touch "${_modprobeddb_db_path}"
# echo "${_modprobeddb_db_path}"
- name: Compile Kernel
run: su user -c "yes '' | makepkg --noconfirm -s"
# run: |
# mkdir -p "$PKGDEST"
# echo "test" > "$PKGDEST"/linux-$_cpusched.pkg.tar.zst
- uses: actions/upload-artifact@v3
with:
name: kernel-packages-${{ env._cpusched }}
path: ${{ env.PKGDEST }}/linux*.pkg.tar.zst
build-cfs:
env:
_cpusched: "cfs"
runs-on: ubuntu-latest
container: archlinux:latest
needs: ["check-for-newer-kernel"]
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
steps:
# We need to install git so the checkout is done with it
- name: Install git
run: pacman -Syu --noconfirm git
- name: Checkount linux-tkg
uses: actions/checkout@v3.0.2
# 1. Install deps needed for building and sudo
# 2. create a user "user" and give it passwordless sudo
# and necessary permissions
# because makepkg absolutely refuses to run as root
- name: Prepare for makepkg
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
# - name: "[debug] make dummy modprobed-db file for faster ci"
# run: |
# touch "${_modprobeddb_db_path}"
# echo "${_modprobeddb_db_path}"
- name: Compile Kernel
run: su user -c "yes '' | makepkg --noconfirm -s"
# run: |
# mkdir -p "$PKGDEST"
# echo "test" > "$PKGDEST"/linux-$_cpusched.pkg.tar.zst
- uses: actions/upload-artifact@v3
with:
name: kernel-packages-${{ env._cpusched }}
path: ${{ env.PKGDEST }}/linux*.pkg.tar.zst
build-bmq:
env:
_cpusched: "bmq"
runs-on: ubuntu-latest
container: archlinux:latest
needs: ["check-for-newer-kernel"]
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
steps:
# We need to install git so the checkout is done with it
- name: Install git
run: pacman -Syu --noconfirm git
- name: Checkount linux-tkg
uses: actions/checkout@v3.0.2
# 1. Install deps needed for building and sudo
# 2. create a user "user" and give it passwordless sudo
# and necessary permissions
# because makepkg absolutely refuses to run as root
- name: Prepare for makepkg
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
# - name: "[debug] make dummy modprobed-db file for faster ci"
# run: |
# touch "${_modprobeddb_db_path}"
# echo "${_modprobeddb_db_path}"
- name: Compile Kernel
run: su user -c "yes '' | makepkg --noconfirm -s"
# run: |
# mkdir -p "$PKGDEST"
# echo "test" > "$PKGDEST"/linux-$_cpusched.pkg.tar.zst
- uses: actions/upload-artifact@v3
with:
name: kernel-packages-${{ env._cpusched }}
path: ${{ env.PKGDEST }}/linux*.pkg.tar.zst
make-release:
runs-on: ubuntu-latest
needs: [check-for-newer-kernel, "build-pds", "build-cfs", "build-bmq"]
steps:
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
path: ${{ env.PKGDEST }}
- name: Make new release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ needs.check-for-newer-kernel.outputs.latest_kernel }}
prerelease: false
title: "${{ needs.check-for-newer-kernel.outputs.latest_kernel }}"
files: |
${{ env.PKGDEST }}/kernel-packages-*/*

View File

@@ -1,28 +0,0 @@
name: Arch Linux CFS current CI
on: [workflow_dispatch, push]
jobs:
build:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: Compile
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
sed -i 's/noccache="false"/noccache="true"/' customization.cfg
sed -i 's/cpusched=""/cpusched="cfs"/' customization.cfg
sed -i 's/anbox=""/anbox="true"/' customization.cfg
sed -i 's/processor_opt=""/processor_opt="generic"/' customization.cfg
su user -c "yes ''|PKGDEST=/tmp/linux-tkg makepkg --noconfirm -s"
- name: Archive the artifacts
uses: actions/upload-artifact@v2
with:
name: linux-tkg-build
path: /tmp/linux-tkg

View File

@@ -1,28 +0,0 @@
name: Arch Linux PDS current CI
on: [workflow_dispatch, push]
jobs:
build:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: Compile
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
sed -i 's/noccache="false"/noccache="true"/' customization.cfg
sed -i 's/cpusched=""/cpusched="pds"/' customization.cfg
sed -i 's/anbox=""/anbox="true"/' customization.cfg
sed -i 's/processor_opt=""/processor_opt="generic"/' customization.cfg
su user -c "yes ''|PKGDEST=/tmp/linux-tkg makepkg --noconfirm -s"
- name: Archive the artifacts
uses: actions/upload-artifact@v2
with:
name: linux-tkg-build
path: /tmp/linux-tkg

849
PKGBUILD
View File

@@ -28,6 +28,8 @@ _where="$PWD" # track basedir as different Arch based distros are moving srcdir
_ispkgbuild="true"
_distro="Arch"
declare -p -x > current_env
source "$_where"/customization.cfg # load default configuration from file
source "$_where"/linux-tkg-config/prepare
@@ -36,6 +38,8 @@ if [ -e "$_EXT_CONFIG_PATH" ]; then
source "$_EXT_CONFIG_PATH"
fi
source current_env
# Make sure we're in a clean state
if [ ! -e "$_where"/BIG_UGLY_FROGMINER ]; then
_tkg_initscript
@@ -43,14 +47,7 @@ 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
_srcpath="linux-src-git"
if [ -n "$_custom_pkgbase" ]; then
pkgbase="${_custom_pkgbase}"
@@ -71,835 +68,10 @@ fi
optdepends=('schedtool')
options=('!strip' 'docs')
case $_basever in
54)
source=("$kernel_site"
"$patch_site"
'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
0012-misc-additions.patch
)
sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491'
'c99bffd3536fe367f60fd83d243695ce015b694e9837d958eb68a789fc02c695'
'c6d78ceb7ef7251b24baa4aac6dce6bb275ac5639785f9dcd4345a8c4fd44c2a'
'1f4a20d6eaaa0d969af93152a65191492400c6aa838fc1c290b0dd29bb6019d8'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
'886ed1d648938d776a795d289af0c83207c1c70c00cd9d79560951d0bc951e25'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'9420cf1a04740956008e535725ae38a2f759188841be3776447a4eb635fa5158'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb'
'f3dbaa88e8a78cdfe02c0c9a77e67afd4af2c97d432fca37fbe4ef8d5121996f'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'eac7e5d6201528e64f4bdf5e286c842511e1afc52e1518dc8e7d11932bbe0a99'
'29f7dc8930426b9cf86742ca80623b96b97c1d92a4436ba4e2adcde5200b4c29'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'2d9260b80b43bbd605cf420d6bd53aa7262103dfd77196ba590ece5600b6dc0d'
'3832f828a9f402b153fc9a6829c5a4eaf6091804bcda3a0423c8e1b57e26420d'
'c98befca824f761260466410a1dd94d2b9be6f7211b5daefcfc0f3a102bbdc81'
'aeb31404c26ee898d007b1f66cb9572c9884ad8eca14edc4587d68f6cba6de46'
'87f8ba249620628ad493ed5d65da9811bf635411a70aaa49ed1d97438ebf77be')
;;
57)
source=("$kernel_site"
"$patch_site"
'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'
'357a0db541f7de924ed89c21f5a6f3de4889b134c5d05d5e32ccd234bd81eedf'
'15ce09447b7e9b28425c1df5961c955378f2829e4115037337eef347b1db3d9d'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
'bbf332201423888257c9687bee06916a5dbbac2194f9df5b4126100c40e48d16'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb'
'5464597f189781d6a2aa45b1855d6bae0f30dd74a27b1260645614a519c91b25'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
'55be5e4c6254da0a9d34bbfac807a70d8b58b3f7b2ec852026195c4db5e263e2'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204'
'd2214504c43f9d297a8ef68dffc198143bfebf85614b71637a71978d7a86bd78'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'965a517a283f265a012545fbb5cc9e516efc9f6166d2aa1baf7293a32a1086b7'
'b2a2ae866fc3f1093f67e69ba59738827e336b8f800fb0487599127f7f3ef881'
'6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d')
;;
58)
source=("$kernel_site"
"$patch_site"
'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'
'f4754fbe2619ef321e49a7b560fad058b2459d17cff0b90e839cb475f46e8b63'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'b9ebe0ae69bc2b2091d6bfcf6c7875a87ea7969fcfa4e306c48d47a60f9ef4d6'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
'31b172eb6a0c635a8d64cc1c2e8181d9f928ee991bd44f6e556d1713b815f8d9'
'87bca363416655bc865fcb2cc0d1532cb010a61d9b9f625e3c15cd12eeee3a59'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204'
'e73c3a8a040a35eb48d1e0ce4f66dd6e6f69fd10ee5b1acf3a0334cbf7ffb0c4'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'965a517a283f265a012545fbb5cc9e516efc9f6166d2aa1baf7293a32a1086b7'
'f5dbff4833a2e3ca94c202e5197894d5f1006c689ff149355353e77d2e17c943')
;;
59)
source=("$kernel_site"
$patch_site
"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'
'ce2711b9d628e71af62706b830c2f259a43ad1e614871dd90bcb99d8709e1dab'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'902885088ed0748e40372e04a8ec11adf5acf3d935abffc6737dd9e6ec13bb93'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'45a9ab99215ab3313be6e66e073d29154aac55bc58975a4df2dad116c918d27c'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'f9f5f0a3a1d6c5233b9d7a4afe8ed99be97c4ff00a80bde4017d117c7d5f98ed'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'14a261f1940a2b21b6b14df7391fc2c6274694bcfabfac3d0e985a67285dbfe7'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'0d5fe3a9050536fe431564b221badb85af7ff57b330e3978ae90d21989fcad2d')
;;
510)
source=("$kernel_site"
"$patch_site"
'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'
'c6b9febd27c790f6436c44f1445f901e4a4c303b005a72a2f9ca9d2c713a3334'
'd4de0b21bded28eba4826640397f5ef1d6d1c72c4671d9d0f6861ed6b8c6c026'
'eb1da1a028a1c967222b5bdac1db2b2c4d8285bafd714892f6fc821c10416341'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'3c110f4c0dba0a3e605e3bb4506c5f03f36f17100716c71fc98e4a71eeebfa45'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'e00096244e5cddaa5500d08b5f692fd3f25be9401dfa3b0fc624625ff2f5e198'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'd29895468e2113538db457282e6d7a8ca6afec7c4bac5d98811f70fe1cdc333b'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'f46ed0f026490b11b6a6cfb21e78cd253f0d7c308dc5a34e93971659a4eaa19e'
'0b66da5f767c66a40a36e8deaa2e384a20421328dc7cb454221c2dd44fee8a0b'
'377d0eb1df251808b8280d1aec598b4a2986f7d167306cdec9048c337cdcf2e1'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'b9da77449157c36193d4dc8a43f4cebe7f13d9f6bbcdadbcbf1e61da1f5f887e'
'105f51e904d80f63c1421203e093b612fc724edefd3e388b64f8d371c0b3a842'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24')
;;
511)
source=("$kernel_site"
"$patch_site"
'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'
'fc08ac33e3bc47ed0ee595a2e4b84bc45b02682b383db6acfe281792e88f6231'
'837ad05b68d0443580f78f5eb316db46c6b67abfefa66c22b6cb94f4915a52ba'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'1ac97da07e72ec7e2b0923d32daacacfaa632a44c714d6942d9f143fe239e1b5'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'2bbbac963b6ca44ef3f8a71ec7c5cad7d66df860869a73059087ee236775970a'
'2f7e24e70ed1f5561155a1b5e5aab9927aea317db0500e8cf83cd059807f9c7e'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'31b428c464905e44ed61cdcd1f42b4ec157ebe5a44cb5b608c4c99b466df66ba'
'4169fffe69eb5216831e545cb7439fa8e3fc09066757d7d4c496fe024fc373ee'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'073e7b8ab48aa9abdb5cedb5c729a2f624275ebdbe1769476231c9e712145496'
'0b66da5f767c66a40a36e8deaa2e384a20421328dc7cb454221c2dd44fee8a0b'
'6c831d7cdfe4897656b76c4ec60e0a18d6f3618f79c402ebc3bf4453a6616319'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'5cd64937e3a517f49f4311c47bd692eb8e117f09d655cd456e03366373ba8060'
'9e7b1663f5247f15e883ce04e1dc2b18164aa19ebe47f75967be09659eff1101'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
512)
source=("$kernel_site"
"$patch_site"
'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'
'0a7c40402715f8817c4f40173ca1fa8af84c56f7658be281e5424319000370b6'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'a447e697cb744283e3e89f300c8a8bda04a9c8108f03677fb48bf9675c992cbd'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'3cdc90f272465c2edb6bac8a3c90f2e098ba8ca73d27e4c0cadf70b7e87641ea'
'c8b0f2a1ef84b192c67b61c5a60426a640d5a83ac55a736929f0c4e6ec7b85f8'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'b302ba6c5bbe8ed19b20207505d513208fae1e678cf4d8e7ac0b154e5fe3f456'
'540dda70cccc0cb23f0d0311f9947209cfe377070620e5fca69f66cc1efe817e'
'27f284aa9e0365224ecf1534619ac14d5ffe8a6941ac20502e2c370d272542c5'
'c6c5bcfac976c2304bdd13b80f8ad0329e5e53a6d9e9d130115204ea09fe2848'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'6325b3d6972725e41adbaf5e2db19a040dbf0856046cecc1c4d6786a064d04ff'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
513)
source=("$kernel_site"
"$patch_site"
'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'
'06ad99b810943f7ce4650fe656156f4b40d11fabd9b89e2b1beff06c46836efc'
'49a34dfc8ee7663a8a20c614f086e16ec70e8822db27a91050fd6ffebf87a650'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'ef48eea194c1c101de0461572eaf311f232fee55c155c52904b20085a92db680'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
'de718ecea652a74e1d821459397d3dafaa3de1a7dba3df51ba9fc42b8645c3e2'
'12d7c7457d4605ba00cb888383779e591a58e701643d763d8fe05dcdec3e9830'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'89d837bfea3515504b1c99fc881ebdc4f15e2999558127a263e795fc69408a39'
'9ec679871cba674cf876ba836cde969296ae5034bcc10e1ec39b372e6e07aab0'
'0e3473c19e5513bee886f03cf2476f746d8b5b2fbc0841c9d60d609b16a97c14'
'f5ed3062543074472172e30f3db4baa1e292b50e11c1c19e2511b71b28ac7e48'
'27f284aa9e0365224ecf1534619ac14d5ffe8a6941ac20502e2c370d272542c5'
'b0004bc559653fd8719b8adcfa1ead1075db3425d30d7d7adb8cbc6296386a8f'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'ccf925b6326a8cf63d28c00a7645a0fa120608bfcf5dabb77a4522f249aa306d'
'ab6471e61fad017ef1a5c3544a3c24029f81d7ad5bbdebbf98691ecfd051d4c4'
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24'
'b1c6599d0e1ac9b66898d652ed99dae3fb8676d840a43ffa920a78d96e0521be'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
514)
source=("$kernel_site"
"$patch_site"
'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'
'f5d3635520c9eb9519629f6df0d9a58091ed4b1ea4ddb1acd5caf5822d91a060'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'2ed4f07f972f1a5c42fa7746f486a28c28a568404ca0caf7ae9416acbae5555a'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'aa67e81a27d9062e463594acb91eca6dd13388f23cbe53ca56298f9dba61cc10'
'efe5e21706fdf64559ead866c85a5d88c5c3f743d814410df3810ca61cc5b966'
'5742277f41f22bf29fa9742562946b8a01377f8a22adb42ceed3607541c1d5b6'
'5bd2e13d3c70abe4efefa1c4374a5d3801fece087f093ce6a8ca5b8466dc1f20'
'27f284aa9e0365224ecf1534619ac14d5ffe8a6941ac20502e2c370d272542c5'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'1565038792869f1e99dc321b57d00dbfa14ab824a995f39c4d3effceab0b5415'
'80a965ee61357c8f0a697eb71225976b7e352d4e54d9e576d3a1779d2a06714a'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
515)
source=("$kernel_site"
"$patch_site"
'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'
'dacc5e68febe753286fc9eb87a8d6150fc67a33b3400dfd663f452c0ffb99c56'
'd77f79b817bd0ac79bd2f5a929734236a4745534d7757ddf874719932bd24957'
'6e3ef6bc4779ae3b7154642147d5ab3ece6e38e3e08bdb30f86d89d2b4855fa9'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'd96a448d5d42c1836b28478930e085624f2341fc4001bd10acd84838d49f2d1d'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'0b73ec751187d899a4c347b9287c7a76d06523abaeca985a76d0f7ae167d4b1f'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'6c4f0099896f69e56ebd8c9eac266ac8ad993acecd50945e0e84ef6f95f9ddca'
'c8f7c50d9b1418ba22b5ca735c47111a162be416109714d26a674162e5b2cb97'
'63a2ddf7ca9d3922f4eac3ac66bc37ffb10ad8b18b3e596832d3faa66b93dfa6'
'00b452910c68fba6dcebbf6c064beff565b2c60ac07a9c1a3375b8bf0354911f'
'980be21d8b6a014752ea094fd996da3c8a25f5c38020e0d704b7f9d3181a5d9e'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'978b197efa56781a1d5651a3649c3d8b926d55748b4b9063788dfe1a861fc1bc'
'5e2e0f24dbf95502db9990d8ed6e50cfa3db92d534d8add264efc0ca223b698b'
'4499b55ed1c0b9527feba77160f6f244c93dfed417d04e0ba88a077a8140b281'
'434e4707efc1bc3919597c87d44fa537f7563ae04236479bbf1adb5f410ab69d'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
516)
source=("$kernel_site"
"$patch_site"
'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.16-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.16-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=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
'619cd0e39db62b581107cd71dbc1fc52654f94d4306fd02e806ab599f06d0cd8'
'dc727da4e909d5bccb6a97ef0d35c38370f1465262fe696bd93ad51df414f8c6'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'a22506f55cdf4208a842c8e32c5330aa06d672642ff936236f0a87f0dc108448'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'4a52785cca539b37c1250e6e6776dda13dc43bb6ec8991b7c1ed3bff42e289d7'
'44a46815d26170e43dd5f21e352081c8e5a4816512abb86353a1d90311fffcde'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'43d72770c784c017af6dd8bb5bbb31d9c5e7ec992c860a68222dfb45ba288f7b'
#'decd4a55c0d47b1eb808733490cdfea1207a2022d46f06d04a3cc60fdcb3f32c'
'1aa0a172e1e27fb8171053f3047dcf4a61bd2eda5ea18f02b2bb391741a69887'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
517)
source=("$kernel_site"
"$patch_site"
'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.17-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=('555fef61dddb591a83d62dd04e252792f9af4ba9ef14683f64840e46fa20b1b1'
'2c249d6ecebe7aa2fd5ac8bde8a313a033659ad1fbeeab1d04659e4d814b7bb9'
'7ae1ad6d552290aec9701167e705417cebcc861a3de527b4c9f234ece248f334'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'a22506f55cdf4208a842c8e32c5330aa06d672642ff936236f0a87f0dc108448'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
#'4503034f211de3013f8500106da753e5d1bcac14bc5576671cbe6f574805b3cd'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'4a52785cca539b37c1250e6e6776dda13dc43bb6ec8991b7c1ed3bff42e289d7'
'ea4902ab59798481dcf9ecb04570c347dd8eff1179105c45563649c7a901da3f'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'ba65acd3f1168a7479e3665b5b13f7d1066e713eadb5a0e5110423ba97d7ccd3'
#'decd4a55c0d47b1eb808733490cdfea1207a2022d46f06d04a3cc60fdcb3f32c'
'1aa0a172e1e27fb8171053f3047dcf4a61bd2eda5ea18f02b2bb391741a69887'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
518)
source=("$kernel_site"
"$patch_site"
'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.18-fsync1_via_futex_waitv.patch
0007-v5.18-winesync.patch
0008-5.18-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.18-r2.patch
0010-lru_5.18.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=('51f3f1684a896e797182a0907299cc1f0ff5e5b51dd9a55478ae63a409855cee'
'e158d40d8dbebc6bd11002122b8cd56e16576951ab0e0ef329994a378f63ad8a'
'04a8186c95f5abc9febd168c68ff078907a24e9634c811319961c81cc8602c2c'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'0b546da707b274d5c3722e0e1cd641567db401b7acb0b3bf6e422784b12aad76'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'057631ecc148b41e0037d200a69cbbfbed8cdcf27eede3d8cd6936566b6ebc68'
'12a241794cab82b851a11f4f5aea1e96e75d998935ed5f723040bed543eb9359'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'7f6b631bb02714904c3715e0f1c0d558e32b06d7a533e269276fb80777356623'
'55f633da855b9346bfcfc5204f109eca6d0d7532ad42dec131ea0d64a0d4fd08'
'428517fbcb161a640b53782000c16f797c2ad27cf2758e7e56133fc62d2d113b'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
519)
source=("$kernel_site"
"$patch_site"
'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.19-fsync1_via_futex_waitv.patch
0007-v5.19-winesync.patch
0008-5.19-bcachefs.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
0009-prjc_v5.19-r0.patch
0010-lru_5.19.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=('ff240c579b9ee1affc318917de07394fc1c3bb49dac25ec1287370c2e15005a8'
'f3dce055bbe07f2301a738531c9c1a43407a37be403e499dc277960c85ee52e2'
'f170eda023a56db8cdcad4b83da5911b7b919bbd25084f729d37f1e6142557ca'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'391bf85333326c8c7052dcbcf9b247632b728572ce9cf9ef86ae8352dee7d3e2'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'd2255d8f60d90d1c1d76ab7808d4a04844b6a1b3c83390ac44de0e4b721c3577'
'3aaf65ddf916bfda626ea441514cbebc3d5597caf1a203180aad5319005c4259'
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
'fbf28a5bcf0ce0443ac2a621796ff2c2b1ade06b263d8f01356fae9a3035c585'
'970819d5a6eca65b9eeb7c459a8bd487600a10b2b02fed323f7456f483c7d5ce'
'213ecf1ba59dc87ed1844c3473d575b85ffe3a567f86735e8c6239c92dbbb493'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
;;
60)
source=("$kernel_site"
#"$patch_site"
'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-v6.0-fsync1_via_futex_waitv.patch
0007-v6.0-winesync.patch
#0008-6.0-bcachefs.patch
#0009-glitched-ondemand-bmq.patch
#0009-glitched-bmq.patch
#0009-prjc_v6.0-r0.patch
0010-lru_6.0.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
# O3
0013-optimize_harder_O3.patch
)
sha256sums=('1af65b4cb6e12a35157741a0656cc23b941c62f5b3c7bed2fcfb8b3ab1240254'
#upcoming_kernel_patch_sha256
'69cba79d1ba049459d4fb2e0494320fef82d4ecbaca2e0959d09d1e50e69f003'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'35a7cde86fb94939c0f25a62b8c47f3de0dbd3c65f876f460b263181b3e92fc0'
'184eb7f886c38f1259dec62d4267a19f43d6b51165055743d3339348a7d9c58c'
'5efd40c392ece498d2d43d5443e6537c2d9ef7cf9820d5ce80b6577fc5d1a4b2'
'e5ea0bb25ee294c655ac3cc30e1eea497799826108fbfb4ef3258c676c1e8a12'
#'fca63d15ca4502aebd73e76d7499b243d2c03db71ff5ab0bf5cf268b2e576320'
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
'9df628fd530950e37d31da854cb314d536f33c83935adf5c47e71266a55f7004'
'73f6a99b785e736c347ab4a7ed8219a90b719ecca048851ca5e40c858c90dfa0'
#'829631f803f11579972aa19f3f7f2ae11b0e380c01745a05776dd02b8e6c8855'
#'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
#'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
#'b046cd6bff73c0210465f4ff0879d99c54fc1413f1c2e8e5298439e4067ac60a'
'2ab9ea2d3ef43cfb5cf680ee2262f5671fd5ea980921f33abf2208f9892e9009'
'213ecf1ba59dc87ed1844c3473d575b85ffe3a567f86735e8c6239c92dbbb493'
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6'
'8c3875e4935ecf258131f8da4ac819e9fb57439efff31549c0f11693c3601544')
;;
esac
for f in $_where/linux-tkg-config/$_basekernel/* $_where/linux-tkg-patches/$_basekernel/*; do
source+=( "$f" )
sha256sums+=( "SKIP" )
done
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -909,9 +81,12 @@ 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
ln -s "${_where}/linux-src-git" "${srcdir}" # workaround, this doesn't respect tmpfs choice
cd "${srcdir}/${_srcpath}"
source "${_where}/current_env"
_tkg_srcprep
}

View File

@@ -84,6 +84,8 @@ If you prefer automatic setup you can install `anbox-support` from AUR which wil
### Install procedure
For all the supported linux distributions, `linux-tkg` has to be cloned with `git`. Since it keeps a clone of the kernel's sources within (`linux-src-git`, created during the first build after a fresh clone), it is recommended to keep the cloned `linux-tkg` folder and simply update it with `git pull`, the install script does the necessary cleanup at every run.
#### Arch & derivatives
```shell
git clone https://github.com/Frogging-Family/linux-tkg.git
@@ -97,7 +99,7 @@ The script will use a slightly modified Arch config from the `linux-tkg-config`
#### DEB (Debian, Ubuntu and derivatives) and RPM (Fedora, SUSE and derivatives) based distributions
**Important notes:**
**Important notes:**
- Some issues have been reported by both Fedora (see https://github.com/Frogging-Family/linux-tkg/issues/383) and Ubuntu (see https://github.com/Frogging-Family/linux-tkg/issues/436) users where stock kernels cannot boot any longer, the whereabouts are still not entirely clear (it does not seem to affect every user)
- Ubuntu: appears to be an initramfs generation issue
- Fedora: needs disabling then re-enabling SELINUX so one can boot

View File

@@ -5,7 +5,10 @@
# 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", "5.15", "5.16", "5.17", "5.18", "5.19"
# Kernel Version - Options are "5.4", and from "5.7" to "5.19"
# you can also set a specific kernel version, e.g. "6.0-rc4" or "5.10.51",
# -> note however that a "z" too small on a "x.y.z" version may make patches fail
# as they got adapted for newer "z" values.
_version=""
#### MISC OPTIONS ####
@@ -17,7 +20,7 @@ _EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
# 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 to use to get the kernel sources, possible values are "kernel.org", "googlesource.com" and "github.com"
_git_mirror="kernel.org"
# Custom compiler root dirs - Leave empty to use system compilers
@@ -81,7 +84,7 @@ _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 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

View File

@@ -26,10 +26,6 @@ if [ ! -x "$(command -v sudo)" ]; then
fi
fi
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
}
@@ -46,6 +42,12 @@ plain() {
echo -e "$1" >&2
}
declare -p -x > current_env
source customization.cfg
. current_env
source linux-tkg-config/prepare
_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"
@@ -73,103 +75,6 @@ _install_dependencies() {
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
@@ -225,9 +130,6 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then
_distro=""
fi
# Git clone (if necessary) and checkout the asked branch by the user
_linux_git_branch_checkout
# cd into the linux-src folder is important before calling _tkg_srcprep
cd "$_where/linux-src-git"
_tkg_srcprep

View File

@@ -6,6 +6,36 @@ _current_kernels=("6.0" "5.19" "5.15" "5.10" "5.4")
# List of kernels that are no longer maintained upstream
_eol_kernels=("5.18" "5.17" "5.16" "5.14" "5.13" "5.12" "5.11" "5.9" "5.8" "5.7")
typeset -Ag _kernel_git_remotes
_kernel_git_remotes=(
["kernel.org"]="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
["googlesource.com"]="https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable"
["github.com"]="https://github.com/gregkh/linux.git"
)
_git_remote_names=( "${!_kernel_git_remotes[@]}" )
if [[ ! "${_git_remote_names[@]}" =~ "$_git_mirror" ]]; then
warning "git mirror '$_git_mirror' not recognized"
_git_mirror=""
fi
if [[ -z "$_git_mirror" ]]; then
_git_mirror="${_git_remote_names[2]}"
echo "Defaulting to ${_git_mirror} git mirror"
fi
# Fillout the latest tags map/dictionary
_kernel_tags=$(git -c 'versionsort.suffix=-' \
ls-remote --exit-code --refs --sort='version:refname' --tags ${_kernel_git_remotes[$_git_mirror]} '*.*' \
| cut --delimiter='/' --fields=3)
typeset -Ag _kver_latest_tags_map
for _key in "${_current_kernels[@]}" "${_eol_kernels[@]}"; do
_kver_latest_tags_map[$_key]=$(echo "$_kernel_tags" | grep -F "v$_key" | tail -1 | cut -c1-)
done
# only used by workflow trigger script
typeset -Ag _kver_subver_map
_kver_subver_map=(
["5.4"]="214"
@@ -25,6 +55,8 @@ _kver_subver_map=(
["6.0"]="rc6"
)
# PREEMPT_RT's supported kernel subversion
typeset -Ag _rt_subver_map
_rt_subver_map=(
@@ -116,16 +148,77 @@ _prompt_from_array() {
unset _default_index
}
_set_kver_internal_vars() {
# Sets _basever and _basekernel from _kernel_git_tag
# Major Minor Sub/Patch
_kver_split=( "" "" "" )
_cur_index=0
_kernel_ver_str="$_kernel_git_tag"
[[ "${_kernel_git_tag:0:1}" == "v" ]] && _kernel_ver_str=$(echo "$_kernel_git_tag" | cut -c2-)
# we start from index 1 since index 0 is 'v'
for (( i=0; i<${#_kernel_ver_str}; i++ )); do
_cur_char="${_kernel_ver_str:$i:1}"
if [[ "$_cur_char" == "." || "$_cur_char" == "-" ]]; then
_cur_index=$((_cur_index + 1))
else
_kver_split[$_cur_index]+="$_cur_char"
fi
done
# examples: "6.0", "5.15", "5.4"
_basekernel="${_kver_split[0]}.${_kver_split[1]}"
# examples: "60", "515", "54"
_basever="${_kver_split[0]}${_kver_split[1]}"
# examples: "5", "rc2", "122"
_sub="${_kver_split[2]}"
# Append a zero to the minor if it has single digit
[[ ${#_kver_split[1]} == "1" ]] && _kver_split[1]="0${_kver_split[1]}"
# examples: "600", "515", "504" we use this variable to have proper comparisons
_kver="${_kver_split[0]}${_kver_split[1]}"
echo -e "_basekernel='$_basekernel'\n_basever='$_basever'\n_sub='$_sub'\n_kver='$_kver'" > "$_where"/BIG_UGLY_FROGMINER
}
_set_kernel_version() {
if [ -z "$_version" ] || ! [[ "${!_kver_subver_map[*]}" =~ "$_version" ]]; then
# if $_version is a valid x.y version, define $_kernel_git_tag with latest x.y.z from $_kver_latest_tags_map
# if $_version is a valid x.y.z version, define $_kernel_git_tag directly
# Otherwise, empty it so it gets prompted
_searched_tag="$_version"
# prepend "v" if it's not there already
[[ "${_searched_tag:0:1}" != "v" ]] && _searched_tag="v$_searched_tag"
_version_search="$(echo "$_kernel_tags" | grep -F "$_searched_tag" | head -1)"
if [[ -n "$_version" ]]; then
if [[ -v _kver_latest_tags_map[$_version] ]]; then
msg2 "Checking out latest kernel version of $_version"
_kernel_git_tag="${_kver_latest_tags_map[$_version]}"
elif [[ "$_searched_tag" == "$_version_search" ]]; then
msg2 "Checking out user-defined kernel version : $_version"
_kernel_git_tag="$_searched_tag"
else
[[ -n "$_version" ]] && echo "kernel version $_version not recognized, prompting..."
_version=""
fi
fi
if [ -z "$_version" ]; then
msg2 "Which kernel version do you want to install?"
# Create a list of currently maintained kernels versions with their sub-version added
_kernel_fullver_list=()
for _key in "${_current_kernels[@]}"; do
_kernel_fullver_list+=("${_key}.${_kver_subver_map[$_key]}")
_kernel_fullver_list+=("${_kver_latest_tags_map[$_key]}")
done
# Add the "Another" entry to enable building unmaintained kernel versions
_kernel_fullver_list+=("Another (no longer maintained upstream)")
@@ -133,7 +226,7 @@ _set_kernel_version() {
# Default index corresponds to latest stable kernel
# put default index to "1" when the most recent kernel is an rc one
_default_index="0"
if [[ "${_kver_subver_map[${_current_kernels[0]}]}" == rc* ]]; then
if [[ "${_kver_latest_tags_map[${_current_kernels[0]}]}" == *rc* ]]; then
_default_index="1"
fi
@@ -144,25 +237,19 @@ _set_kernel_version() {
_kernel_fullver_list=()
for _key in "${_eol_kernels[@]}"; do
_kernel_fullver_list+=("${_key}.${_kver_subver_map[$_key]}")
_kernel_fullver_list+=("${_kver_latest_tags_map[$_key]}")
done
# Default index corresponds to latest unmaintained kernel
_default_index="0"
_prompt_from_array "${_eol_kernels[@]}"
_version=${_eol_kernels[$_selected_index]}
else
_version=${_current_kernels[$_selected_index]}
_prompt_from_array "${_kernel_fullver_list[@]}"
fi
_kernel_git_tag="$_selected_value"
fi
# Note: _basekernel and _version variables can be merged
_basekernel="$_version"
_basever=`echo $_version | tr -d "."`
_sub=${_kver_subver_map[$_version]}
echo -e "_basekernel='$_basekernel'\n_basever='$_basever'\n_sub='$_sub'" > "$_where"/BIG_UGLY_FROGMINER
_set_kver_internal_vars
}
_set_cpu_scheduler() {
@@ -179,33 +266,33 @@ _set_cpu_scheduler() {
)
# CPU SCHED selector
if [ "$_basever" = "54" ]; then
if [ "$_kver" = "504" ]; then
_avail_cpu_scheds=("pds" "bmq" "muqss" "cacule" "cfs")
elif [ "$_basever" = "57" ]; then
elif [ "$_kver" = "507" ]; then
_avail_cpu_scheds=("pds" "bmq" "muqss" "cfs")
elif [ "$_basever" = "58" ]; then
elif [ "$_kver" = "508" ]; then
_avail_cpu_scheds=("upds" "pds" "bmq" "cfs")
elif [[ "$_basever" =~ ^(59|511)$ ]]; then
elif [[ "$_kver" =~ ^(509|511)$ ]]; then
_avail_cpu_scheds=("upds" "pds" "bmq" "muqss" "cfs")
elif [ "$_basever" = "510" ]; then
elif [ "$_kver" = "510" ]; then
_avail_cpu_scheds=("upds" "pds" "bmq" "muqss" "cacule" "cfs")
elif [ "$_basever" = "512" ]; then
elif [ "$_kver" = "512" ]; then
_avail_cpu_scheds=("pds" "bmq" "muqss" "cacule" "cfs")
elif [ "$_basever" = "513" ]; then
elif [ "$_kver" = "513" ]; then
_avail_cpu_scheds=("pds" "bmq" "muqss" "cacule" "cfs")
elif [ "$_basever" = "514" ]; then
elif [ "$_kver" = "514" ]; then
_avail_cpu_scheds=("pds" "bmq" "cacule" "cfs")
elif [ "$_basever" = "515" ]; then
elif [ "$_kver" = "515" ]; then
_avail_cpu_scheds=("pds" "bmq" "cacule" "tt" "cfs")
elif [ "$_basever" = "516" ]; then
elif [ "$_kver" = "516" ]; then
_avail_cpu_scheds=("pds" "bmq" "cacule" "cfs")
elif [ "$_basever" = "517" ]; then
elif [ "$_kver" = "517" ]; then
_avail_cpu_scheds=("pds" "bmq" "cacule" "tt" "cfs" "bore")
elif [ "$_basever" = "518" ]; then
elif [ "$_kver" = "518" ]; then
_avail_cpu_scheds=("cfs" "pds" "bmq" "cacule" "tt" "bore")
elif [ "$_basever" = "519" ]; then
elif [ "$_kver" = "519" ]; then
_avail_cpu_scheds=("cfs" "pds" "bmq" "cacule" "tt" "bore")
elif [ "$_basever" = "60" ]; then
elif [ "$_kver" = "600" ]; then
_avail_cpu_scheds=("cfs" "bore")
else
_avail_cpu_scheds=("cfs")
@@ -264,7 +351,7 @@ _set_compiler(){
if [ "$_compiler" = "llvm" ]; then
_compiler_name="-llvm"
llvm_opt="LLVM=1 LLVM_IAS=${_llvm_ias:-0}"
if [[ "$_basever" = 6* ]] || ( [[ "$_basever" = 5* ]] && [ $_basever -ge 512 ] ); then
if [ $_kver -ge 512 ]; then
if [[ -z "$_lto_mode" || ! "$_lto_mode" =~ ^(no|thin|full)$ ]]; then
plain "Would you like to enable Clang Link Time Optimizations (LTO) ? It may improve the performance of the kernel."
warning "This is currently experimental and might result in an unbootable kernel - Not recommended"
@@ -295,8 +382,98 @@ _set_compiler(){
}
_linux_git_branch_checkout() {
if [ -z "$_kernel_git_tag" ]; then
warning "internal error: kernel version should be chosen before cloning kernel sources"
exit 1
fi
cd "$_where"
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
for remote in "${!_kernel_git_remotes[@]}"; do
git remote add "$remote" "${_kernel_git_remotes[$remote]}"
done
else
cd linux-src-git
# Remove "origin" remote if present
if git remote -v | grep -w "origin" ; then
git remote rm origin
fi
for remote in "${!_kernel_git_remotes[@]}"; do
if ! git remote -v | grep -w "$remote" ; then
git remote add "$remote" "${_kernel_git_remotes[$remote]}"
fi
done
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 "$_kernel_git_tag"
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 "$_kernel_git_tag"
git reset --hard ${_git_mirror}/master
fi
msg2 "Checking out latest RC tag: $_kernel_git_tag"
git checkout "$_kernel_git_tag"
else
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_git_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_git_tag"
git reset --hard ${_git_mirror}/linux-${_basekernel}.y
fi
msg2 "Checking out latest release: $_kernel_git_tag"
git checkout "$_kernel_git_tag"
fi
}
_tkg_initscript() {
if ! whereis git > /dev/null 2>&1; then
warning "the 'git' command is not installed. Please install it then re-run the install script of linux-tkg."
exit 1
fi
if ! git status > /dev/null 2>&1; then
warning "linux-tkg needs to be git cloned"
msg2 "please delete the current linux-tkg folder and re-created it with"
msg2 "git clone --depth=1 https://github.com/Frogging-Family/linux-tkg.git"
exit 1
fi
# Default to Arch
if [ -z "$_distro" ] || [ "$_ispkgbuild" = "true" ]; then
msg2 "Defaulting to Archlinux target\n"
@@ -334,6 +511,8 @@ _tkg_initscript() {
if [ -n "$_custom_pkgbase" ]; then
echo -e "_custom_pkgbase=\"$_custom_pkgbase\"" >> "$_where"/BIG_UGLY_FROGMINER
fi
_linux_git_branch_checkout
}
user_patcher() {
@@ -413,16 +592,6 @@ _tkg_srcprep() {
echo "-$pkgrel-tkg-${_cpusched}${_compiler_name}" > localversion.10-pkgrel
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt
echo "" > localversion.20-pkgname
# add upstream patch
if [ "$_sub" != "0" ] && [[ "$_sub" != rc* ]]; then
if [ ! -e "$srcdir/patch-${pkgver}" ]; then
if [ -e "$srcdir/patch-${pkgver}.xz" ]; then
xz -dk "$(readlink -f "$srcdir/patch-${pkgver}.xz")" --stdout > "$srcdir/patch-${pkgver}"
else
( cd "$_where" && xz -dk patch-${pkgver}.xz && mv "$_where"/patch-${pkgver} "$srcdir"/ )
fi
fi
fi
fi
if [ "${_distro}" = "Void" ]; then
pkgver="${version}"
@@ -450,14 +619,14 @@ _tkg_srcprep() {
_patch_location="${wrksrc}"
fi
if [ "$_basever" = "54" ]; then
if [ "$_kver" = "504" ]; then
_patch_name="more-uarches-for-kernel-4.19-5.4"
elif [ "$_basever" = "57" ]; then
elif [ "$_kver" = "507" ]; then
_outdated="outdated_versions/"
_patch_name="enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.7"
elif (( 58 <= "$_basever" && "$_basever" <= 514 )) && [[ "$_basever" != 6* ]]; then
elif (( 508 <= "$_kver" && "$_kver" <= 514 )); then
_patch_name="more-uarches-for-kernel-5.8-5.14"
elif [[ "$_basever" =~ ^(515|516)$ ]]; then
elif [[ "$_kver" =~ ^(515|516)$ ]]; then
_patch_name="more-uarches-for-kernel-5.15-5.16"
else
_patch_name="more-uarches-for-kernel-5.17%2B"
@@ -522,25 +691,25 @@ _tkg_srcprep() {
tkgpatch="$srcdir/0002-mm-Support-soft-dirty-flag-read-with-reset.patch" && _tkg_patcher
# prjc/bmq patch rev
if [ "$_basever" = "58" ] || [ "$_basever" = "57" ]; then
if [ "$_kver" = "508" ] || [ "$_kver" = "507" ]; then
rev=3
elif [ "$_basever" = "59" ]; then
elif [ "$_kver" = "509" ]; then
rev=3
elif [ "$_basever" = "510" ]; then
elif [ "$_kver" = "510" ]; then
rev=3
elif [ "$_basever" = "511" ]; then
elif [ "$_kver" = "511" ]; then
rev=3
elif [ "$_basever" = "512" ]; then
elif [ "$_kver" = "512" ]; then
rev=1
elif [ "$_basever" = "513" ]; then
elif [ "$_kver" = "513" ]; then
rev=3
elif [ "$_basever" = "514" ]; then
elif [ "$_kver" = "514" ]; then
rev=3
elif [ "$_basever" = "515" ]; then
elif [ "$_kver" = "515" ]; then
rev=1
elif [ "$_basever" = "516" ]; then
elif [ "$_kver" = "516" ]; then
rev=1
elif [ "$_basever" = "518" ]; then
elif [ "$_kver" = "518" ]; then
rev=2
else
rev=0
@@ -568,7 +737,7 @@ _tkg_srcprep() {
# PDS-mq
_msg="Applying PDS base patch"
if [ "${_cpusched}" = "upds" ] || ( [ "$_basever" = "54" ] || [ "$_basever" = "57" ] && [ "${_cpusched}" = "pds" ] ); then
if [ "${_cpusched}" = "upds" ] || ( [ "$_kver" = "504" ] || [ "$_kver" = "507" ] && [ "${_cpusched}" = "pds" ] ); then
tkgpatch="$srcdir/0005-v${_basekernel}_undead-pds099o.patch" && _tkg_patcher
if [ "${_aggressive_ondemand}" = "true" ]; then
_msg="Applying PDS agressive ondemand governor patch"
@@ -588,13 +757,13 @@ _tkg_srcprep() {
elif [ "${_cpusched}" = "bmq" ]; then
# Project C / BMQ
_msg="Applying Project C / BMQ base patch"
if [ "$_basever" != "54" ]; then
if [ "$_kver" != "504" ]; then
tkgpatch="$srcdir/0009-prjc_v${_basekernel}-r${rev}.patch" && _tkg_patcher
else
tkgpatch="$srcdir/0009-bmq_v5.4-r2.patch" && _tkg_patcher
fi
if [ "${_aggressive_ondemand}" = "true" ] && [ "$_basever" != "54" ]; then
if [ "${_aggressive_ondemand}" = "true" ] && [ "$_kver" != "504" ]; then
_msg="Applying BMQ agressive ondemand governor patch"
tkgpatch="$srcdir/0009-glitched-ondemand-bmq.patch" && _tkg_patcher
fi
@@ -604,18 +773,18 @@ _tkg_srcprep() {
elif [ "${_cpusched}" = "cacule" ]; then
_msg="Applying cacule patch"
if [ "${_distro}" = "Void" ]; then
if [[ $_basever -lt 515 ]]; then
if [[ $_kver -lt 515 ]]; then
wget -P "$wrksrc" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
elif [[ $_basever = 515 ]]; then
elif [[ $_kver = 515 ]]; then
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
else
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
fi
tkgpatch="$wrksrc/cacule-${_basekernel}.patch" && _tkg_patcher
else
if [[ $_basever -lt 515 ]]; then
if [[ $_kver -lt 515 ]]; then
wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
elif [[ $_basever = 515 ]]; then
elif [[ $_kver = 515 ]]; then
wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
else
wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
@@ -626,25 +795,25 @@ _tkg_srcprep() {
elif [ "${_cpusched}" = "tt" ]; then
_msg="Applying TT patch"
if [ "${_distro}" = "Void" ]; then
if [[ $_basever = 515 ]]; then
if [[ $_kver = 515 ]]; then
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/TT/0001-tt-${_basekernel}.patch" > "$srcdir"/tt.patch
elif [[ $_basever = 517 ]] || [[ $_basever = 519 ]]; then
elif [[ $_kver = 517 ]] || [[ $_kver = 519 ]]; then
curl "https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$wrksrc"/tt.patch
else
curl "https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${_basekernel}/sched/0001-tt-${_basekernel}.patch" > "$wrksrc"/tt.patch
fi
tkgpatch="$wrksrc/tt.patch" && _tkg_patcher
else
if [[ $_basever = 515 ]]; then
if [[ $_kver = 515 ]]; then
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/TT/0001-tt-${_basekernel}.patch" > "$srcdir"/tt.patch
elif [[ $_basever = 517 ]] || [[ $_basever = 519 ]]; then
elif [[ $_kver = 517 ]] || [[ $_kver = 519 ]]; then
curl "https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$srcdir"/tt.patch
else
curl "https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${_basekernel}/sched/0001-tt-${_basekernel}.patch" > "$srcdir"/tt.patch
fi
tkgpatch="$srcdir/tt.patch" && _tkg_patcher
fi
if [ "$_tt_high_hz" = "true" ] && [ $_basever = 515 ]; then
if [ "$_tt_high_hz" = "true" ] && [ $_kver = 515 ]; then
_msg="Applying TT High HZ patch"
if [ "${_distro}" = "Void" ]; then
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$wrksrc"/tt_high_hz.patch
@@ -656,7 +825,7 @@ _tkg_srcprep() {
fi
elif [ "${_cpusched}" = "bore" ]; then
_msg="Applying BORE patch"
if [ "$_basever" = "518" ]; then
if [ "$_kver" = "518" ]; then
_bore_suffix="-sched"
fi
if [ "${_distro}" = "Void" ]; then
@@ -674,7 +843,7 @@ _tkg_srcprep() {
fi
fi
if [ -z "${_configfile}" ]; then
msg2 "Using archlinux's default config file for kernel ${_basekernel}"
cat "${srcdir}"/config.x86_64 > ./.config
@@ -707,11 +876,11 @@ _tkg_srcprep() {
# Set some -tkg defaults
_disable "DYNAMIC_FAULT" "DEFAULT_FQ_CODEL"
_enable "DEFAULT_CAKE"
if [ "$_basever" = "54" ]; then
if [ "$_kver" = "504" ]; then
_module "TP_SMAPI"
_enable "RAID6_USE_PREFER_GEN"
fi
if [ "$_basever" = "54" ] || [ "$_basever" = "59" ]; then
if [ "$_kver" = "504" ] || [ "$_kver" = "509" ]; then
scripts/config --set-val "RCU_BOOST_DELAY" "0"
fi
_disable "NTP_PPS" "CPU_FREQ_DEFAULT_GOV_PERFORMANCE_NODEF" "ZSWAP_COMPRESSOR_DEFAULT_LZO" "PROFILE_ALL_BRANCHES"
@@ -733,7 +902,7 @@ _tkg_srcprep() {
fi
fi
# Clang LTO
if [ "$_compiler_name" = "-llvm" ] && ( [[ "$_basever" = 6* ]] || [ $_basever -ge 512 ] ); then
if [ "$_compiler_name" = "-llvm" ] && [ $_kver -ge 512 ]; then
if [ "$_lto_mode" = "full" ]; then
_enable LTO_CLANG_FULL
_disable LTO_CLANG_THIN
@@ -761,7 +930,7 @@ _tkg_srcprep() {
if [ "$_compiler_name" = "-llvm" ]; then
_disable "KCSAN"
if [ "$_basever" != "54" ] && [ "$_basever" != "57" ] && [ "$_basever" != "58" ]; then
if [ "$_kver" != "504" ] && [ "$_kver" != "507" ] && [ "$_kver" != "508" ]; then
_disable "INIT_STACK_ALL_PATTERN"
else
_disable "INIT_STACK_ALL"
@@ -893,7 +1062,7 @@ _tkg_srcprep() {
_disable "CFS_BANDWIDTH"
# for linux59-tkg _sched_yield_type is set to 0
if [ "$_basever" = "59" ]; then
if [ "$_kver" = "509" ]; then
_sched_yield_type="0"
fi
# sched yield type
@@ -929,11 +1098,11 @@ _tkg_srcprep() {
_prompt_from_array "${yield_type_array_text[@]}"
_sched_yield_type="${_selected_index}"
fi
if [ "${_cpusched}" = "upds" ] || ( [ "$_basever" = "54" ] || [ "$_basever" = "57" ] && [ "${_cpusched}" = "pds" ] ); then
if [ "${_cpusched}" = "upds" ] || ( [ "$_kver" = "504" ] || [ "$_kver" = "507" ] && [ "${_cpusched}" = "pds" ] ); then
_sched="pds"
elif [ "${_cpusched}" = "muqss" ]; then
_sched="MuQSS"
elif ( [ "$_basever" != "54" ] && [ "$_cpusched" != "bmq" ] && [ "$_cpusched" != "pds" ] ) || ( [ "$_basever" = "54" ] && [ "$_cpusched" = "bmq" ] ); then
elif ( [ "$_kver" != "504" ] && [ "$_cpusched" != "bmq" ] && [ "$_cpusched" != "pds" ] ) || ( [ "$_kver" = "504" ] && [ "$_cpusched" = "bmq" ] ); then
_sched="${_cpusched}"
else
_sched="alt_core"
@@ -982,7 +1151,7 @@ _tkg_srcprep() {
fi
msg2 "Using ${_rr_interval}ms round robin interval"
if [ "$_basever" != "54" ]; then
if [ "$_kver" != "504" ]; then
if [ "${_cpusched}" = "muqss" ]; then
sed -i -e "s/int rr_interval __read_mostly = 6;/int rr_interval __read_mostly = ${_rr_interval};/" ./kernel/sched/"${_sched}".c
elif [ "${_cpusched}" = "upds" ]; then
@@ -1013,19 +1182,19 @@ _tkg_srcprep() {
# compiler optimization level
if [ "$_compileroptlevel" = "1" ]; then
if [ "$_basever" != "54" ]; then
if [ "$_kver" != "504" ]; then
_disable "CC_OPTIMIZE_FOR_PERFORMANCE_O3"
else
_disable "CC_OPTIMIZE_HARDER"
fi
elif [ "$_compileroptlevel" = "2" ]; then
if [[ "$_basever" = 6* ]]; then
if [[ $_kver -ge 600 ]]; then
tkgpatch="$srcdir/0013-optimize_harder_O3.patch"
_msg="Patching O3 optimization"
_tkg_patcher
else
_disable "CC_OPTIMIZE_FOR_PERFORMANCE"
if [ "$_basever" != "54" ]; then
if [ "$_kver" != "504" ]; then
_enable "CC_OPTIMIZE_FOR_PERFORMANCE_O3"
else
_enable "CC_OPTIMIZE_HARDER"
@@ -1034,7 +1203,7 @@ _tkg_srcprep() {
elif [ "$_compileroptlevel" = "3" ]; then
_disable "CC_OPTIMIZE_FOR_PERFORMANCE"
_enable "CC_OPTIMIZE_FOR_SIZE"
if [ "$_basever" != "54" ]; then
if [ "$_kver" != "504" ]; then
_disable "CC_OPTIMIZE_FOR_PERFORMANCE_O3"
else
_disable "CC_OPTIMIZE_HARDER"
@@ -1201,7 +1370,7 @@ _tkg_srcprep() {
# bcachefs
tkgpatch="$srcdir/0008-${_basekernel}-bcachefs.patch"
if [ -e "$tkgpatch" ]; then
if [ -z "$_bcachefs" ] && [ "$_basever" != "54" ]; then
if [ -z "$_bcachefs" ] && [ "$_kver" != "504" ]; then
plain ""
plain "Add Bcache filesystem support? You'll have to install bcachefs-tools-git from AUR for utilities."
plain "https://bcachefs.org/"
@@ -1256,7 +1425,7 @@ _tkg_srcprep() {
fi
# fsync support
if [[ $_basever > 515 ]] || [[ "$CONDITION9" =~ [yY] ]] || [ "$_futex_waitv" = "true" ]; then
if [[ $_kver > 515 ]] || [[ "$CONDITION9" =~ [yY] ]] || [ "$_futex_waitv" = "true" ]; then
tkgpatch="$srcdir/0007-v${_basekernel}-fsync1_via_futex_waitv.patch"
else
tkgpatch="$srcdir/0007-v${_basekernel}-fsync.patch"
@@ -1405,7 +1574,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
unset _msg
# Anbox modules
if [ "$_basever" != "54" ]; then
if [ "$_basever" != "504" ]; then
if [ -z "$_anbox" ]; then
plain ""
plain "Enable android modules for use with Anbox?"

View File

@@ -1,202 +0,0 @@
#!/bin/bash
msg2() {
echo -e " \033[1;34m->\033[1;0m \033[1;1m$1\033[1;0m" >&2
}
escape() {
_escaped=$(printf '%s\n' "$1" | sed -e 's/[]\/$*.^[]/\\&/g')
}
kernel_rc_tags=$(git -c 'versionsort.suffix=-' \
ls-remote --exit-code --refs --sort='version:refname' --tags https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git '*.*' \
| cut --delimiter='/' --fields=3)
source linux-tkg-config/prepare
trap - EXIT
# Start by making sure our GnuPG environment is sane
if [[ ! -x /usr/bin/gpg ]]; then
echo "Could not find gpg"
exit 4
fi
## Generate the keyring
if [ ! -s gnupg/keyring.gpg ]; then
if [[ ! -d gnupg ]]; then
#echo "gnupg directory does not exist"
mkdir -p -m 0700 gnupg
fi
echo "Making sure we have all the necessary keys"
gpg --batch --quiet --homedir gnupg --auto-key-locate wkd --locate-keys autosigner@kernel.org
if [[ $? != "0" ]]; then
echo "FAILED to retrieve keys"
exit 3
fi
gpg --batch --homedir gnupg --export torvalds@kernel.org gregkh@kernel.org autosigner@kernel.org > gnupg/keyring.gpg
echo "----------------------"
fi
# Cleanup
rm -f v*.x.sha256sums{,.asc}
updates=""
for _key in "${_current_kernels[@]}"; do
kver_major="$(echo ${_key} | cut -d. -f1)"
kver_minor="$(echo ${_key} | cut -d. -f2)"
kver_base="$(echo ${_key} | tr -d ".")"
## Getting sha256sums by sha256sums.asc
if [ ! -s v${kver_major}.x.sha256sums ] && ! ( [[ "$kver_minor" == "0" ]] && [[ "${_kver_subver_map[$_key]}" == rc* ]] ); then
echo "Downloading the checksums file for linux-v${kver_major}.x"
curl -siL --retry 2 -o "v${kver_major}.x.sha256sums.asc" https://cdn.kernel.org/pub/linux/kernel/v${kver_major}.x/sha256sums.asc
echo "Current time: " `date +" %a, %d %b %Y %H:%M:%S %Z"`
echo "Remote timestamp:" `grep -i Last-Modified "v${kver_major}.x.sha256sums.asc" | cut -d':' -f2-`
echo "----------------------"
echo "Verifying the v${kver_major}.x checksums file"
count_gpg=$(gpg --homedir gnupg --keyring=gnupg/keyring.gpg --status-fd=1 v${kver_major}.x.sha256sums.asc | grep -c -E '^\[GNUPG:\] (GOODSIG|VALIDSIG)')
if [[ ${count_gpg} -lt 2 ]]; then
echo "FAILED to verify the v${kver_major}.x.sha256sums file."
rm -f "v${kver_major}.x.sha256sums"
exit 3
fi
rm -f "v${kver_major}.x.sha256sums.asc"
echo "----------------------"
fi
_from_rc_to_release="false"
latest_full_ver=$(cut -c 67- v${kver_major}.x.sha256sums | grep ".tar.xz" | sed 's/.tar.xz//' | grep -F "linux-$_key" | tail -1 | sed 's/linux-//')
if [[ "${_kver_subver_map[$_key]}" == rc* ]]; then
# check if latest_full_ver is non-RC
if [ ! -n "$latest_full_ver" ]; then
latest_full_ver=$(echo "$kernel_rc_tags" | grep -F "v$_key-rc" | tail -1 | cut -c2-)
fi
if [[ "$latest_full_ver" == *rc* ]]; then
latest_subver="${latest_full_ver##*-rc}"
else
_from_rc_to_release="true"
if [ "$latest_full_ver" = "$_key" ]; then
# this is the first release after rc, so the kernel version will be 5.xx (and not 5.xx.0)
latest_subver="0"
else
# For whatever reason we are moving from an rc kernel to 5.xx.y
latest_subver="${latest_full_ver##*.}"
fi
fi
current_subver="${_kver_subver_map[$_key]}"
current_subver="${current_subver##*rc}"
else
if [ "$latest_full_ver" != "$_key" ]; then
latest_subver="${latest_full_ver##*.}"
else
latest_subver="0"
fi
current_subver=${_kver_subver_map[$_key]}
fi
echo "current version on repository $_key.${_kver_subver_map[$_key]} -> $current_subver"
echo "upstream version $latest_full_ver -> $latest_subver"
old_kernel_shasum=""
new_kernel_shasum=""
old_kernel_patch_shasum=""
new_kernel_patch_shasum=""
if [ "$_from_rc_to_release" = "true" ]; then
# append kernel version update to updates
updates="${updates} ${latest_full_ver}"
echo "Updating from rc kernel to release in linux-tkg-config/prepare"
escape "[\"${_key}\"]=\"rc${current_subver}\""
_from="$_escaped"
escape "[\"${_key}\"]=\"${latest_subver}\""
_to="$_escaped"
sed -i "/^_kver_subver_map=($/,/^)$/s|$_from|$_to|g" linux-tkg-config/prepare
old_kernel_shasum=$(grep -A$(wc -l PKGBUILD | cut -d' ' -f1) "${kver_base})" PKGBUILD | grep sha256sums -m 1 - | cut -d \' -f2)
new_kernel_shasum=$(grep linux-${_key}.tar.xz v${kver_major}.x.sha256sums | cut -d' ' -f1)
if [ ! -n "$new_kernel_shasum" ]; then
echo "WARNING sha256sum for linux-${_key} was not found."
fi
if [ "$latest_subver" != "0" ]; then
# we move from an rc release directly to a kernel with a subversion update
sed -i "s|#\"\$patch_site\"|\"\$patch_site\"|g" PKGBUILD
old_kernel_patch_shasum="#upcoming_kernel_patch_sha256"
new_kernel_patch_shasum="'$(grep patch-${_key}.${latest_subver}.xz v${kver_major}.x.sha256sums | cut -d' ' -f1)'"
fi
elif (( "$current_subver" < "$latest_subver" )); then
# append kernel version update to updates
updates="${updates} ${latest_full_ver}"
echo "Newer upstream"
if [[ "${_kver_subver_map[$_key]}" == rc* ]]; then
echo "Updating rc kernel version in linux-tkg-config/prepare"
escape "[\"${_key}\"]=\"rc${current_subver}\""
_from="$_escaped"
escape "[\"${_key}\"]=\"rc${latest_subver}\""
_to="$_escaped"
sed -i "/^_kver_subver_map=($/,/^)$/s|$_from|$_to|g" linux-tkg-config/prepare
old_kernel_shasum=$(grep -A$(wc -l PKGBUILD | cut -d' ' -f1) "${kver_base})" PKGBUILD | grep sha256sums -m 1 - | cut -d \' -f2)
# For RC we need download the original file
echo "Downloading the GZ tarball for linux-${_key}-rc${latest_subver}"
curl -sL --retry 2 -o "linux-${_key}-rc${latest_subver}.tar.gz" https://git.kernel.org/torvalds/t/linux-${_key}-rc${latest_subver}.tar.gz
if [ ! -s linux-${_key}-rc${latest_subver}.tar.gz ]; then
echo "FAILED to download the linux-${_key}-rc${latest_subver}.tar.gz"
exit 3
fi
new_kernel_shasum=$(sha256sum linux-${_key}-rc${latest_subver}.tar.gz | cut -d' ' -f1)
else
echo "Updating kernel version in linux-tkg-config/prepare"
escape "[\"${_key}\"]=\"${current_subver}\""
_from="$_escaped"
escape "[\"${_key}\"]=\"${latest_subver}\""
_to="$_escaped"
sed -i "/^_kver_subver_map=($/,/^)$/s|$_from|$_to|g" linux-tkg-config/prepare
if [ "$current_subver" = "0" ]; then
# we move from an initial release to a kernel subversion update
sed -i "s|#\"\$patch_site\"|\"\$patch_site\"|g" PKGBUILD
old_kernel_patch_shasum="#upcoming_kernel_patch_sha256"
new_kernel_patch_shasum="'$(grep patch-${_key}.${latest_subver}.xz v${kver_major}.x.sha256sums | cut -d' ' -f1)'"
else
old_kernel_patch_shasum="$(grep patch-${_key}.${current_subver}.xz v${kver_major}.x.sha256sums | cut -d' ' -f1)"
new_kernel_patch_shasum="$(grep patch-${_key}.${latest_subver}.xz v${kver_major}.x.sha256sums | cut -d' ' -f1)"
fi
fi
else
echo "Same upstream"
fi
if [ -n "$new_kernel_shasum" ]; then
echo "Updating kernel shasum in PKGBUILD"
echo "old kernel: $old_kernel_shasum"
echo "new kernel: $new_kernel_shasum"
sed -i "s|$old_kernel_shasum|$new_kernel_shasum|g" PKGBUILD
fi
if [ -n "$new_kernel_patch_shasum" ]; then
echo "Updating kernel patch shasum in PKGBUILD"
echo "old kernel patch: $old_kernel_patch_shasum"
echo "new kernel patch: $new_kernel_patch_shasum"
sed -i "s|$old_kernel_patch_shasum|$new_kernel_patch_shasum|g" PKGBUILD
fi
echo "----------------------"
done
echo "$updates" > kernel_updates