summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Simon2019-12-07 18:16:22 +0100
committerJuan Simon2019-12-07 18:16:22 +0100
commit193c93cab7af7bc6218a742112d5221e701d382e (patch)
tree9c5dadcb5f90cd641e46e51902615d58f5565e78
parentbe5d573566cc145d830447fabaaf9b0e3ce27945 (diff)
downloadaur-193c93cab7af7bc6218a742112d5221e701d382e.tar.gz
Modifications needed to compile on kernel 5.4.x
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD21
-rw-r--r--dkms.conf2
-rw-r--r--kernel-5.4.patch12
4 files changed, 31 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4b8dd23820f6..6e6cd25d449c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = r8168-dkms
pkgdesc = A kernel module for Realtek 8168 network cards
pkgver = 8.047.05
- pkgrel = 1
- url = http://www.realtek.com.tw
+ pkgrel = 2
+ url = https://github.com/mtorromeo/r8168
install = r8168-dkms.install
arch = i686
arch = x86_64
@@ -15,8 +15,10 @@ pkgbase = r8168-dkms
conflicts = r8168
source = https://github.com/mtorromeo/r8168/archive/8.047.05/r8168-dkms-8.047.05.tar.gz
source = dkms.conf
+ source = kernel-5.4.patch
sha256sums = 1344bf3d8a1d01a1be8805b48940be1b946b5e694ca75bd14ed1c76fd4c3d67b
- sha256sums = 260d8142e944f3144cbc704534e662d427318d8b32dc7a2852a855be72e8d763
+ sha256sums = e33abcbc8fbe3129459ebc60be3b2f8ed55ddc53755f4956d6feb16c61c43250
+ sha256sums = be79c151c6323bb4d340e31e44fae25a36a93d317812fe5d75c54649ed2508b0
pkgname = r8168-dkms
diff --git a/PKGBUILD b/PKGBUILD
index a15e488bdd16..90ecc6298dff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,12 @@
+# Maintainer: Juan Simón <play4pro at protonmail dot com>
+# Contributor: alium
+# Contributor: angelsl
_pkgbase=r8168
pkgname=${_pkgbase}-dkms
pkgver=8.047.05
-pkgrel=1
+pkgrel=2
pkgdesc="A kernel module for Realtek 8168 network cards"
-url="http://www.realtek.com.tw"
+url="https://github.com/mtorromeo/r8168"
license=("GPL")
arch=('i686' 'x86_64')
depends=('glibc' 'dkms')
@@ -12,13 +15,14 @@ optdepends=('linux-headers: Needed for build the module for Arch kernel'
'linux-lts-headers: Needed for build the module for LTS Arch kernel'
'linux-zen-headers: Needed for build the module for ZEN Arch kernel')
source=(https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz
- dkms.conf)
+ dkms.conf
+ kernel-5.4.patch)
install=r8168-dkms.install
-#prepare() {
-# cd "r8168-$pkgver"
-# patch -p1 -i "$srcdir/linux-4.15-2.patch"
-#}
+prepare() {
+ cd "r8168-$pkgver"
+ patch -Np1 -i "${srcdir}/kernel-5.4.patch"
+}
package() {
@@ -33,4 +37,5 @@ package() {
cp -dr --no-preserve='ownership' src "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/src"
}
sha256sums=('1344bf3d8a1d01a1be8805b48940be1b946b5e694ca75bd14ed1c76fd4c3d67b'
- '260d8142e944f3144cbc704534e662d427318d8b32dc7a2852a855be72e8d763')
+ 'e33abcbc8fbe3129459ebc60be3b2f8ed55ddc53755f4956d6feb16c61c43250'
+ 'be79c151c6323bb4d340e31e44fae25a36a93d317812fe5d75c54649ed2508b0')
diff --git a/dkms.conf b/dkms.conf
index 2a41d4eaed80..fa144011c5d7 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -1,6 +1,6 @@
PACKAGE_NAME="@PKGNAME@"
PACKAGE_VERSION="@PKGVER@"
-MAKE[0]="make -C $kernel_source_dir SUBDIRS=$dkms_tree/$module/$module_version/build/src EXTRA_CFLAGS='-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN' modules"
+MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$module/$module_version/build/src EXTRA_CFLAGS='-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN' modules"
CLEAN="rm src/@PKGNAME@.ko src/*.o || true"
BUILT_MODULE_NAME[0]="@PKGNAME@"
BUILT_MODULE_LOCATION[0]="src/"
diff --git a/kernel-5.4.patch b/kernel-5.4.patch
new file mode 100644
index 000000000000..f59265e8bc97
--- /dev/null
+++ b/kernel-5.4.patch
@@ -0,0 +1,12 @@
+diff -u -r r8168-8.047.05/src/r8168_n.c r8168-8.047.05-5.4/src/r8168_n.c
+--- r8168-8.047.05/src/r8168_n.c 2019-11-25 18:01:38.000000000 +0000
++++ r8168-8.047.05-5.4/src/r8168_n.c 2019-11-25 23:36:15.427988367 +0000
+@@ -56,7 +56,7 @@
+ #include <linux/rtnetlink.h>
+ #include <linux/completion.h>
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) && LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
+ #include <linux/pci-aspm.h>
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37)