diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-30 20:15:15 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-30 20:15:15 +0200 |
| commit | e2f2fa1f8c44ee23cd1d57b4ff5495d6654c6ddb (patch) | |
| tree | d02ecef82324af7a4613e14af5594d1d36269426 | |
| parent | 5b1e8568859d5ff4a096b491aed57bccc1d53646 (diff) | |
| download | my-slackbuilds-e2f2fa1f8c44ee23cd1d57b4ff5495d6654c6ddb.tar.gz my-slackbuilds-e2f2fa1f8c44ee23cd1d57b4ff5495d6654c6ddb.zip | |
Added r8125 kernel driver package
| -rw-r--r-- | .extras/nvchecker.toml | 5 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | r8125/README | 41 | ||||
| -rw-r--r-- | r8125/doinst.sh | 16 | ||||
| -rwxr-xr-x | r8125/r8125.SlackBuild | 110 | ||||
| -rw-r--r-- | r8125/r8125.info | 10 | ||||
| -rw-r--r-- | r8125/r8125.nvchecker | 4 | ||||
| -rw-r--r-- | r8125/slack-desc | 19 |
8 files changed, 206 insertions, 0 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml index 36dbb31..cd5e579 100644 --- a/.extras/nvchecker.toml +++ b/.extras/nvchecker.toml @@ -26,3 +26,8 @@ source = "github" github = "anomalyco/opencode" use_latest_release = true prefix = "v" + +[r8125] +source = "jq" +url = "https://www.realtek.com/Download/ListAllDownloadItem?cate_id=584" +filter = '.Data.DownloadItems["Unix (Linux)"][] | select(.Name | startswith("r8125")) | .Version' @@ -36,6 +36,7 @@ Each package lives in its own top-level subfolder: | llama.cpp-vulkan | ✅ | not tested | ❌ | b8705 | b8705 | | qarma | ✅ | not tested | ❌ | 1.1.1 | 1.1.1 | | opencode-bin | ✅ | not tested | ❌ | 1.4.0 | 1.4.0 | +| r8125 | ✅ | not tested | ❌ | 9.016.01 | 9.016.01 | --- diff --git a/r8125/README b/r8125/README new file mode 100644 index 0000000..82352d9 --- /dev/null +++ b/r8125/README @@ -0,0 +1,41 @@ +r8125 is the out-of-tree Linux kernel driver for Realtek RTL8125 and +RTL8125B 2.5 Gigabit Ethernet controllers with PCI-Express interface. +It provides complete 2.5Gbps support not available in the in-tree r8169 +driver for this hardware revision. + +The resulting package is specific to the kernel it was built against. +You must rebuild this package whenever you upgrade your kernel. + +BUILDING +-------- +To build for the currently running kernel: + + ./r8125.SlackBuild + +To build for a different kernel (e.g. one you have just installed but +not yet booted): + + KERNEL=6.1.0 ./r8125.SlackBuild + +The KERNEL variable must match the directory name under /lib/modules/ +and the kernel build tree must exist at /lib/modules/$KERNEL/build. + +CONFLICT WITH r8169 +------------------- +The in-tree r8169 driver may also bind to RTL8125 hardware. This package +installs a blacklist file to prevent r8169 from loading: + + /etc/modprobe.d/r8169_blacklist.conf + +If the file already exists and has been modified, the new version will +be installed as r8169_blacklist.conf.new for you to review and merge. + +NVCHECKER +--------- +An nvchecker configuration file is installed alongside this README at: + + /usr/doc/r8125-VERSION/r8125.nvchecker + +nvchecker (https://github.com/lilydjwg/nvchecker) is a tool for checking +new versions of software. Copy or include this file in your nvchecker +configuration to be notified when Realtek publishes a new r8125 release. diff --git a/r8125/doinst.sh b/r8125/doinst.sh new file mode 100644 index 0000000..cfc59d8 --- /dev/null +++ b/r8125/doinst.sh @@ -0,0 +1,16 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config etc/modprobe.d/r8169_blacklist.conf.new + +# A good idea whenever kernel modules are added or changed: +if [ -x sbin/depmod ]; then + chroot . /sbin/depmod -a @KERNEL@ 1> /dev/null 2> /dev/null +fi diff --git a/r8125/r8125.SlackBuild b/r8125/r8125.SlackBuild new file mode 100755 index 0000000..95c339e --- /dev/null +++ b/r8125/r8125.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/bash + +# Slackware build script for r8125 + +# Copyright 2026 danix <danix@danix.xyz> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=r8125 +VERSION=${VERSION:-9.016.01} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +KERNEL="${KERNEL:-$(uname -r)}" +PKGVER="$(printf %s "${VERSION}_$KERNEL" | tr - _)" + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +( + unset ARCH + cd /lib/modules/$KERNEL/build + + make \ + M="$TMP/$PRGNAM-$VERSION/src" \ + EXTRA_CFLAGS="$SLKCFLAGS" \ + modules +) + +install -Dm0644 src/$PRGNAM.ko \ + $PKG/lib/modules/$KERNEL/kernel/drivers/net/ethernet/realtek/$PRGNAM.ko + +mkdir -p $PKG/etc/modprobe.d +echo 'blacklist r8169' > $PKG/etc/modprobe.d/r8169_blacklist.conf.new + +cd $TMP/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVER +chmod 644 README # it's 777 from the tarball +cp -a README $PKG/usr/doc/$PRGNAM-$PKGVER/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$PKGVER/$PRGNAM.SlackBuild +cat $CWD/$PRGNAM.nvchecker > $PKG/usr/doc/$PRGNAM-$PKGVER/$PRGNAM.nvchecker + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/r8125/r8125.info b/r8125/r8125.info new file mode 100644 index 0000000..244e302 --- /dev/null +++ b/r8125/r8125.info @@ -0,0 +1,10 @@ +PRGNAM="r8125" +VERSION="9.016.01" +HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software" +DOWNLOAD="https://github.com/danixland/r8125/releases/download/9.016.01/r8125-9.016.01.tar.bz2" +MD5SUM="d1a002299e1fbf502e8eebe459ea8872" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="danix" +EMAIL="danix@danix.xyz" diff --git a/r8125/r8125.nvchecker b/r8125/r8125.nvchecker new file mode 100644 index 0000000..d2fafc1 --- /dev/null +++ b/r8125/r8125.nvchecker @@ -0,0 +1,4 @@ +[r8125] +source = "jq" +url = "https://www.realtek.com/Download/ListAllDownloadItem?cate_id=584" +filter = '.Data.DownloadItems["Unix (Linux)"][] | select(.Name | startswith("r8125")) | .Version' diff --git a/r8125/slack-desc b/r8125/slack-desc new file mode 100644 index 0000000..1f794fd --- /dev/null +++ b/r8125/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +r8125: r8125 (Realtek RTL8125 2.5GbE Linux kernel driver) +r8125: +r8125: This is the out-of-tree Linux kernel driver for Realtek RTL8125/ +r8125: RTL8125B 2.5 Gigabit Ethernet controllers with PCI-Express interface. +r8125: It provides full support for 2.5Gbps operation not found in the +r8125: in-tree r8169 driver for this hardware revision. +r8125: +r8125: Features include EEE (Energy Efficient Ethernet), Wake-on-LAN, +r8125: jumbo frames up to 9KB, VLAN offloading, and NAPI support. +r8125: +r8125: Homepage: https://www.realtek.com/ |
