Skip to content

Commit

Permalink
PKGBUILD: Remove global hardened option from $_cpusched
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
1Naim committed Dec 30, 2024
1 parent fd701cc commit 225d811
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 'eevdf' - select 'EEVDF Scheduler'
_cpusched=${_cpusched-bore}

Expand Down Expand Up @@ -262,12 +261,10 @@ fi

## List of CachyOS schedulers
case "$_cpusched" in
bore|hardened) # CachyOS Scheduler (BORE)
source+=("${_patchsource}/sched/0001-bore-cachy.patch");;&
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
Expand Down Expand Up @@ -328,7 +325,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) ;;
*) _die "The value $_cpusched is invalid. Choose the correct one again.";;
Expand Down

0 comments on commit 225d811

Please sign in to comment.