diff options
author | B. Watson <urchlay@slackware.uk> | 2023-01-25 20:05:16 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-01-28 08:23:03 +0700 |
commit | bb57eec93dec84554af4ca3e1c01cd191fc3d7b4 (patch) | |
tree | 42154f6b4ca4cdea432c1dd3df7b4d3499efd9b9 /network | |
parent | ac8b207e149d3623c1fdd25d1f536edcedf0a498 (diff) |
network/rtl8812bu: Added (rtl8812bu wireless network adaptor driver)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r-- | network/rtl8812bu/README | 15 | ||||
-rw-r--r-- | network/rtl8812bu/README.md | 72 | ||||
-rw-r--r-- | network/rtl8812bu/doinst.sh | 3 | ||||
-rw-r--r-- | network/rtl8812bu/git2tarxz.sh | 44 | ||||
-rw-r--r-- | network/rtl8812bu/rtl8812bu.SlackBuild | 87 | ||||
-rw-r--r-- | network/rtl8812bu/rtl8812bu.info | 10 | ||||
-rw-r--r-- | network/rtl8812bu/slack-desc | 19 |
7 files changed, 250 insertions, 0 deletions
diff --git a/network/rtl8812bu/README b/network/rtl8812bu/README new file mode 100644 index 000000000000..2b614552c529 --- /dev/null +++ b/network/rtl8812bu/README @@ -0,0 +1,15 @@ +rtl8812bu (driver for rtl8812bu wireless network adaptors) + +Driver for Realtek wireless adaptors using the rtl8812bu chipset, +including: + +* Cudy WU1200 AC1200 High Gain USB Wi-Fi Adapter +* TP-Link Archer T3U +* TP-Link Archer T3U Plus +* TP-Link Archer T4U V3 +* Linksys WUSB6400M +* Dlink DWA-181 +* Dlink DWA-182 + +For more information, visit the project's home page at: +https://github.com/fastoe/RTL8812BU diff --git a/network/rtl8812bu/README.md b/network/rtl8812bu/README.md new file mode 100644 index 000000000000..10533ba069b3 --- /dev/null +++ b/network/rtl8812bu/README.md @@ -0,0 +1,72 @@ +# Realtek RTL8812BU Driver for Linux + +[![Build Status](https://github.com/fastoe/RTL8812BU/actions/workflows/rtl8812bu.yml/badge.svg)](https://github.com/fastoe/RTL8812BU/actions) + +Driver for 802.11ac USB adapter with RTL8812BU chipset, only STA/Monitor mode is supported, no AP mode. + +A few known wireless cards that use this driver include: +* [Fastoe AC1200 USB Wi-Fi Adapter](https://www.amazon.com/1200Mbps-ChromeBook-802-11ac-Compatible-Raspbian/dp/B081TGWCVB/ref=as_li_ss_tl?m=A9879GOT1YWJ2&marketplaceID=ATVPDKIKX0DER&qid=1581225299&s=merchant-items&sr=1-3&linkCode=ll1&tag=fastoe-20&linkId=5648949a51280f0323dd599dc27dbae4&language=en_US) +* Cudy WU1200 AC1200 High Gain USB Wi-Fi Adapter +* TP-Link Archer T3U +* TP-Link Archer T3U Plus +* TP-Link Archer T4U V3 +* Linksys WUSB6400M +* Dlink DWA-181 +* Dlink DWA-182 + +Currently tested with Linux kernel 4.12.14/4.15.0/5.3.0/5.15.0 on X86_64 platform **only**. + +### For Raspberry Pi +* https://github.com/fastoe/RTL8812BU_for_Raspbian + + +### For kernel 5.11 or later, please clone the v5.13.1 branch: +```bash +sudo apt update +sudo apt install -y build-essential dkms git bc +git clone -b v5.13.1 https://github.com/fastoe/RTL8812BU.git +cd RTL8812BU +make +sudo make install +sudo reboot +``` + +### For 5.10 kernel, please clone the v5.6.1 branch: +```bash +sudo apt update +sudo apt install -y build-essential dkms git bc +git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU.git +cd RTL8812BU +make +sudo make install +sudo reboot +``` + +### For 5.9 and previous versions: +```bash +sudo apt update +sudo apt install -y build-essential dkms git bc +git clone https://github.com/fastoe/RTL8812BU.git +cd RTL8812BU +make +sudo make install +sudo reboot +``` + +For setting monitor mode: + +```bash +# configure for monitor mode +sed -i 's/CONFIG_80211W = n/CONFIG_80211W = y/' Makefile +sed -i 's/CONFIG_WIFI_MONITOR = n/CONFIG_WIFI_MONITOR = y/' Makefile + +make +sudo make install +sudo ip link set wlx1cbfcea97791 down +sudo iw wlx1cbfcea97791 set monitor none +sudo ip link set wlx1cbfcea97791 up +``` + +![image](https://www.fastoe.com/images/2020/05/8812bu-monitor-mode.png) + +Enjoy! diff --git a/network/rtl8812bu/doinst.sh b/network/rtl8812bu/doinst.sh new file mode 100644 index 000000000000..b17f2a673962 --- /dev/null +++ b/network/rtl8812bu/doinst.sh @@ -0,0 +1,3 @@ +if [ -x sbin/depmod ]; then + chroot . /sbin/depmod -a 1> /dev/null 2> /dev/null +fi diff --git a/network/rtl8812bu/git2tarxz.sh b/network/rtl8812bu/git2tarxz.sh new file mode 100644 index 000000000000..fab3f79ae824 --- /dev/null +++ b/network/rtl8812bu/git2tarxz.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Create source tarball from git repo. Takes a branch (not a commit or tag) +# as an argument! Warning, this is different from all the other git2tarxz +# scripts on SBo! + +# Note that this script doesn't need to be run as root. It does need to +# be able to write to the current directory it's run from. + +# Takes one optional argument, which is the *branch* to create a +# tarball of. With no arg, this is used: +BRANCH=${1:-v5.13.1} + +PRGNAM=rtl8812bu +CLONE_URL=https://github.com/fastoe/RTL8812BU + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone -b $BRANCH $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +# don't want our tarball's version number to start with "v": +VERTAG=$( echo $BRANCH | sed 's,^v,,' ) + +VERSION=${VERTAG}+${DATE}_${GIT_SHA} + +find . -name .git\* -print0 | xargs -0 rm -rf + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" diff --git a/network/rtl8812bu/rtl8812bu.SlackBuild b/network/rtl8812bu/rtl8812bu.SlackBuild new file mode 100644 index 000000000000..d6dac2d2fb5e --- /dev/null +++ b/network/rtl8812bu/rtl8812bu.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/bash + +# Slackware build script for rtl8812bu + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20230124 bkw: Just bought one of these devices today, shocked there +# was no driver in Slackware or SBo already. So here it is. + +# Based on rtl8188eu.SlackBuild and rtl8821ce.SlackBuild. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=rtl8812bu +VERSION=${VERSION:-5.13.1+20230115_36deb90} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +KERNEL=${KERNEL:-$(uname -r)} +PKGVER=${VERSION}_$(echo $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 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +export KVER=$KERNEL +env -u ARCH make +install -D -m0644 88x2bu.ko \ + $PKG/lib/modules/$KERNEL/kernel/drivers/net/wireless/88x2bu.ko + +# No docs other than the license, so include our own README. +# Note: don't use $VERSION here, use $PKGVER. The rtl8188eu slackbuild +# doesn't do this (but it should), the rtl8821ce one does. +PKGDOC=$PKG/usr/doc/$PRGNAM-$PKGVER +mkdir -p $PKGDOC +cp -a LICENSE $PKGDOC +cat $CWD/README > $PKGDOC/README +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $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/network/rtl8812bu/rtl8812bu.info b/network/rtl8812bu/rtl8812bu.info new file mode 100644 index 000000000000..9651127653a3 --- /dev/null +++ b/network/rtl8812bu/rtl8812bu.info @@ -0,0 +1,10 @@ +PRGNAM="rtl8812bu" +VERSION="5.13.1+20230115_36deb90" +HOMEPAGE="https://github.com/fastoe/RTL8812BU" +DOWNLOAD="https://slackware.uk/~urchlay/src/rtl8812bu-5.13.1+20230115_36deb90.tar.xz" +MD5SUM="2d6832b9925682f111d7b3c0a7e9cf93" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/network/rtl8812bu/slack-desc b/network/rtl8812bu/slack-desc new file mode 100644 index 000000000000..638e3b5afee2 --- /dev/null +++ b/network/rtl8812bu/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------------------------------------------------------| +rtl8812bu: rtl8812bu (driver for rtl8812bu wireless network adaptors) +rtl8812bu: +rtl8812bu: Driver for Realtek wireless adaptors using the rtl8812bu chipset. +rtl8812bu: +rtl8812bu: For more information, visit the project's home page at: +rtl8812bu: https://github.com/fastoe/RTL8812BU +rtl8812bu: +rtl8812bu: +rtl8812bu: +rtl8812bu: +rtl8812bu: |