Skip to content

Archlinux Kernel based on different schedulers and some other performance improvements.

Script: Add build script for zen4/5 optimized kernels

Peter Junge583e2f1213e
diff --git a/script-znver4.sh b/script-znver4.sh
new file mode 100755
index 00000000..f707aa71
--- /dev/null
+++ b/script-znver4.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_use_auto_optimization-y/_use_auto_optimization-/" {}
+## Enable ZFS
+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_zfs-/_build_zfs-y/" {}
+## Enable Generic v3
+find . -name "config" | xargs -I {} sed -i 's/GENERIC_CPU=y/GENERIC_MZEN4=y/' {}
+## Enable NVIDIA module
+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_nvidia-/_build_nvidia-y/" {}
+## Enable Open NVIDIA module
+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_nvidia_open-/_build_nvidia_open-y/" {}
+
+## GCC znver4 Kernel
+
+files=$(find . -name "PKGBUILD")
+
+for f in $files
+do
+ d=$(dirname $f)
+ cd $d
+ time docker run --name kernelbuild -e EXPORT_PKG=1 -e SYNC_DATABASE=1 -e CHECKSUMS=1 -v $PWD:/pkg pttrr/docker-makepkg-v3
+ docker rm kernelbuild
+ cd ..
+done
+
+echo "move kernels to the repo"
+mv */*-x86_64_v4.pkg.tar.zst* /home/ptr1337/.docker/build/nginx/www/repo/x86_64_v4/cachyos-znver4/
+repoctl update -P cachyos-znver4
+## Ensure that repo-add/repoctl catches all new packages
+repoctl update -P cachyos-znver4