From 976c5ad2c39720617ea3fe021fe5a1f648e23d8b Mon Sep 17 00:00:00 2001 From: Eric Naim Date: Mon, 30 Dec 2024 19:20:52 +0700 Subject: [PATCH 1/2] PKGBUILD: Remove global `hardened` option from $_cpusched Like the default and handheld kernel, the hardened kernel differs from the other generic cachyos kernels in that it uses its own special config[1]. This means that you can't reproduce a "proper" hardened kernel by simply choosing the `hardened` $_cpusched option. Instead, we should source the patch directly in the main source array, like what we currently do with the handheld patches. This will be addressed in the coming 6.13 stable sync, where no functional changes are intended so even if hardened still stays on 6.12, it should be fine. [1] https://gitlab.archlinux.org/archlinux/packaging/packages/linux-hardened/-/blob/main/config Signed-off-by: Eric Naim --- linux-cachyos-rc/PKGBUILD | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD index a7910d5ee..66f109261 100644 --- a/linux-cachyos-rc/PKGBUILD +++ b/linux-cachyos-rc/PKGBUILD @@ -15,7 +15,6 @@ _cachy_config=${_cachy_config-y} # ATTENTION - only one of the following values can be selected: # 'bore' - select 'Burst-Oriented Response Enhancer' # 'bmq' - select 'BMQ Scheduler' -# 'hardened' - select 'BORE Scheduler hardened' ## kernel with hardened config and hardening patches with the bore scheduler # 'cachyos' - select 'CachyOS Default Scheduler (BORE)' # 'eevdf' - select 'EEVDF Scheduler' # 'rt' - select EEVDF, but includes a series of realtime patches @@ -263,12 +262,10 @@ fi ## List of CachyOS schedulers case "$_cpusched" in - cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE) + cachyos|bore|rt-bore) # CachyOS Scheduler (BORE) source+=("${_patchsource}/sched/0001-bore-cachy.patch");;& bmq) ## Project C Scheduler source+=("${_patchsource}/sched/0001-prjc-cachy.patch");; - hardened) ## Hardened Patches - source+=("${_patchsource}/misc/0001-hardened.patch");; esac export KBUILD_BUILD_HOST=cachyos @@ -329,7 +326,7 @@ prepare() { [ -z "$_cpusched" ] && _die "The value is empty. Choose the correct one again." case "$_cpusched" in - cachyos|bore|hardened) scripts/config -e SCHED_BORE;; + cachyos|bore) scripts/config -e SCHED_BORE;; bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ;; eevdf) ;; rt) scripts/config -d PREEMPT -e PREEMPT_RT;; From 3f2d3f970a7e0ac3f8f04db8556e2501c726d14a Mon Sep 17 00:00:00 2001 From: Eric Naim Date: Mon, 30 Dec 2024 19:25:15 +0700 Subject: [PATCH 2/2] PKGBUILD: Add the PDS scheduler to $_cpusched This provides an easier way to use the PDS scheduler along with the CachyOS patchset. While it is very likely that we will not compile this for our repositories, it can be useful for the users that care about PDS. Signed-off-by: Eric Naim --- linux-cachyos-rc/PKGBUILD | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD index 66f109261..adcd7021b 100644 --- a/linux-cachyos-rc/PKGBUILD +++ b/linux-cachyos-rc/PKGBUILD @@ -17,6 +17,7 @@ _cachy_config=${_cachy_config-y} # 'bmq' - select 'BMQ Scheduler' # 'cachyos' - select 'CachyOS Default Scheduler (BORE)' # 'eevdf' - select 'EEVDF Scheduler' +# 'pds' - select 'PDS scheduler' # 'rt' - select EEVDF, but includes a series of realtime patches # 'rt-bore' - select Burst-Oriented Response Enhancer, but includes a series of realtime patches _cpusched=${_cpusched-cachyos} @@ -264,7 +265,7 @@ fi case "$_cpusched" in cachyos|bore|rt-bore) # CachyOS Scheduler (BORE) source+=("${_patchsource}/sched/0001-bore-cachy.patch");;& - bmq) ## Project C Scheduler + bmq|pds) ## Project C Scheduler source+=("${_patchsource}/sched/0001-prjc-cachy.patch");; esac @@ -328,6 +329,7 @@ prepare() { case "$_cpusched" in cachyos|bore) scripts/config -e SCHED_BORE;; bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ;; + pds) scripts/config -e SCHED_ALT -e SCHED_PDS;; eevdf) ;; rt) scripts/config -d PREEMPT -e PREEMPT_RT;; rt-bore) scripts/config -e SCHED_BORE -d PREEMPT -e PREEMPT_RT;;