Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump linux-cachyps-hardened to 6.4.3 #137

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions linux-cachyos-hardened/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Generated by makepkg 6.0.2
# Thu Jul 13 18:55:15 UTC 2023
pkgbase = linux-cachyos-hardened
pkgdesc = Linux hardenened BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.1.37
pkgver = 6.4.3
pkgrel = 1
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
Expand All @@ -22,20 +24,18 @@ pkgbase = linux-cachyos-hardened
makedepends = patch
makedepends = python
options = !strip
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.37.tar.xz
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.3.tar.xz
source = config
source = auto-cpu-optimization.sh
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/all/0001-cachyos-base-all.patch
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/misc/0001-Add-latency-priority-for-CFS-class.patch
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/sched/0001-bore-cachy.patch
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/misc/0001-hardened.patch
sha256sums = 46cad712d261a23c8e483a3b79b6a84b9a5f731a8921c9127df35ae35cef1e80
sha256sums = eb4a3422d53de734ab83a3488195b41fa35c4d30d2131fce5042e0aa3510dd8c
sha256sums = 41c34759ed248175e905c57a25e2b0ed09b11d054fe1a8783d37459f34984106
sha256sums = 9669e0c18786d5b07a38a7da14bc653c1cf43e2765a047f1d33ecb5c0ee5369d
sha256sums = 8811cdc9215a0dfff3a922a2f9eadefb6760bfb78fb756adc88d5894403148f0
sha256sums = 73a93dcd983e31dab8f1e5cbf3241759779d0b9591e9df330eabd16fda491d8b
sha256sums = 944b736d518210b5a433e1a300ecccbdb450e79904d72e9f98fadfdafca2f3d8
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.4/all/0001-cachyos-base-all.patch
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.4/sched/0001-bore-cachy.patch
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.4/misc/0001-hardened.patch
b2sums = d38cae9706127fa28cc55b50ceeba7601de3d1db648b934b9d33e0b439324790074b755b1de204586fa098a326f5c88f81550cff76489b2ea6505987fc243c56
b2sums = 40ea8f1e376c0e838b087009588515c7a6958e75fb79473eba29e5a05e4962c124ce83e6d1d450474dbfcdd6cc9f9a3305fc2a2a04881570a345cef3b62fd9e7
b2sums = 11d2003b7d71258c4ca71d71c6b388f00fe9a2ddddc0270e304148396dadfd787a6cac1363934f37d0bfb098c7f5851a02ecb770e9663ffe57ff60746d532bd0
b2sums = 8ee179d3da413f1a2f08db80587388f1742dfd427a7ff7f1e3e146fdd94dbd3abdc929b64a5c3773b28d5cea4da42791661bc0c8f738b0fe1ccc5b3c66d9dbe4
b2sums = dceb0a3be5829e646533349f9997a3e20de67dcd75542c281499d6db10be2bf3a3d8aa48c0f47e5fa000f8a0ae750201332e0fcb0919131bc77b7218dec26c3b
b2sums = c23fe886e781a9a7bc2e855a74d5c7a669ecfaf5b39fadd822814f379b289840b9c32abb8d325c247a60a0c05398a9c4b753ed3d664cbb01e1831187ebdad30b

pkgname = linux-cachyos-hardened
pkgdesc = The Linux hardenened BORE scheduler Kernel by CachyOS with other patches and improvements kernel and modules
Expand Down
98 changes: 33 additions & 65 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ _cachy_config=${_cachy_config-y}
# 'cfs' - select 'Completely Fair Scheduler'
# 'tt' - select 'Task Type Scheduler by Hamad Marri'
# 'hardened' - select 'BORE Scheduler hardened' ## kernel with hardened config and hardening patches with the bore scheduler
# 'cachyos' - select 'EEVDF-BORE Variant Scheduler' EEVDF includes latency nice
# 'eevdf' - select 'EEVDF Scheduler' EEVDF includes latency nice
# 'rt' - select CFS, but includes a series of realtime patches
_cpusched=${_cpusched-hardened}

Expand Down Expand Up @@ -102,7 +104,7 @@ _lru_config=${_lru_config-standard}
# 'standard' - enable per-VMA locking
# 'stats' - enable per-VMA locking with stats
# 'none' - disable per-VMA locking
_vma_config=${_vma_config-none}
_vma_config=${_vma_config-standard}

### Transparent Hugepages
# ATTENTION - one of two predefined values should be selected!
Expand Down Expand Up @@ -147,15 +149,6 @@ _use_llvm_lto=${_use_llvm_lto-none}
# https://github.com/CachyOS/linux-cachyos/issues/36
_use_lto_suffix=${_use_lto_suffix-y}

# ATTENTION!: Really experimental LTO implementation for GCC
# This can improve the performance of the kernel
# The performance difference is currently negligible
# DEBUG and BTF needs to be disabled, otherwise the compilation is failing
# The Kernel is bigger with GCC LTO due to more inlining
# More informations:
# https://lore.kernel.org/lkml/[email protected]/T/#md8014ad799b02221b67f33584002d98ede6234eb
_use_gcc_lto=${_use_gcc_lto-}

# KCFI is a proposed forward-edge control-flow integrity scheme for
# Clang, which is more suitable for kernel use than the existing CFI
# scheme used by CONFIG_CFI_CLANG. kCFI doesn't require LTO, doesn't
Expand All @@ -172,14 +165,6 @@ _build_zfs=${_build_zfs-}
# Enable bcachefs
_bcachefs=${_bcachefs-}

# Enable LATENCY NICE
# Latency nice is a approach to sets latency-nice as a per-task attribute
# It can improve the latency of applications similar to sched_nice, but focused on the latency
# You need to set the values per task
# Ananicy-cpp has a implementation for this
# You need to configure ananicy-cpp for this or use existing settings
_latency_nice=${_latency_nice-y}

if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ -n "$_use_lto_suffix" ]; then
pkgsuffix=cachyos-${_cpusched}-lto
pkgbase=linux-$pkgsuffix
Expand All @@ -188,8 +173,8 @@ else
pkgsuffix=cachyos-${_cpusched}
pkgbase=linux-$pkgsuffix
fi
_major=6.1
_minor=37
_major=6.4
_minor=3
#_minorc=$((_minor+1))
#_rcver=rc8
pkgver=${_major}.${_minor}
Expand Down Expand Up @@ -226,23 +211,21 @@ source=(
# ZFS support
if [ -n "$_build_zfs" ]; then
makedepends+=(git)
source+=("git+https://github.com/cachyos/zfs.git#commit=e25f9131d679692704c11dc0c1df6d4585b70c35")
fi

## Latency NICE Support
if [ -n "$_latency_nice" ]; then
if [[ "$_cpusched" = "bore" || "$_cpusched" = "cfs" || "$_cpusched" = "hardened" ]]; then
source+=("${_patchsource}/misc/0001-Add-latency-priority-for-CFS-class.patch")
fi
source+=("git+https://github.com/cachyos/zfs.git#commit=f9a2d94c957d0660ad1f4cfbb0a909eb8e6086df")
fi

case "$_cpusched" in
cachyos) # CachyOS Scheduler (EEVDF + BORE)
source+=("${_patchsource}/sched/0001-EEVDF.patch"
"${_patchsource}/sched/0001-bore-eevdf.patch");;
eevdf) # EEVDF Scheduler
source+=("${_patchsource}/sched/0001-EEVDF.patch");;
pds|bmq) # BMQ/PDS scheduler
source+=("${_patchsource}/sched/0001-prjc-cachy.patch"
linux-cachyos-prjc.install);;
tt) ## TT Scheduler
source+=("${_patchsource}/sched/0001-tt-cachy.patch");;
bore) ## BORE Scheduler with latency_nice
bore) ## BORE Scheduler
[ -n "$_tune_bore" ] && source+=("${_patchsource}/misc/0001-bore-tuning-sysctl.patch")
source+=("${_patchsource}/sched/0001-bore-cachy.patch");;
rt) ## CFS with RT patches
Expand All @@ -257,16 +240,6 @@ esac
if [ -n "$_bcachefs" ]; then
source+=("${_patchsource}/misc/0001-bcachefs.patch")
fi
if [ -n "$_use_gcc_lto" ]; then
## GCC-LTO Patch
## Fix for current gcc --enable-default-pie option
source+=("${_patchsource}/misc/gcc-lto/0001-gcc-LTO-support-for-the-kernel.patch"
"${_patchsource}/misc/gcc-lto/0002-gcc-lto-no-pie.patch")
fi
## Use vma lock as an extra patch since it has some issues right now
if [[ "$_vma_config" = "standard" || "$_vma_config" = "stats" ]]; then
source+=("${_patchsource}/misc/0001-Introduce-per-VMA-lock.patch")
fi
## lrng patchset
if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
Expand All @@ -278,14 +251,21 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP

_die() { error "$@" ; exit; }

_make() {
test -s version
make KERNELRELEASE="$(<version)" "$@"
}

