summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-03-29 17:47:08 +0000
committer Eric Hameleers <alien@slackware.com>2020-03-29 17:47:08 +0000
commit7c57be43e7e60a4ec4b2c6450600a6557011cf95 (patch)
treeb595011c5412e1f5a10da24b26c905a462ed5165
parent4147f82525b0395e3c9de24db282b7819fab33a9 (diff)
downloadasb-7c57be43e7e60a4ec4b2c6450600a6557011cf95.tar.gz
asb-7c57be43e7e60a4ec4b2c6450600a6557011cf95.tar.xz
broadcom-sta: used new set of patches to make the source compile again
-rwxr-xr-xbroadcom-sta/build/broadcom-sta.SlackBuild49
1 files changed, 39 insertions, 10 deletions
diff --git a/broadcom-sta/build/broadcom-sta.SlackBuild b/broadcom-sta/build/broadcom-sta.SlackBuild
index 19cda51d..7bc9f89d 100755
--- a/broadcom-sta/build/broadcom-sta.SlackBuild
+++ b/broadcom-sta/build/broadcom-sta.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2016, 2017, 2018 Eric Hameleers, Eindhoven, Netherlands
+# Copyright 2016, 2017, 2018, 2020 Eric Hameleers, Eindhoven, Netherlands
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -14,14 +14,16 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# Since my package no longer compiled, I have borrowed the patches from
+# the SBo script written by: Andreas Voegele <andreas@andreasvoegele.com>
PRGNAM=broadcom-sta
VERSION=${VERSION:-6.30.223.271}
SRCVER=${SRCVER:-35}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-alien}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
KERNEL=${KERNEL:-$( uname -r )}
@@ -61,14 +63,41 @@ mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
tar xvf $CWD/hybrid-v${SRCVER}${ARCHSUFF}-nodebug-pcoem-$( echo $VERSION | tr . _ ).tar.?z || exit 1
-# Add support for newer kernels:
-for KMINOR in 7 8 11 12; do
- cat $CWD/patches/linux4${KMINOR}.patch | patch -p1 --verbose || exit 1
-done
-
# Stability fixes:
-cat $CWD/patches/001-null-pointer-fix.patch | patch -p1 --verbose || exit 1
-cat $CWD/patches/002-rdtscl.patch | patch -p1 --verbose || exit 1
+cat $CWD/patches/04-user_ioctl.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/05-remove-time-and-date-macros.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/13-broadcom-sta-null-pointer-crash.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/14-rdtscl.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/009-fix_mac_profile_discrepancy.patch \
+ | patch -p1 --verbose || exit 1
+if [ -n "${KERNEL##[23].*}" -a -n "${KERNEL##4.[0-6].*}" ]; then
+ sed -i.orig 's/IEEE80211_BAND_\([25]\)GHZ/NL80211_BAND_\1GHZ/g' \
+ src/wl/sys/wl_cfg80211_hybrid.c
+fi
+
+# Add support for newer kernels:
+#cat $CWD/patches/15-linux47.patch \
+# | patch -p2 --verbose || exit 1
+cat $CWD/patches/16-linux48.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/17-fix-kernel-warnings.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/18-linux411.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/19-linux412.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/20-linux414.patch \
+ | patch -p2 --verbose || exit 1
+cat $CWD/patches/21-linux415.patch \
+ | patch -p2 --verbose || exit 1
+
+# See https://lkml.org/lkml/2019/3/1/643
+sed -i 's/get_ds()/KERNEL_DS/g' src/wl/sys/wl_iw.c
+sed -i 's/get_ds()/KERNEL_DS/g' src/wl/sys/wl_cfg80211_hybrid.c
# Make sure ownerships and permissions are sane:
chown -R root:root .