Date: Sunday, April 30, 2023 @ 21:09:58
Author: freswa
Revision: 1455516
archrelease: copy trunk to community-staging-x86_64
Added:
r8168-lts/repos/community-staging-x86_64/
r8168-lts/repos/community-staging-x86_64/0001-Linux-6.1.patch
(from rev 1455515, r8168-lts/trunk/0001-Linux-6.1.patch)
r8168-lts/repos/community-staging-x86_64/PKGBUILD
(from rev 1455515, r8168-lts/trunk/PKGBUILD)
r8168-lts/repos/community-staging-x86_64/keys/
----------------------+
0001-Linux-6.1.patch | 25 ++++++++++++++++++++++++
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
Copied: r8168-lts/repos/community-staging-x86_64/0001-Linux-6.1.patch (from rev
1455515, r8168-lts/trunk/0001-Linux-6.1.patch)
===================================================================
--- community-staging-x86_64/0001-Linux-6.1.patch
(rev 0)
+++ community-staging-x86_64/0001-Linux-6.1.patch 2023-04-30 21:09:58 UTC
(rev 1455516)
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <[email protected]>
+Date: Mon, 12 Dec 2022 00:44:23 +0000
+Subject: [PATCH] Linux 6.1
+
+---
+ src/r8168.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8168.h b/src/r8168.h
+index 511c648a6c05..62393f414aa9 100755
+--- a/src/r8168.h
++++ b/src/r8168.h
+@@ -566,7 +566,11 @@ typedef int *napi_budget;
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)
netif_napi_add_weight(ndev, &priv->napi, function, weight)
++#else
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev,
&priv->napi, function, weight)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr,
priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr) struct net_device *dev =
priv_ptr->dev;
Copied: r8168-lts/repos/community-staging-x86_64/PKGBUILD (from rev 1455515,
r8168-lts/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-30 21:09:58 UTC (rev 1455516)
@@ -0,0 +1,51 @@
+# Maintainer: Massimiliano Torromeo <[email protected]>
+
+pkgname=r8168-lts
+pkgver=8.051.02
+pkgrel=31
+pkgdesc="A kernel module for Realtek 8168 network cards for linux-lts"
+url="http://www.realtek.com.tw"
+license=("GPL")
+arch=('x86_64')
+makedepends=('linux-lts-headers')
+source=(https://github.com/mtorromeo/r8168/archive/$pkgver/r8168-$pkgver.tar.gz
+
https://github.com/mtorromeo/r8168/releases/download/$pkgver/r8168-$pkgver.tar.gz.asc
+ 0001-Linux-6.1.patch)
+sha256sums=('76f1c6f0b273d6a31bdb3e98c39a54f50a65766b99d485f9b4ddeda30dcd11d8'
+ 'SKIP'
+ 'd178c927b2619b4f5013ab965168b3f9ddc67e7cf4b32a0edca5906739032393')
+validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF')
+
+prepare() {
+ cd "r8168-$pkgver"
+ patch -Np1 -i ../0001-Linux-6.1.patch
+}
+
+build() {
+ cd "r8168-$pkgver"
+ # avoid using the Makefile directly -- it doesn't understand
+ # any kernel but the current.
+ make -C /usr/src/linux-lts M="$PWD/src" \
+ ENABLE_USE_FIRMWARE_FILE=y \
+ CONFIG_R8168_NAPI=y \
+ CONFIG_R8168_VLAN=y \
+ CONFIG_ASPM=y \
+ ENABLE_S5WOL=y \
+ ENABLE_EEE=y \
+ modules
+}
+
+package() {
+ depends=('glibc' 'linux-lts')
+
+ local
extradir=/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules
+ cd "r8168-$pkgver"
+ install -Dt "$pkgdir$extradir" -m644 src/*.ko
+ find "$pkgdir" -name '*.ko' -exec strip --strip-debug {} +
+ find "$pkgdir" -name '*.ko' -exec xz {} +
+
+ echo "blacklist r8169" | \
+ install -Dm644 /dev/stdin
"$pkgdir/usr/lib/modprobe.d/$pkgname.conf"
+}
+
+# vim:set sw=0 noet: