From 99e0d832f3a2508f06b68d93fc552f1a1ebb7260 Mon Sep 17 00:00:00 2001 From: Piotr Gorski Date: Wed, 4 Jan 2023 13:13:25 +0100 Subject: [PATCH] Bump to 6.1.3 Signed-off-by: Piotr Gorski --- .SRCINFO | 12 +++--- PKGBUILD | 10 ++--- auto-cpu-optimization.sh | 80 ++++++++++++++++++++-------------------- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 7ae5c77..78cec16 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = linux-cachyos pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements - pkgver = 6.1.2 - pkgrel = 3 + pkgver = 6.1.3 + pkgrel = 1 url = https://github.com/CachyOS/linux-cachyos arch = x86_64 arch = x86_64_v3 @@ -21,16 +21,16 @@ pkgbase = linux-cachyos makedepends = make makedepends = patch options = !strip - source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.2.tar.xz + source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.3.tar.xz source = config source = auto-cpu-optimization.sh source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/all/0001-cachyos-base-all.patch source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/misc/0001-Add-latency-priority-for-CFS-class.patch source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/sched/0001-bore-cachy.patch - sha256sums = ee41f3c4f599b2f46f08aae428c9243db403e7292eb2c9f04ee34909b038d1ae + sha256sums = 6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317 sha256sums = d4f3fc2581e338835a33983cca18bfb3225450a07c456c48c9b051c03236955a - sha256sums = 32e77b3b71225c9f04df2d44c25f982773a8fff9927d26788366baab5e242e74 - sha256sums = acdffe9b6d633fdff4bdccc97449350772c841c074f1f06dd2f6aa28af0e3c25 + sha256sums = 41c34759ed248175e905c57a25e2b0ed09b11d054fe1a8783d37459f34984106 + sha256sums = daa88229f69ef9bcab4f41e6757935aa0cdd1377bc576d62ddb9c546f73ae946 sha256sums = 0241632f91c112dcdffbdc203a9245ee3234f9a8b4e5e2c2de45fd0d228840da sha256sums = 564b08b5c076ad3b24ee2e975cac0630628581ce7c3b0eeaa40ce888136a00c6 diff --git a/PKGBUILD b/PKGBUILD index 8c7db12..78908c7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -200,7 +200,7 @@ else pkgbase=linux-$pkgsuffix fi _major=6.1 -_minor=2 +_minor=3 #_minorc=$((_minor+1)) #_rcver=rc8 pkgver=${_major}.${_minor} @@ -210,7 +210,7 @@ _stable=${_major}.${_minor} _srcname=linux-${_stable} #_srcname=linux-${_major} pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements' -pkgrel=3 +pkgrel=1 _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" @@ -1048,9 +1048,9 @@ for _p in "${pkgname[@]}"; do }" done -sha256sums=('ee41f3c4f599b2f46f08aae428c9243db403e7292eb2c9f04ee34909b038d1ae' +sha256sums=('6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317' 'd4f3fc2581e338835a33983cca18bfb3225450a07c456c48c9b051c03236955a' - '32e77b3b71225c9f04df2d44c25f982773a8fff9927d26788366baab5e242e74' - 'acdffe9b6d633fdff4bdccc97449350772c841c074f1f06dd2f6aa28af0e3c25' + '41c34759ed248175e905c57a25e2b0ed09b11d054fe1a8783d37459f34984106' + 'daa88229f69ef9bcab4f41e6757935aa0cdd1377bc576d62ddb9c546f73ae946' '0241632f91c112dcdffbdc203a9245ee3234f9a8b4e5e2c2de45fd0d228840da' '564b08b5c076ad3b24ee2e975cac0630628581ce7c3b0eeaa40ce888136a00c6') diff --git a/auto-cpu-optimization.sh b/auto-cpu-optimization.sh index 4903a69..4c4b20e 100755 --- a/auto-cpu-optimization.sh +++ b/auto-cpu-optimization.sh @@ -1,49 +1,51 @@ #!/bin/bash -CPU=$(gcc -Q -march=native --help=target|grep march=|awk '{print $2}'|head -1) -MARCH=$(echo $CPU|tr '[:lower:]' '[:upper:]'&&echo) -if [[ ${MARCH} == "ZNVER1" ]]; then - MARCH="ZEN" -elif [[ ${MARCH} == "ZNVER2" ]]; then - MARCH="ZEN2" -elif [[ ${MARCH} == "ZNVER3" ]]; then - MARCH="ZEN3" -elif [[ ${MARCH} == "ZNVER4" ]]; then - MARCH="ZEN4" -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} == "MIVYBRIDGE" ]]; then + +# Check if GCC is installed +check_gcc() { + if ! [ -x "$(command -v gcc)" ]; then + # Display error message if GCC is not installed + echo "Error: GCC is not installed. Please install GCC and try again." >&2 + exit 1 + fi +} + +# Call the function before running the rest of the script +check_gcc + +# Get CPU type from GCC and convert to uppercase +MARCH=$(gcc -Q -march=native --help=target|grep -m1 march=|awk '{print toupper($2)}') + +# Check for specific CPU types and set MARCH variable accordingly +case $MARCH in + ZNVER1) MARCH="ZEN";; + ZNVER2) MARCH="ZEN2";; + ZNVER3) MARCH="ZEN3";; + ZNVER4) MARCH="ZEN4";; + BDVER1) MARCH="BULLDOZER";; + BDVER2) MARCH="PILEDRIVER";; + BDVER3) MARCH="STEAMROLLER";; + BDVER4) MARCH="EXCAVATOR";; + BTVER1) MARCH="BOBCAT";; + BTVER2) MARCH="JAGUAR";; + AMDFAM10) MARCH="MK10";; + K8-SSE3) MARCH="K8SSE3";; + BONNELL) MARCH="ATOM";; + GOLDMONT-PLUS) MARCH="GOLDMONTPLUS";; + SKYLAKE-AVX512) MARCH="SKYLAKE2";; + MIVYBRIDGE) scripts/config --disable CONFIG_AGP_AMD64 scripts/config --disable CONFIG_MICROCODE_AMD - MARCH="MIVYBRIDGE" -elif [[ ${MARCH} == "ICELAKE-CLIENT" ]]; then - MARCH="ICELAKE" -fi + MARCH="MIVYBRIDGE";; + ICELAKE-CLIENT) MARCH="ICELAKE";; +esac + +# Add "M" prefix to MARCH variable MARCH2=M${MARCH} -echo + +# Display detected CPU and apply optimization echo "----------------------------------" echo "| APPLYING AUTO-CPU-OPTIMIZATION |" echo "----------------------------------" echo "[*] DETECTED CPU (MARCH) : ${MARCH2}" scripts/config -k --disable CONFIG_GENERIC_CPU scripts/config -k --enable CONFIG_${MARCH2} -sleep 3&&echo