prepare() {

cd ${srcdir}/$_srcname

echo "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
make ${BUILD_FLAGS[*]} defconfig
make ${BUILD_FLAGS[*]} -s kernelrelease > version
make ${BUILD_FLAGS[*]} mrproper

local src
for src in "${source[@]}"; do
Expand Down Expand Up @@ -325,8 +305,8 @@ prepare() {
pds) scripts/config -e SCHED_ALT -d SCHED_BMQ -e SCHED_PDS -e PSI_DEFAULT_DISABLED;;
bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ -d SCHED_PDS -e PSI_DEFAULT_DISABLED;;
tt) scripts/config -e TT_SCHED -e TT_ACCOUNTING_STATS;;
bore|hardened) scripts/config -e SCHED_BORE;;
cfs) ;;
bore|hardened|cachyos) scripts/config -e SCHED_BORE;;
cfs|eevdf) ;;
rt) scripts/config -e PREEMPT_COUNT -e PREEMPTION -d PREEMPT_VOLUNTARY -d PREEMPT -d PREEMPT_NONE -e PREEMPT_RT -e PREEMPT_LAZY -d PREEMPT_DYNAMIC -e HAVE_PREEMPT_LAZY -d PREEMPT_BUILD;;
*) _die "The value $_cpusched is invalid. Choose the correct one again.";;
esac
Expand All @@ -352,15 +332,6 @@ prepare() {

echo "Selecting '$_use_llvm_lto' LLVM level..."

### Enable GCC FULL LTO
### Disable LTO_CP_CLONE, its experimental
if [ -n "$_use_gcc_lto" ]; then
scripts/config -e LTO_GCC \
-d LTO_CP_CLONE
### Disable DEBUG, pahole is currently broken with GCC LTO
_disable_debug=y
fi

### Select tick rate
[ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again."

Expand Down Expand Up @@ -655,12 +626,11 @@ prepare() {

### Rewrite configuration
echo "Rewrite configuration..."
make ${BUILD_FLAGS[*]} prepare
yes "" | make ${BUILD_FLAGS[*]} config >/dev/null
_make ${BUILD_FLAGS[*]} prepare
yes "" | _make ${BUILD_FLAGS[*]} config >/dev/null
diff -u ../config .config || :

### Prepared version
make ${BUILD_FLAGS[*]} -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"

### Running make nconfig
Expand Down Expand Up @@ -712,19 +682,18 @@ _package() {

cd ${srcdir}/$_srcname

local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"

echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
install -Dm644 "$(_make -s image_name)" "$modulesdir/vmlinuz"

# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"

echo "Installing modules..."
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
ZSTD_CLEVEL=19 _make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod

# remove build and source links
Expand Down Expand Up @@ -838,10 +807,9 @@ for _p in "${pkgname[@]}"; do
}"
done

sha256sums=('46cad712d261a23c8e483a3b79b6a84b9a5f731a8921c9127df35ae35cef1e80'
'eb4a3422d53de734ab83a3488195b41fa35c4d30d2131fce5042e0aa3510dd8c'
'41c34759ed248175e905c57a25e2b0ed09b11d054fe1a8783d37459f34984106'
'9669e0c18786d5b07a38a7da14bc653c1cf43e2765a047f1d33ecb5c0ee5369d'
'8811cdc9215a0dfff3a922a2f9eadefb6760bfb78fb756adc88d5894403148f0'
'73a93dcd983e31dab8f1e5cbf3241759779d0b9591e9df330eabd16fda491d8b'
'944b736d518210b5a433e1a300ecccbdb450e79904d72e9f98fadfdafca2f3d8')
b2sums=('d38cae9706127fa28cc55b50ceeba7601de3d1db648b934b9d33e0b439324790074b755b1de204586fa098a326f5c88f81550cff76489b2ea6505987fc243c56'
'40ea8f1e376c0e838b087009588515c7a6958e75fb79473eba29e5a05e4962c124ce83e6d1d450474dbfcdd6cc9f9a3305fc2a2a04881570a345cef3b62fd9e7'
'11d2003b7d71258c4ca71d71c6b388f00fe9a2ddddc0270e304148396dadfd787a6cac1363934f37d0bfb098c7f5851a02ecb770e9663ffe57ff60746d532bd0'
'8ee179d3da413f1a2f08db80587388f1742dfd427a7ff7f1e3e146fdd94dbd3abdc929b64a5c3773b28d5cea4da42791661bc0c8f738b0fe1ccc5b3c66d9dbe4'
'dceb0a3be5829e646533349f9997a3e20de67dcd75542c281499d6db10be2bf3a3d8aa48c0f47e5fa000f8a0ae750201332e0fcb0919131bc77b7218dec26c3b'
'c23fe886e781a9a7bc2e855a74d5c7a669ecfaf5b39fadd822814f379b289840b9c32abb8d325c247a60a0c05398a9c4b753ed3d664cbb01e1831187ebdad30b')
Loading