summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 22 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dbdef822786..f9436a3e612 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,6 +34,13 @@ if [ -z ${use_tracers+x} ]; then
use_tracers=y
fi
+## Enable Cachy CPU scheduler by default https://github.com/xanmod/linux/blob/5.8/Documentation/scheduler/sched-Cachy.rst
+## Set variable "use_cachy" to: n to disable (stock Xanmod)
+## y to enable
+if [ -z ${use_cachy+x} ]; then
+ use_cachy=n
+fi
+
## Enable CONFIG_USER_NS_UNPRIVILEGED flag https://aur.archlinux.org/cgit/aur.git/tree/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch?h=linux-ck
## Set variable "use_ns" to: n to disable (stock Xanmod)
## y to enable (stock Archlinux)
@@ -96,10 +103,11 @@ sha256sums=('3239a4ee1250bf2048be988cc8cb46c487b2c8a0de5b1b032d38394d5c6b1a06'
'2c7369218e81dee86f8ac15bda741b9bb34fa9cefcb087760242277a8207d511'
'6c66dba73251440352f93ff32b72f5dd49536d0f17ef9347867660fd3a626991')
-# If use_cachy=y or use_cacule=y then advice user to install the new package
-if [ "$use_cachy" = "y" ] || [ "$use_cacule" = "y" ]; then
- echo "Cachy is now Cacule. To use it install linux-xanmod-anbox-cacule package."
- exit 1
+# If use_cachy=y then download cachy patch
+if [ "$use_cachy" = "y" ]; then
+ #echo "Cachy branch is not ready yet..." && exit 1
+ source+=("https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}-cachy/patch-${pkgver}-xanmod${xanmod}-cachy.xz")
+ sha256sums+=('c35685c5d706a683fc0b02cf11fd40db52becae9205bf0d71f6a4a901d836d69')
fi
export KBUILD_BUILD_HOST=${KBUILD_BUILD_HOST:-archlinux}
@@ -110,7 +118,11 @@ prepare() {
cd linux-${_major}
# Apply Xanmod patch
- patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod}
+ if [ "$use_cachy" = "y" ]; then
+ patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod}-cachy
+ else
+ patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod}
+ fi
msg2 "Setting version..."
scripts/setlocalversion --save-scmversion
@@ -154,6 +166,11 @@ prepare() {
scripts/config --disable CONFIG_NUMA
fi
+ if [ "$use_cachy" = "y" ]; then
+ msg2 "Enabling Cachy CPU scheduler by default..."
+ scripts/config --enable CONFIG_CACHY_SCHED
+ fi
+
if [ "$use_ns" = "n" ]; then
msg2 "Disabling CONFIG_USER_NS_UNPRIVILEGED"
scripts/config --disable CONFIG_USER_NS_UNPRIVILEGED