1
0
mirror of https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git synced 2025-04-29 15:19:40 +02:00
Ben Greear ba6fa69560 Openwrt and new compiler related fixes (#285)
* rtw-ap: Fix compiler warning.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* makefile:  Add entry for compiling against openwrt tree.

Users would need to edit it to match their path, but
this should get them started.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* makefile:  Allow defining KSRC outside of build.

So, you can do this:

KSRC=/tmp/my/kernel make

And not have to edit the makefile to have this function as desired.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Fix stack-too-large warning on x86-64 compile

Signed-off-by: Ben Greear <greearb@candelatech.com>

* compile:  Allow cross-compiling on cmd-line w/out editing Makefile

For instance:

KSRC=/home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78 \
 EXT_EXTRA_CFLAGS=-DCONFIG_LITTLE_ENDIAN ARCH=arm64 CROSS_COMPILE=aarch64-openwrt-linux- MODDESTDIR=/tmp make V=1

Signed-off-by: Ben Greear <greearb@candelatech.com>

* build:  Attempt to auto-detect endian-ness.

Will make building in openwrt much easier.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Fix build against openwrt backports tree.

Like breaks builds elsewhere, can fix it up later.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Register wiphy after we probe MAC addr.

This way the phy object has a valid MAC-addr, which can be helpful
for identification.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Make sure MAC is set in wiphy_preinit

This is needed to make sure the phy registers with a proper MAC
address instead of all 00

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Fix build on 4.19 kernel.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Fix compile against 4.20 kernel.

Remove some variable-length arrays (which could be security bugs,
ways to overflow the stack it seems), and remove use of
get_monotonic_boottime.

Signed-off-by: Ben Greear <greearb@candelatech.com>

* Support arm64
2019-03-08 09:22:32 -08:00

2.7 KiB

rtl8812au

Realtek 8812AU/8821AU USB WiFi driver.

for AC1200 (801.11ac) Wireless Dual-Band USB Adapter

This code is base on version 4.3.14 from https://github.com/diederikdehaas/rtl8812AU

Known Supported Devices:

* COMFAST 1200Mbps USB Wireless Adapter(Model: CF-912AC)
* TP-LINK AC1200 Wireless Dual Band USB Adapter(Model: Archer-T4U)

Compiling with DKMS

# sudo make -f Makefile.dkms install

Compiling for Raspberry Pi

Install kernel headers and other dependencies.

# sudo apt-get install linux-image-rpi-rpfv linux-headers-rpi-rpfv dkms build-essential bc

Append following at the end of your /boot/config.txt, reboot your Pi

kernel=vmlinuz-3.10-3-rpi
initramfs initrd.img-3.10-3-rpi followkernel

Edit Makefile and turn on CONFIG_PLATFORM_ARM_RPI, turn off CONFIG_PLATFORM_I386_PC

CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
# cd /usr/src/rtl8812au
# sudo make clean
# sudo make
# sudo make install
# sudo modprobe -a rtl8812au

Compiling for Ubuntu (16.04)

Download archive into temp directory

# mkdir -p /tmp/t4u
# cd /tmp/t4u
# wget https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip

Unzip

# unzip master.zip
# cd rtl8812AU_8821AU_linux-master

Compile and install from source

# make
# sudo make install

Load module

# sudo modprobe -a rtl8812au

Cross-compiling. You can now specify variables on the command line w/out editing

makefile. For instance, this builds against recent OpenWRT neo2 platform. Your

Cross-compile binaries should be in your PATH.

KSRC=/home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78 EXT_EXTRA_CFLAGS=-DCONFIG_LITTLE_ENDIAN ARCH=arm64 CROSS_COMPILE=aarch64-openwrt-linux- MODDESTDIR=/tmp make V=1

Setup DKMS

# sudo apt-get update
# sudo apt-get install dkms
# cd /tmp/t4u/rtl8812AU_8821AU_linux-master/
# sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
# sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
# sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
# sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0

Contributors

  • Anand Babu (AB) Periasamy
  • Andreas Hofmann
  • Andrew Mann
  • AndyPi
  • Anton
  • archshift
  • bits3rpent
  • Chen Minqiang
  • Daiki Tamada
  • Fjodor42
  • gremsto
  • HackDefendr
  • Harshavardhana
  • jjones-jr
  • Joe
  • Joe Acosta
  • John Lenz
  • Jos Dehaes
  • Karl-Philipp Richter
  • Marco Milanesi
  • Mauro Ribeiro
  • Maximilian Schwerin
  • mpoly
  • Nick Bartos
  • Peter H. Li
  • pgroenbech
  • scrivy
  • Taehan Stott
  • Vicent Llongo
  • Victor Azizi
  • 赵迤晨 (Zhao, Yichen)