mirror of
https://github.com/archlinux/aur.git
synced 2026-02-13 20:13:31 +01:00
Sync with Github
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
This commit is contained in:
parent
7e2537ea39
commit
ca88f64cc9
2 changed files with 75 additions and 95 deletions
8
.SRCINFO
8
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = linux-cachyos-lts
|
||||
pkgdesc = Linux EEVDF-BORE scheduler Kernel by CachyOS with other patches and improvements
|
||||
pkgver = 6.6.70
|
||||
pkgrel = 2
|
||||
pkgver = 6.6.72
|
||||
pkgrel = 1
|
||||
url = https://github.com/CachyOS/linux-cachyos
|
||||
arch = x86_64
|
||||
license = GPL-2.0-only
|
||||
|
|
@ -18,12 +18,12 @@ pkgbase = linux-cachyos-lts
|
|||
options = !strip
|
||||
options = !debug
|
||||
options = !lto
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.70.tar.xz
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.72.tar.xz
|
||||
source = config
|
||||
source = auto-cpu-optimization.sh
|
||||
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.6/all/0001-cachyos-base-all.patch
|
||||
source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.6/sched/0001-bore-cachy.patch
|
||||
sha256sums = 84d23ee07fb26febbcb6d1295ba15efdc67ac382b4137b2c8853146c10fd2f97
|
||||
sha256sums = feb9e514930d5968daa0b8b5486d3295d1fb2b34accf876207641884d4baef39
|
||||
sha256sums = ef6c30c39066fa6d2fc0f5cb5a8cfe7a8b7ab7706826871f2bed2ec29d6bb153
|
||||
sha256sums = 1a7747d5b4ccd427d643e3f548cd99c09d0f05b108fc530a581e28a41c5533c9
|
||||
sha256sums = 2706d935575e114210892b441671037ab96d5f70f084c391a23b43cd96afaa3e
|
||||
|
|
|
|||
162
PKGBUILD
162
PKGBUILD
|
|
@ -9,7 +9,7 @@
|
|||
# Set these variables to ANYTHING that is not null or choose proper variable to enable them
|
||||
|
||||
### Selecting CachyOS config
|
||||
_cachy_config=${_cachy_config-y}
|
||||
: "${_cachy_config:=yes}"
|
||||
|
||||
### Selecting the CPU scheduler
|
||||
# ATTENTION - only one of the following values can be selected:
|
||||
|
|
@ -20,25 +20,25 @@ _cachy_config=${_cachy_config-y}
|
|||
# 'rt' - select EEVDF, but includes a series of realtime patches
|
||||
# 'rt-bore' - select Burst-Oriented Response Enhancer, but includes a series of realtime patches
|
||||
# 'sched-ext' - select 'sched-ext' Scheduler, based on EEVDF
|
||||
_cpusched=${_cpusched-cachyos}
|
||||
: "${_cpusched:=cachyos}"
|
||||
|
||||
### Tweak kernel options prior to a build via nconfig
|
||||
_makenconfig=${_makenconfig-}
|
||||
: "${_makenconfig:=no}"
|
||||
|
||||
### Tweak kernel options prior to a build via menuconfig
|
||||
_makemenuconfig=${_makemenuconfig-}
|
||||
: "${_makemenuconfig:=no}"
|
||||
|
||||
### Tweak kernel options prior to a build via xconfig
|
||||
_makexconfig=${_makexconfig-}
|
||||
: "${_makexconfig:=no}"
|
||||
|
||||
### Tweak kernel options prior to a build via gconfig
|
||||
_makegconfig=${_makegconfig-}
|
||||
: "${_makegconfig:=no}"
|
||||
|
||||
# NUMA is optimized for multi-socket motherboards.
|
||||
# A single multi-core CPU actually runs slower with NUMA enabled.
|
||||
# See, https://bugs.archlinux.org/task/31187
|
||||
# It seems that in 2023 this is not really a huge regression anymore
|
||||
_NUMAdisable=${_NUMAdisable-}
|
||||
: "${_NUMAdisable:=no}"
|
||||
|
||||
# Compile ONLY used modules to VASTLYreduce the number of modules built
|
||||
# and the build time.
|
||||
|
|
@ -48,53 +48,53 @@ _NUMAdisable=${_NUMAdisable-}
|
|||
# This PKGBUILD read the database kept if it exists
|
||||
#
|
||||
# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
|
||||
_localmodcfg=${_localmodcfg-}
|
||||
: "${_localmodcfg:=no}"
|
||||
|
||||
# Path to the list of used modules
|
||||
_localmodcfg_path=${_localmodcfg_path-"$HOME/.config/modprobed.db"}
|
||||
: "${_localmodcfg_path:="$HOME/.config/modprobed.db"}"
|
||||
|
||||
# Use the current kernel's .config file
|
||||
# Enabling this option will use the .config of the RUNNING kernel rather than
|
||||
# the ARCH defaults. Useful when the package gets updated and you already went
|
||||
# through the trouble of customizing your config options. NOT recommended when
|
||||
# a new kernel is released, but again, convenient for package bumps.
|
||||
_use_current=${_use_current-}
|
||||
: "${_use_current:=no}"
|
||||
|
||||
### Enable KBUILD_CFLAGS -O3
|
||||
_cc_harder=${_cc_harder-y}
|
||||
: "${_cc_harder:=yes}"
|
||||
|
||||
### Set this to your number of threads you have in your machine otherwise it will default to 320
|
||||
_nr_cpus=${_nr_cpus-}
|
||||
: "${_nr_cpus:=320}"
|
||||
|
||||
### Set performance governor as default
|
||||
_per_gov=${_per_gov-}
|
||||
: "${_per_gov:=no}"
|
||||
|
||||
### Enable TCP_CONG_BBR3
|
||||
_tcp_bbr3=${_tcp_bbr3-}
|
||||
: "${_tcp_bbr3:=no}"
|
||||
|
||||
### Running with a 1000HZ, 750Hz, 600 Hz, 500Hz, 300Hz, 250Hz and 100Hz tick rate
|
||||
_HZ_ticks=${_HZ_ticks-1000}
|
||||
: "${_HZ_ticks:=1000}"
|
||||
|
||||
## Choose between perodic, idle or full
|
||||
### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency.
|
||||
_tickrate=${_tickrate-full}
|
||||
: "${_tickrate:=full}"
|
||||
|
||||
## Choose between full(low-latency), voluntary or server
|
||||
_preempt=${_preempt-full}
|
||||
: "${_preempt:=full}"
|
||||
|
||||
### Enable multigenerational LRU
|
||||
# ATTENTION - one of three predefined values should be selected!
|
||||
# 'standard' - enable multigenerational LRU
|
||||
# 'stats' - enable multigenerational LRU with stats
|
||||
# 'none' - disable multigenerational LRU
|
||||
_lru_config=${_lru_config-standard}
|
||||
: "${_lru_config:=standard}"
|
||||
|
||||
### Enable per-VMA locking
|
||||
# ATTENTION - one of three predefined values should be selected!
|
||||
# 'standard' - enable per-VMA locking
|
||||
# 'stats' - enable per-VMA locking with stats
|
||||
# 'none' - disable per-VMA locking
|
||||
_vma_config=${_vma_config-standard}
|
||||
: "${_vma_config:=standard}"
|
||||
|
||||
### Transparent Hugepages
|
||||
# ATTENTION - one of two predefined values should be selected!
|
||||
|
|
@ -102,10 +102,10 @@ _vma_config=${_vma_config-standard}
|
|||
# 'madvise' - madvise, prevent applications from allocating more memory resources than necessary
|
||||
# More infos here:
|
||||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/performance_tuning_guide/sect-red_hat_enterprise_linux-performance_tuning_guide-configuring_transparent_huge_pages
|
||||
_hugepage=${_hugepage-always}
|
||||
: "${_hugepage:=always}"
|
||||
|
||||
## Enable DAMON
|
||||
_damon=${_damon-}
|
||||
: "${_damon:=no}"
|
||||
|
||||
# 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" "zen4"
|
||||
|
|
@ -116,30 +116,30 @@ _damon=${_damon-}
|
|||
# - "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=${_processor_opt-}
|
||||
: "${_processor_opt:=}"
|
||||
|
||||
_use_auto_optimization=${_use_auto_optimization-y}
|
||||
: "${_use_auto_optimization:=yes}"
|
||||
|
||||
# disable debug to lower the size of the kernel
|
||||
_disable_debug=${_disable_debug-}
|
||||
: "${_disable_debug:=no}"
|
||||
|
||||
# Clang LTO mode, only available with the "llvm" compiler - options are "none", "full" or "thin".
|
||||
# ATTENTION - one of three predefined values should be selected!
|
||||
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
|
||||
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
|
||||
# "none: disable LTO
|
||||
_use_llvm_lto=${_use_llvm_lto-none}
|
||||
: "${_use_llvm_lto:=none}"
|
||||
|
||||
# Use suffix -lto only when requested by the user
|
||||
# Enabled by default.
|
||||
# y - enable -lto suffix
|
||||
# n - disable -lto suffix
|
||||
# yes - enable -lto suffix
|
||||
# no - disable -lto suffix
|
||||
# https://github.com/CachyOS/linux-cachyos/issues/36
|
||||
_use_lto_suffix=${_use_lto_suffix-y}
|
||||
: "${_use_lto_suffix:=yes}"
|
||||
|
||||
# Use suffix -gcc when requested by the user
|
||||
# This was added to facilitate https://github.com/CachyOS/linux-cachyos/issues/286
|
||||
_use_gcc_suffix=${_use_gcc_suffix-}
|
||||
: "${_use_gcc_suffix:=no}"
|
||||
|
||||
# KCFI is a proposed forward-edge control-flow integrity scheme for
|
||||
# Clang, which is more suitable for kernel use than the existing CFI
|
||||
|
|
@ -147,31 +147,31 @@ _use_gcc_suffix=${_use_gcc_suffix-}
|
|||
# alter function references to point to a jump table, and won't break
|
||||
# function address equality.
|
||||
# ATTENTION!: kCFI is only available in llvm 16
|
||||
_use_kcfi=${_use_kcfi-}
|
||||
: "${_use_kcfi:=no}"
|
||||
|
||||
# Build the zfs module in to the kernel
|
||||
# WARNING: The ZFS module doesn't build with selected RT sched due to licensing issues.
|
||||
# If you use ZFS, refrain from building the RT kernel
|
||||
_build_zfs=${_build_zfs-}
|
||||
: "${_build_zfs:=no}"
|
||||
|
||||
# Builds the nvidia module and package it into a own base
|
||||
# This does replace the requirement of nvidia-dkms
|
||||
_build_nvidia=${_build_nvidia-}
|
||||
: "${_build_nvidia:=no}"
|
||||
|
||||
# Builds the open nvidia module and package it into a own base
|
||||
# This does replace the requirement of nvidia-open-dkms
|
||||
# Use this only if you have Turing+ GPU
|
||||
_build_nvidia_open=${_build_nvidia_open-}
|
||||
: "${_build_nvidia_open:=no}"
|
||||
|
||||
# Enable bcachefs
|
||||
_bcachefs=${_bcachefs-}
|
||||
: "${_bcachefs:=no}"
|
||||
|
||||
# Build a debug package with non-stripped vmlinux
|
||||
_build_debug=${_build_debug-}
|
||||
: "${_build_debug:=no}"
|
||||
|
||||
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then
|
||||
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "yes" ]; then
|
||||
_pkgsuffix="cachyos-lts-lto"
|
||||
elif [ "$_use_llvm_lto" = "none" ] && [ -z "$_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then
|
||||
elif [ "$_use_llvm_lto" = "none" ] && [ "$_use_kcfi" != "yes" ] && [ "$_use_gcc_suffix" = "yes" ]; then
|
||||
_pkgsuffix="cachyos-lts-gcc"
|
||||
else
|
||||
_pkgsuffix="cachyos-lts"
|
||||
|
|
@ -179,7 +179,7 @@ fi
|
|||
|
||||
pkgbase="linux-$_pkgsuffix"
|
||||
_major=6.6
|
||||
_minor=70
|
||||
_minor=72
|
||||
#_minorc=$((_minor+1))
|
||||
#_rcver=rc8
|
||||
pkgver=${_major}.${_minor}
|
||||
|
|
@ -189,7 +189,7 @@ _stable=${_major}.${_minor}
|
|||
_srcname=linux-${_stable}
|
||||
#_srcname=linux-${_major}
|
||||
pkgdesc='Linux EEVDF-BORE scheduler Kernel by CachyOS with other patches and improvements'
|
||||
pkgrel=2
|
||||
pkgrel=1
|
||||
_kernver=$pkgver-$pkgrel
|
||||
_kernuname="${pkgver}-${_pkgsuffix}"
|
||||
arch=('x86_64')
|
||||
|
|
@ -220,7 +220,7 @@ source=(
|
|||
"${_patchsource}/all/0001-cachyos-base-all.patch")
|
||||
|
||||
# LLVM makedepends
|
||||
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then
|
||||
if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ "$_use_kcfi" = "yes" ]; then
|
||||
makedepends+=(clang llvm lld)
|
||||
source+=("${_patchsource}/misc/dkms-clang.patch")
|
||||
BUILD_FLAGS=(
|
||||
|
|
@ -237,18 +237,18 @@ if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
|
|||
fi
|
||||
|
||||
# ZFS support
|
||||
if [ -n "$_build_zfs" ]; then
|
||||
if [ "$_build_zfs" = "yes" ]; then
|
||||
makedepends+=(git)
|
||||
source+=("git+https://github.com/cachyos/zfs.git#commit=e65f69e41f4a276d7d0d1800a2878308a0ba84a6")
|
||||
source+=("git+https://github.com/cachyos/zfs.git#commit=76745cf5b86540f80e8e5faea85f8685a1b76caa")
|
||||
fi
|
||||
|
||||
# NVIDIA pre-build module support
|
||||
if [ -n "$_build_nvidia" ]; then
|
||||
if [ "$_build_nvidia" = "yes" ]; then
|
||||
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
|
||||
"${_patchsource}/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch")
|
||||
fi
|
||||
|
||||
if [ -n "$_build_nvidia_open" ]; then
|
||||
if [ "$_build_nvidia_open" = "yes" ]; then
|
||||
source+=("nvidia-open-${_nv_ver}.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${_nv_ver}.tar.gz"
|
||||
"${_patchsource}/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch"
|
||||
"${_patchsource}/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch"
|
||||
|
|
@ -277,7 +277,7 @@ case "$_cpusched" in
|
|||
esac
|
||||
|
||||
## bcachefs Support
|
||||
if [ -n "$_bcachefs" ]; then
|
||||
if [ "$_bcachefs" = "yes" ]; then
|
||||
source+=("${_patchsource}/misc/0001-bcachefs.patch")
|
||||
fi
|
||||
|
||||
|
|
@ -326,19 +326,17 @@ prepare() {
|
|||
fi
|
||||
|
||||
### Use autooptimization
|
||||
if [ -n "$_use_auto_optimization" ]; then
|
||||
if [ "$_use_auto_optimization" = "yes" ]; then
|
||||
"${srcdir}"/auto-cpu-optimization.sh
|
||||
fi
|
||||
|
||||
### Selecting CachyOS config
|
||||
if [ -n "$_cachy_config" ]; then
|
||||
if [ "$_cachy_config" = "yes" ]; then
|
||||
echo "Enabling CachyOS config..."
|
||||
scripts/config -e CACHY
|
||||
fi
|
||||
|
||||
### Selecting the CPU scheduler
|
||||
[ -z "$_cpusched" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_cpusched" in
|
||||
bore|hardened|cachyos) scripts/config -e SCHED_BORE;;
|
||||
eevdf) ;;
|
||||
|
|
@ -351,15 +349,13 @@ prepare() {
|
|||
echo "Selecting ${_cpusched^^} CPU scheduler..."
|
||||
|
||||
### Enable KCFI
|
||||
if [ -n "$_use_kcfi" ]; then
|
||||
if [ "$_use_kcfi" = "yes" ]; then
|
||||
echo "Enabling kCFI"
|
||||
scripts/config -e ARCH_SUPPORTS_CFI_CLANG \
|
||||
-e CFI_CLANG
|
||||
fi
|
||||
|
||||
### Select LLVM level
|
||||
[ -z "$_use_llvm_lto" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_use_llvm_lto" in
|
||||
thin) scripts/config -e LTO -e LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG_THIN -d LTO_NONE -e HAS_LTO_CLANG -d LTO_CLANG_FULL -e LTO_CLANG_THIN -e HAVE_GCC_PLUGINS;;
|
||||
full) scripts/config -e LTO -e LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG_THIN -d LTO_NONE -e HAS_LTO_CLANG -e LTO_CLANG_FULL -d LTO_CLANG_THIN -e HAVE_GCC_PLUGINS;;
|
||||
|
|
@ -370,8 +366,6 @@ prepare() {
|
|||
echo "Selecting '$_use_llvm_lto' LLVM level..."
|
||||
|
||||
### Select tick rate
|
||||
[ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_HZ_ticks" in
|
||||
100|250|500|600|750|1000)
|
||||
scripts/config -d HZ_300 -e "HZ_${_HZ_ticks}" --set-val HZ "${_HZ_ticks}";;
|
||||
|
|
@ -384,7 +378,7 @@ prepare() {
|
|||
echo "Setting tick rate to ${_HZ_ticks}Hz..."
|
||||
|
||||
### Disable NUMA
|
||||
if [ -n "$_NUMAdisable" ]; then
|
||||
if [ "$_NUMAdisable" = "yes" ]; then
|
||||
echo "Disabling NUMA from kernel config..."
|
||||
scripts/config -d NUMA \
|
||||
-d AMD_NUMA \
|
||||
|
|
@ -403,25 +397,20 @@ prepare() {
|
|||
|
||||
### Setting NR_CPUS
|
||||
if [[ "$_nr_cpus" -ge 2 && "$_nr_cpus" -le 512 ]]; then
|
||||
echo "Setting custom NR_CPUS..."
|
||||
echo "Setting NR_CPUS..."
|
||||
scripts/config --set-val NR_CPUS "$_nr_cpus"
|
||||
elif [ -z "$_nr_cpus" ]; then
|
||||
echo "Setting default NR_CPUS..."
|
||||
scripts/config --set-val NR_CPUS 320
|
||||
else
|
||||
_die "The value '$_nr_cpus' is invalid. Please select a numerical value from 2 to 512..."
|
||||
fi
|
||||
|
||||
### Select performance governor
|
||||
if [ -n "$_per_gov" ]; then
|
||||
if [ "$_per_gov" = "yes" ]; then
|
||||
echo "Setting performance governor..."
|
||||
scripts/config -d CPU_FREQ_DEFAULT_GOV_SCHEDUTIL \
|
||||
-e CPU_FREQ_DEFAULT_GOV_PERFORMANCE
|
||||
fi
|
||||
|
||||
### Select tick type
|
||||
[ -z "$_tickrate" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_tickrate" in
|
||||
perodic) scripts/config -d NO_HZ_IDLE -d NO_HZ_FULL -d NO_HZ -d NO_HZ_COMMON -e HZ_PERIODIC;;
|
||||
idle) scripts/config -d HZ_PERIODIC -d NO_HZ_FULL -e NO_HZ_IDLE -e NO_HZ -e NO_HZ_COMMON;;
|
||||
|
|
@ -435,8 +424,6 @@ prepare() {
|
|||
|
||||
# We should not set up the PREEMPT for RT kernels
|
||||
if [[ "$_cpusched" != "rt" || "$_cpusched" != "rt-bore" ]]; then
|
||||
[ -z "$_preempt" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_preempt" in
|
||||
full) scripts/config -e PREEMPT_BUILD -d PREEMPT_NONE -d PREEMPT_VOLUNTARY -e PREEMPT -e PREEMPT_COUNT -e PREEMPTION -e PREEMPT_DYNAMIC;;
|
||||
voluntary) scripts/config -e PREEMPT_BUILD -d PREEMPT_NONE -e PREEMPT_VOLUNTARY -d PREEMPT -e PREEMPT_COUNT -e PREEMPTION -d PREEMPT_DYNAMIC;;
|
||||
|
|
@ -448,7 +435,7 @@ prepare() {
|
|||
fi
|
||||
|
||||
### Enable O3
|
||||
if [ -n "$_cc_harder" ] && [ -z "$_cc_size" ]; then
|
||||
if [ "$_cc_harder" = "yes" ]; then
|
||||
echo "Enabling KBUILD_CFLAGS -O3..."
|
||||
scripts/config -d CC_OPTIMIZE_FOR_PERFORMANCE \
|
||||
-e CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
||||
|
|
@ -471,7 +458,7 @@ prepare() {
|
|||
fi
|
||||
|
||||
### Enable bbr3
|
||||
if [ -n "$_tcp_bbr3" ]; then
|
||||
if [ "$_tcp_bbr3" = "yes" ]; then
|
||||
echo "Disabling TCP_CONG_CUBIC..."
|
||||
scripts/config -m TCP_CONG_CUBIC \
|
||||
-d DEFAULT_CUBIC \
|
||||
|
|
@ -485,8 +472,6 @@ prepare() {
|
|||
fi
|
||||
|
||||
### Select LRU config
|
||||
[ -z "$_lru_config" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_lru_config" in
|
||||
standard) scripts/config -e LRU_GEN -e LRU_GEN_ENABLED -d LRU_GEN_STATS;;
|
||||
stats) scripts/config -e LRU_GEN -e LRU_GEN_ENABLED -e LRU_GEN_STATS;;
|
||||
|
|
@ -497,8 +482,6 @@ prepare() {
|
|||
echo "Selecting '$_lru_config' LRU_GEN config..."
|
||||
|
||||
### Select VMA config
|
||||
[ -z "$_vma_config" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_vma_config" in
|
||||
standard) scripts/config -e PER_VMA_LOCK -d PER_VMA_LOCK_STATS;;
|
||||
stats) scripts/config -e PER_VMA_LOCK -e PER_VMA_LOCK_STATS;;
|
||||
|
|
@ -509,8 +492,6 @@ prepare() {
|
|||
echo "Selecting '$_vma_config' PER_VMA_LOCK config..."
|
||||
|
||||
### Select THP
|
||||
[ -z "$_hugepage" ] && _die "The value is empty. Choose the correct one again."
|
||||
|
||||
case "$_hugepage" in
|
||||
always) scripts/config -d TRANSPARENT_HUGEPAGE_MADVISE -e TRANSPARENT_HUGEPAGE_ALWAYS;;
|
||||
madvise) scripts/config -d TRANSPARENT_HUGEPAGE_ALWAYS -e TRANSPARENT_HUGEPAGE_MADVISE;;
|
||||
|
|
@ -520,7 +501,7 @@ prepare() {
|
|||
echo "Selecting '$_hugepage' TRANSPARENT_HUGEPAGE config..."
|
||||
|
||||
### Enable DAMON
|
||||
if [ -n "$_damon" ]; then
|
||||
if [ "$_damon" = "yes" ]; then
|
||||
echo "Enabling DAMON..."
|
||||
scripts/config -e DAMON \
|
||||
-e DAMON_VADDR \
|
||||
|
|
@ -536,7 +517,7 @@ prepare() {
|
|||
### Disable DEBUG
|
||||
# Doesn't work with sched-ext
|
||||
# More infos here: https://github.com/CachyOS/linux-cachyos/issues/187
|
||||
if [[ "$_cpusched" != "sched-ext" && -n "$_disable_debug" ]]; then
|
||||
if [[ "$_cpusched" != "sched-ext" && "$_disable_debug" = "yes" ]]; then
|
||||
scripts/config -d DEBUG_INFO \
|
||||
-d DEBUG_INFO_BTF \
|
||||
-d DEBUG_INFO_DWARF4 \
|
||||
|
|
@ -558,7 +539,7 @@ prepare() {
|
|||
|
||||
### Optionally use running kernel's config
|
||||
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
|
||||
if [ -n "$_use_current" ]; then
|
||||
if [ "$_use_current" = "yes" ]; then
|
||||
if [[ -s /proc/config.gz ]]; then
|
||||
echo "Extracting config from /proc/config.gz..."
|
||||
# modprobe configs
|
||||
|
|
@ -571,10 +552,9 @@ prepare() {
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
### Optionally load needed modules for the make localmodconfig
|
||||
# See https://aur.archlinux.org/packages/modprobed-db
|
||||
if [ -n "$_localmodcfg" ]; then
|
||||
if [ "$_localmodcfg" = "yes" ]; then
|
||||
if [ -e "$_localmodcfg_path" ]; then
|
||||
echo "Running Steven Rostedt's make localmodconfig now"
|
||||
make "${BUILD_FLAGS[@]}" LSMOD="${_localmodcfg_path}" localmodconfig
|
||||
|
|
@ -594,23 +574,23 @@ prepare() {
|
|||
echo "Prepared $pkgbase version $(<version)"
|
||||
|
||||
### Running make nconfig
|
||||
[[ -z "$_makenconfig" ]] || make "${BUILD_FLAGS[@]}" nconfig
|
||||
[ "$_makenconfig" = "yes" ] && make "${BUILD_FLAGS[@]}" nconfig
|
||||
|
||||
### Running make menuconfig
|
||||
[[ -z "$_makemenuconfig" ]] || make "${BUILD_FLAGS[@]}" menuconfig
|
||||
[ "$_makemenuconfig" = "yes" ] && make "${BUILD_FLAGS[@]}" menuconfig
|
||||
|
||||
### Running make xconfig
|
||||
[[ -z "$_makexconfig" ]] || make "${BUILD_FLAGS[@]}" xconfig
|
||||
[ "$_makexconfig" = "yes" ] && make "${BUILD_FLAGS[@]}" xconfig
|
||||
|
||||
### Running make gconfig
|
||||
[[ -z "$_makegconfig" ]] || make "${BUILD_FLAGS[@]}" gconfig
|
||||
[ "$_makegconfig" = "yes" ] && make "${BUILD_FLAGS[@]}" gconfig
|
||||
|
||||
### Save configuration for later reuse
|
||||
echo "Save configuration for later reuse..."
|
||||
local basedir="$(dirname "$(readlink "${srcdir}/config")")"
|
||||
cat .config > "${basedir}/config-${pkgver}-${pkgrel}${pkgbase#linux}"
|
||||
|
||||
if [ -n "$_build_nvidia" ]; then
|
||||
if [ "$_build_nvidia" = "yes" ]; then
|
||||
cd "${srcdir}"
|
||||
sh "${_nv_pkg}.run" --extract-only
|
||||
|
||||
|
|
@ -618,7 +598,7 @@ prepare() {
|
|||
patch -Np1 -i "${srcdir}/0001-Make-modeset-and-fbdev-default-enabled.patch" -d "${srcdir}/${_nv_pkg}/kernel"
|
||||
fi
|
||||
|
||||
if [ -n "$_build_nvidia_open" ]; then
|
||||
if [ "$_build_nvidia_open" = "yes" ]; then
|
||||
patch -Np1 -i "${srcdir}/0001-Make-modeset-and-fbdev-default-enabled.patch" -d "${srcdir}/${_nv_open_pkg}/kernel-open"
|
||||
# Fix for https://bugs.archlinux.org/task/74886
|
||||
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0003-Add-IBT-Support.patch" -d "${srcdir}/${_nv_open_pkg}"
|
||||
|
|
@ -642,20 +622,20 @@ build() {
|
|||
SYSSRC="${srcdir}/${_srcname}"
|
||||
SYSOUT="${srcdir}/${_srcname}"
|
||||
)
|
||||
if [ -n "$_build_nvidia" ]; then
|
||||
if [ "$_build_nvidia" = "yes" ]; then
|
||||
MODULE_FLAGS+=(NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES')
|
||||
cd "${srcdir}/${_nv_pkg}/kernel"
|
||||
make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "$_build_nvidia_open" ]; then
|
||||
if [ "$_build_nvidia_open" = "yes" ]; then
|
||||
cd "${srcdir}/${_nv_open_pkg}"
|
||||
MODULE_FLAGS+=(IGNORE_CC_MISMATCH=yes)
|
||||
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
|
||||
fi
|
||||
|
||||
if [ -n "$_build_zfs" ]; then
|
||||
if [ "$_build_zfs" = "yes" ]; then
|
||||
cd ${srcdir}/"zfs"
|
||||
|
||||
local CONFIGURE_FLAGS=()
|
||||
|
|
@ -846,11 +826,11 @@ _package-nvidia-open(){
|
|||
}
|
||||
|
||||
pkgname=("$pkgbase")
|
||||
[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg")
|
||||
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
|
||||
pkgname+=("$pkgbase-headers")
|
||||
[ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs")
|
||||
[ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia")
|
||||
[ -n "$_build_nvidia_open" ] && pkgname+=("$pkgbase-nvidia-open")
|
||||
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
|
||||
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")
|
||||
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
|
||||
for _p in "${pkgname[@]}"; do
|
||||
eval "package_$_p() {
|
||||
$(declare -f "_package${_p#$pkgbase}")
|
||||
|
|
@ -858,7 +838,7 @@ for _p in "${pkgname[@]}"; do
|
|||
}"
|
||||
done
|
||||
|
||||
sha256sums=('84d23ee07fb26febbcb6d1295ba15efdc67ac382b4137b2c8853146c10fd2f97'
|
||||
sha256sums=('feb9e514930d5968daa0b8b5486d3295d1fb2b34accf876207641884d4baef39'
|
||||
'ef6c30c39066fa6d2fc0f5cb5a8cfe7a8b7ab7706826871f2bed2ec29d6bb153'
|
||||
'1a7747d5b4ccd427d643e3f548cd99c09d0f05b108fc530a581e28a41c5533c9'
|
||||
'2706d935575e114210892b441671037ab96d5f70f084c391a23b43cd96afaa3e'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue