Skip to content

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

Add r8125 module as external package

Eric Naim94aaba512f0e
diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILD
index 3b55c5f2..7e863b78 100644
--- a/linux-cachyos-bmq/PKGBUILD
+++ b/linux-cachyos-bmq/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -214,6 +218,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -502,6 +510,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -683,11 +696,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD
index 82f135a6..89c5a795 100644
--- a/linux-cachyos-bore/PKGBUILD
+++ b/linux-cachyos-bore/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -214,6 +218,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -502,6 +510,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -683,11 +696,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-deckify/PKGBUILD b/linux-cachyos-deckify/PKGBUILD
index bb00b4aa..785b36ac 100644
--- a/linux-cachyos-deckify/PKGBUILD
+++ b/linux-cachyos-deckify/PKGBUILD
@@ -116,6 +116,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -215,6 +219,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -506,6 +514,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -687,11 +700,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD
index 2060001f..3c644079 100644
--- a/linux-cachyos-eevdf/PKGBUILD
+++ b/linux-cachyos-eevdf/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -214,6 +218,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -502,6 +510,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -683,11 +696,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-hardened/PKGBUILD b/linux-cachyos-hardened/PKGBUILD
index 3e9d1153..b5f0db81 100644
--- a/linux-cachyos-hardened/PKGBUILD
+++ b/linux-cachyos-hardened/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -213,6 +217,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0002-Add-IBT-support.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -496,6 +504,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -672,11 +685,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-lts/PKGBUILD b/linux-cachyos-lts/PKGBUILD
index 7f9844a1..fe606811 100644
--- a/linux-cachyos-lts/PKGBUILD
+++ b/linux-cachyos-lts/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -213,6 +217,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0002-Add-IBT-support.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -500,6 +508,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -681,11 +694,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD
index 596b685f..8d182f5a 100644
--- a/linux-cachyos-rc/PKGBUILD
+++ b/linux-cachyos-rc/PKGBUILD
@@ -116,6 +116,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -254,6 +258,10 @@ if [ "$_propeller" = "yes" ] && [ "$_propeller_profiles" = "yes" ]; then
propeller_ld_profile.txt)
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -563,6 +571,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -748,11 +761,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD
index 401a8446..6aed81a5 100644
--- a/linux-cachyos-rt-bore/PKGBUILD
+++ b/linux-cachyos-rt-bore/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -214,6 +218,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -502,6 +510,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -683,11 +696,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos-server/PKGBUILD b/linux-cachyos-server/PKGBUILD
index f56ab4d6..567d5b74 100644
--- a/linux-cachyos-server/PKGBUILD
+++ b/linux-cachyos-server/PKGBUILD
@@ -117,6 +117,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -214,6 +218,10 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-Fix-compile-for-6.19.patch")
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -502,6 +510,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -683,11 +696,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD
index 91057c25..f01647ca 100644
--- a/linux-cachyos/PKGBUILD
+++ b/linux-cachyos/PKGBUILD
@@ -116,6 +116,10 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the r8125 module and package it into its own package
+# Replaces requirement for r8125-dkms
+: "${_build_r8125:=no}"
+
# Build a debug package with non-stripped vmlinux
: "${_build_debug:=no}"
@@ -254,6 +258,10 @@ if [ "$_propeller" = "yes" ] && [ "$_propeller_profiles" = "yes" ]; then
propeller_ld_profile.txt)
fi
+if [ "$_build_r8125" = "yes" ]; then
+ source+=("git+https://github.com/aravance/r8125.git")
+fi
+
## List of CachyOS schedulers
case "$_cpusched" in
bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
@@ -563,6 +571,11 @@ build() {
make "${BUILD_FLAGS[@]}"
fi
+ if [ "$_build_r8125" = "yes" ]; then
+ cd "${srcdir}/r8125"
+ make "${BUILD_FLAGS[@]}" KERNELDIR="$srcdir/$_srcname" modules
+ fi
+
}
_package() {
@@ -755,11 +768,28 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-r8125() {
+ pkgdesc="r8125 modules for the $pkgbase kernel"
+ depends=("$pkgbase=$_kernver")
+ license=('GPL-2.0-only')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/r8125"
+ install -dm755 "${modulesdir}"
+ install -m644 src/*.ko "${modulesdir}"
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
pkgname=("$pkgbase")
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")