This commit is contained in:
Peter Jung 2022-06-11 15:05:56 +02:00
parent 33c3966d31
commit 16a5c5967d
No known key found for this signature in database
GPG Key ID: C3C4820857F654FE
3 changed files with 578 additions and 560 deletions

View File

@ -1,7 +1,7 @@
pkgbase = linux-cachyos
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.18.3
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@ -56,7 +56,7 @@ pkgbase = linux-cachyos
sha256sums = e2266d499cebdd5d195a044048ae4a13755f1d3edb3ece2c3f8837228b4cd521
sha256sums = c2bf57d37db1f93c5f3eeff2e2957f01618f4786613c13755f9ae6989d2b745c
sha256sums = 30fd4ca078cb1eee0bc4005700da4d15515a577ccdb96ea7922040aa9086d6b7
sha256sums = 4b18c6a82b62c50b45568526eeb16ae877c8f52c407a4bb9c6144c07a0d1233a
sha256sums = 6b6c8d1fbefe7aa165fc62aef527665777d474133e2507e1dc9d09b12282f857
sha256sums = f4ed599589fdd44270229492505f5f88e20d79e93b8044f8041a2fc90486bb4e
sha256sums = 1d9c83de97d541f5a7ae4612a96c05aea8ce38de5471cc21fd2197dbd6644d00
sha256sums = 344806f8ea9f0f7da883e2c27835153944df7a4b15bb3f97ec6b7b7709682f5d
@ -65,7 +65,7 @@ pkgbase = linux-cachyos
sha256sums = 8edf9b9b1a9c26cc4d6dfaf5f14c06b197a04c5bbb8459dd292c033aa2534d19
sha256sums = efe8558b63feb0e76b61d69952c5300ad54c951d9044101be7c01932a54fb4fb
sha256sums = cb2494f5ad43fd260e26d771305dade3f9499fa1ffaf53cb9ef8c19b66dab7d7
sha256sums = be21f15aeb22b2ca1e35e4975590d30736af0483ea7464e3464a60d993e37e22
sha256sums = ce8bf7807b45a27eed05a5e1de5a0bf6293a3bbc2085bacae70cd1368f368d1f
pkgname = linux-cachyos
pkgdesc = The Linux BORE scheduler Kernel by CachyOS with other patches and improvements kernel and modules

View File

@ -81,11 +81,18 @@ _spf_enable=y
## Enable Linux Random Number Generator
_lrng_enable=y
## Apply Kernel automatic Optimization
_use_auto_optimization=
# CPU compiler optimizations - Defaults to prompt at kernel config if left empty
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2" "zen3"
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake" "sapphirerapids" "rocketlake" "alderlake"
# Other options :
# - "native_amd" (use compiler autodetection - Selecting your arch manually in the list above is recommended instead of this option)
# - "native_intel" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
# - "generic" (kernel's default - to share the package between machines with different CPU µarch as long as they are x86-64)
#
# Or use the _use_auto_optimization with _use_auto_optimization=y
_processor_opt=
## Apply Kernel Optimization selecting
_use_optimization_select=y
_use_auto_optimization=y
# disable debug to lower the size of the kernel
_disable_debug=y
@ -136,7 +143,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=1
pkgrel=2
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
@ -244,13 +251,17 @@ cd ${srcdir}/$_srcname
echo "Setting config..."
cp ../config .config
if [ -n "$_use_auto_optimization" ]; then
"${srcdir}"/auto-cpu-optimization.sh
if [ -n "$_processor_opt" ]; then
MARCH=$(echo $_processor_opt|tr '[:lower:]' '[:upper:]'&&echo)
MARCH2=M${MARCH}
scripts/config -k --disable CONFIG_GENERIC_CPU
scripts/config -k --enable CONFIG_${MARCH2}
fi
if [ -n "$_use_optimization_select" ]; then
source "${startdir}"/configure
cpu_arch
if [ -n "$_use_auto_optimization" ]; then
"${srcdir}"/auto-cpu-optimization.sh
fi
### Selecting the CPU scheduler
@ -814,7 +825,7 @@ sha256sums=('c70cb405076c3cfd73e4de729430b0342ea21b92a04d8284a03fac664ef1cfea'
'e2266d499cebdd5d195a044048ae4a13755f1d3edb3ece2c3f8837228b4cd521'
'c2bf57d37db1f93c5f3eeff2e2957f01618f4786613c13755f9ae6989d2b745c'
'30fd4ca078cb1eee0bc4005700da4d15515a577ccdb96ea7922040aa9086d6b7'
'4b18c6a82b62c50b45568526eeb16ae877c8f52c407a4bb9c6144c07a0d1233a'
'6b6c8d1fbefe7aa165fc62aef527665777d474133e2507e1dc9d09b12282f857'
'f4ed599589fdd44270229492505f5f88e20d79e93b8044f8041a2fc90486bb4e'
'1d9c83de97d541f5a7ae4612a96c05aea8ce38de5471cc21fd2197dbd6644d00'
'344806f8ea9f0f7da883e2c27835153944df7a4b15bb3f97ec6b7b7709682f5d'
@ -823,4 +834,4 @@ sha256sums=('c70cb405076c3cfd73e4de729430b0342ea21b92a04d8284a03fac664ef1cfea'
'8edf9b9b1a9c26cc4d6dfaf5f14c06b197a04c5bbb8459dd292c033aa2534d19'
'efe8558b63feb0e76b61d69952c5300ad54c951d9044101be7c01932a54fb4fb'
'cb2494f5ad43fd260e26d771305dade3f9499fa1ffaf53cb9ef8c19b66dab7d7'
'be21f15aeb22b2ca1e35e4975590d30736af0483ea7464e3464a60d993e37e22')
'ce8bf7807b45a27eed05a5e1de5a0bf6293a3bbc2085bacae70cd1368f368d1f')

View File

@ -1,36 +1,43 @@
#!/bin/bash
#######################################
# AUTO-CPU-OPTIMIZATION #
#######################################
# CREATOR : BL4CKH47H4CK3R #
#######################################
# HTTPS://GITHUB.COM/BL4CKH47H4CK3R #
#######################################
CPU=`gcc -Q -march=native --help=target | grep march | awk '{print $2}' | head -1`
MARCH=`echo ${CPU} | tr '[:lower:]' '[:upper:]'`&& echo
if [[ ${MARCH} == "ZNVER" ]]
then
CPU=$(gcc -Q -march=native --help=target|grep march=|awk '{print $2}'|head -1)
MARCH=$(echo $CPU|tr '[:lower:]' '[:upper:]'&&echo)
if [[ ${MARCH} == "ZNVER" ]]; then
MARCH="ZEN"
elif [[ ${MARCH} == "ZNVER2" ]]
then
elif [[ ${MARCH} == "ZNVER2" ]]; then
MARCH="ZEN2"
elif [[ ${MARCH} == "ZNVER3" ]]
then
elif [[ ${MARCH} == "ZNVER3" ]]; then
MARCH="ZEN3"
elif [[ ${MARCH} == "BDVER2" ]]
then
MARCH="MPILEDRIVER"
elif [[ ${MARCH} == "BDVER1" ]]; then
MARCH="BULLDOZER"
elif [[ ${MARCH} == "BDVER2" ]]; then
MARCH="PILEDRIVER"
elif [[ ${MARCH} == "BDVER3" ]]; then
MARCH="STEAMROLLER"
elif [[ ${MARCH} == "BDVER4" ]]; then
MARCH="EXCAVATOR"
elif [[ ${MARCH} == "BTVER1" ]]; then
MARCH="BOBCAT"
elif [[ ${MARCH} == "BTVER2" ]]; then
MARCH="JAGUAR"
elif [[ ${MARCH} == "AMDFAM10" ]]; then
MARCH="MK10"
elif [[ ${MARCH} == "K8-SSE3" ]]; then
MARCH="K8SSE3"
elif [[ ${MARCH} == "BONNELL" ]]; then
MARCH="ATOM"
elif [[ ${MARCH} == "GOLDMONT-PLUS" ]]; then
MARCH="GOLDMONTPLUS"
elif [[ ${MARCH} == "SKYLAKE-AVX512" ]]; then
MARCH="SKYLAKE2"
elif [[ ${MARCH} == "ICELAKE-CLIENT" ]]; then
MARCH="ICELAKE"
fi
MARCH2=M${MARCH}
echo
echo "----------------------------------"
echo "| APPLYING AUTO-CPU-OPTIMIZATION |"
echo "----------------------------------"
echo "[*] DETECTED CPU (MARCH) : ${MARCH}"
sed -i "/CONFIG_GENERIC_CPU=y/d;s/\# CONFIG_M${MARCH} is not set/CONFIG_M${MARCH}=y/g" .config
echo "[*] DETECTED CPU (MARCH) : ${MARCH2}"
scripts/config -k --disable CONFIG_GENERIC_CPU
scripts/config -k --enable CONFIG_${MARCH2}
sleep 3&&echo