summaryrefslogtreecommitdiff
path: root/network/r8168
diff options
context:
space:
mode:
authorHunter Sezen <ovariegata@yahoo.com>2018-02-22 06:26:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-02-24 06:55:39 +0700
commit57659cfd3da443f6f19940fb3cdb188cc2a3dfbb (patch)
tree532261e1864858c4980a22a10402e861d2b7ea73 /network/r8168
parent9625d47253dc6aea71a85c9e91019151a2c838e1 (diff)
downloadslackbuilds-57659cfd3da443f6f19940fb3cdb188cc2a3dfbb.tar.gz
network/r8168: Added patch for linux-4.15 kernels.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/r8168')
-rw-r--r--network/r8168/linux-4.15.patch.gzbin0 -> 753 bytes
-rw-r--r--network/r8168/r8168.SlackBuild19
2 files changed, 13 insertions, 6 deletions
diff --git a/network/r8168/linux-4.15.patch.gz b/network/r8168/linux-4.15.patch.gz
new file mode 100644
index 0000000000..343a559c56
--- /dev/null
+++ b/network/r8168/linux-4.15.patch.gz
Binary files differ
diff --git a/network/r8168/r8168.SlackBuild b/network/r8168/r8168.SlackBuild
index 7edc10b946..585eeb33ba 100644
--- a/network/r8168/r8168.SlackBuild
+++ b/network/r8168/r8168.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for r8168
-# Copyright 2016-2017 Hunter Sezen California, USA
+# Copyright 2016-2018 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=r8168
VERSION=${VERSION:-8.045.08}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -40,9 +40,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-KERNEL="${KERNEL:-"$(uname -r)"}"
-PKGVER="$(printf %s "${VERSION}_$KERNEL" | tr - _)"
-
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -72,7 +69,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-env -u ARCH \
+KERNEL="${KERNEL:-"$(uname -r)"}"
+PKGVER="$(printf %s "${VERSION}_$KERNEL" | tr - _)"
+
+ORIGARCH="$ARCH"
+unset ARCH
+
+# Patch for linux 4.15 kernels, from arch
+zcat $CWD/linux-4.15.patch.gz | patch -p1
+
make -C /lib/modules/$KERNEL/build \
SUBDIRS="$TMP/$PRGNAM-$VERSION/src" \
EXTRA_CFLAGS="$SLKCFLAGS" \
@@ -81,6 +86,8 @@ make -C /lib/modules/$KERNEL/build \
install -Dm0644 src/$PRGNAM.ko \
$PKG/lib/modules/$KERNEL/kernel/drivers/net/ethernet/realtek/$PRGNAM.ko
+ARCH="$ORIGARCH"
+
mkdir -p $PKG/etc/modprobe.d
echo 'blacklist r8169' > $PKG/etc/modprobe.d/r8169_blacklist.conf.new