rtl8812AU and/or rtl8814AU drivers

So this thing exists. https://gist.github.com/Ins1ghtLabs/c346f7ed4f257d1b4a2d
I had to make some edits to get it to even attempt to compile something...
https://gist.github.com/weedy/cb042f4a11d2a5f94d1b228820be9184/revisions

But now I'm stumped. It's been ages since I added any packages and I've never added a kernel driver.

Should the makefile even have this much stuff in it? I can't see how this makefile ever did
anything for this guy unless he had a completely different build system.

If anyone could either post a working package or show me the way that would be nice.

Hi @weedy - I gave it a try here and the main issue is that no CONFIG_RTL8821AU=m variable is passed to the actual make invocation, so the build of 8812au.ko is not getting triggered.

The huge bunch of make rules between define KernelPackage/rtl8812au and define Build/Compile is superfluous at best and can be completely removed.

The Build/Prepare recipe is unnecessary as well as it basically just prints the build directory, before calling default functionality.

Finally you should import kernel-defaults.mk to get $(KERNEL_MAKEOPTS) which provides all required kbuild make arguments to properly cross compile external modules.

After applying the change suggestions above I end up with the following Makefile which produces an .ipk containing 8812au.ko for me.

The updated Makefile is here:

3 Likes

Thanks a lot for your time.

So dropping the makefile in package/8812au/, but it errors out.

make[3]: Entering directory '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27'
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/core/rtw_cmd.o
In file included from /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/include/byteorder/little_endian.h:30:0,
                 from /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/include/rtw_byteorder.h:30,
                 from /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/include/drv_types.h:33,
                 from /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/core/rtw_cmd.c:22:
/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/include/byteorder/swab.h:114:29: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 __inline static const __u16 __fswab16(__u16 x)
                             ^
/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-688f6ac5e412ecfa074d33d95e9c11202f301d95/include/byteorder/swab.h:114:29: error: conflicting types for '__fswab16'

I wasn't sure the build system was pulling the right branch so I forked the repo. Also my gist didn't have the right commit so that didn't help things.

Now I don't error out, but I also don't build anything.

make V=s package/8812au/{clean,install}
rm -f /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.configured_*
touch /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.configured_yyyyyyyyy
make -C /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27 HOSTCFLAGS="-O2 -I/home/weedy/projects/openwrt-lede/staging_dir/host/include -I/home/weedy/projects/openwrt-lede/staging_dir/host/usr/include -I/home/weedy/projects/openwrt-lede/staging_dir/target-mips_24kc_musl-1.1.15/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Tue Oct 25 15:51:08 2016" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/weedy/projects/openwrt-lede/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  CC="mips-openwrt-linux-musl-gcc" M=/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d CONFIG_RTL8812A=y CONFIG_RTL8821AU=y modules
make[3]: Entering directory '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27'
  Building modules, stage 2.
  MODPOST 0 modules
make[3]: Leaving directory '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27'

But the source isn't broken.

weedy@HAF ~/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d $ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.7.9-zen+/build M=/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d  modules
make[1]: Entering directory '/usr/src/linux-4.99-zen0'
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_cmd.o
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_security.o
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_debug.o
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_io.o
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_ioctl_query.o
  CC [M]  /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_ioctl_set.o
^Cmake[2]: *** Deleting file '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_ioctl_set.o'
make[2]: *** [scripts/Makefile.build:290: /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/core/rtw_ioctl_set.o] Interrupt
make[1]: *** [Makefile:1460: _module_/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d] Interrupt

But the build system is????

weedy@HAF ~/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d $ PATH="/home/weedy/projects/openwrt-lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.15/bin/:$PATH" make ARCH="mips" CROSS_COMPILE="mips-openwrt-linux-musl-" -C /home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27 M=/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d modules
make: Entering directory '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27'
mips-openwrt-linux-musl-gcc: warning: environment variable 'STAGING_DIR' not defined
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory '/home/weedy/projects/openwrt-lede/build_dir/target-mips_24kc_musl-1.1.15/linux-ar71xx_generic/linux-4.4.27'

My tree is probably from mid October. Should I sync up with whatever you are using? Is my tree broken somehow?

I thought it might be your CONFIG_RTL8821AU vs. RealTeks CONFIG_RTL8821A, nope.
I thought it might be your =m vs. RealTeks =y, nope.

Again I'm stumped. Can I bother you for some more of your time?

It seems the driver ships a private include file which attempts to redefine some of the common byte swap functions of the kernel, leading to the issue you've seen.

I only quickly build tested my Makefile on x86, maybe it is different in this regard. As a quick hack, try passing USER_EXTRA_CFLAGS="-D_LINUX_BYTEORDER_SWAB_H" to make which should inhibit the redefinitions.

Updated Makefile:

It needed more work but I got something finally. Now I guess my problem is RealTek sucks. I added a DEPENDS and got it to use the right endian.
DEPENDS:=+kmod-cfg80211 +kmod-mac80211 +kmod-usb-core @USB_SUPPORT +@DRIVER_11N_SUPPORT

[ 651.942019] 8814au: Unknown symbol cfg80211_connect_result (err 0)

Also it seems like my test 32mb router isn't enough to run this all the time. (I never even build luci)

[  643.593125] insmod: page allocation failure: order:6, mode:0x24040c0
[  643.599764] CPU: 0 PID: 3527 Comm: insmod Not tainted 4.4.27 #0
[  643.605909] Stack : 803d0984 00000000 00000001 80430000 81986f80 8041ad83 803b204c 00000dc7
[  643.605909] 	  8048379c c14b2400 00000040 0000002e 0000002e 800a71f8 00000006 00000001
[  643.605909] 	  00000000 00000000 803b5ac4 81427c74 80486542 800a5174 8041a3f0 00000000
[  643.605909] 	  00000001 801f2f00 00000000 00000000 00000000 00000000 00000000 00000000
[  643.605909] 	  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  643.605909] 	  ...
[  643.642970] Call Trace:
[  643.645533] [<80071b40>] show_stack+0x50/0x84
[  643.650048] [<800d5c2c>] warn_alloc_failed+0xf8/0x11c
[  643.655298] [<800d80b0>] __alloc_pages_nodemask+0x598/0x6f0
[  643.661071] [<800eaec4>] kmalloc_order+0x14/0x48
[  643.665869] [<80075128>] module_frob_arch_sections+0xc4/0x114
[  643.671821] [<800c3dbc>] load_module+0x470/0x1b68
[  643.676704] [<800c55cc>] SyS_init_module+0x118/0x168
[  643.681850] [<8006295c>] syscall_common+0x30/0x54
[  643.686728] 
[  643.688272] Mem-Info:
[  643.690642] active_anon:981 inactive_anon:32 isolated_anon:0
[  643.690642]  active_file:490 inactive_file:369 isolated_file:0
[  643.690642]  unevictable:0 dirty:0 writeback:0 unstable:0
[  643.690642]  slab_reclaimable:158 slab_unreclaimable:1154
[  643.690642]  mapped:904 shmem:34 pagetables:70 bounce:0
[  643.690642]  free:1117 free_pcp:0 free_cma:0
[  643.723457] Normal free:4468kB min:1024kB low:1280kB high:1536kB active_anon:3924kB inactive_anon:128kB active_file:1960kB inactive_file:1476kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:32768kB managed:27872kB mlocked:0kB dirty:0kB writeback:0kB mapped:3616kB shmem:136kB slab_reclaimable:632kB slab_unreclaimable:4616kB kernel_stack:368kB pagetables:280kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:120 all_unreclaimable? no
[  643.768573] lowmem_reserve[]: 0 0
[  643.772022] Normal: 103*4kB (UM) 69*8kB (M) 41*16kB (UM) 17*32kB (U) 16*64kB (UM) 10*128kB (UM) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 4468kB
[  643.785856] 893 total pagecache pages
[  643.789642] 0 pages in swap cache
[  643.793071] Swap cache stats: add 0, delete 0, find 0/0
[  643.798482] Free swap  = 0kB
[  643.801454] Total swap = 0kB
[  643.804430] 8192 pages RAM
[  643.807240] 0 pages HighMem/MovableOnly
[  643.811202] 1224 pages reserved

do you have an updated makefile, I'm trying to use this adapter on x64 and it seems that is not starting to compile

make[3]: Entering directory '/home/luci/android/lede_64/package/kernel/8812au'
. /home/luci/android/lede_64/include/shell.sh; gzip -dc /home/luci/android/lede_64/dl/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d.tar.gz | tar -C /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.. -xf - [ ! -d ./src/ ] || cp -fpR ./src/* /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d
touch /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.prepared_e3833b6c1bdf665a7def0f6d267efa3d
rm -f /home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/stamp/.8812au_installed (cd /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/./; if [ -x ./configure ]; then find /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/ -name config.guess | xargs -r chmod u+w; find /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/ -name config.guess | xargs -r -n1 cp --remove-destination /home/luci/android/lede_64/scripts/config.guess; find /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/ -name config.sub | xargs -r chmod u+w; find /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/ -name config.sub | xargs -r -n1 cp --remove-destination   /home/luci/android/lede_64/scripts/config.sub; AR="x86_64-openwrt-linux-musl-gcc-ar" AS="x86_64-openwrt-linux-musl-        gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d:RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=x86_64-openwrt-linux-musl-ld NM="x86_64-openwrt-linux-musl-gcc-nm" CC="x86_64-openwrt-linux-musl-gcc" GCC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" RANLIB="x86_64-openwrt-linux-musl-gcc-ranlib" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d:RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d:RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/usr/include -I/home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/include -I/home/luci/android/lede_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.15/usr/include -I/home/luci/android/lede_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.15/include/fortify -I/home/luci/android/lede_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.15/include " LDFLAGS="-L/home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/usr/lib -L/home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/lib -L/home/luci/android/lede_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.15/usr/lib -L/home/luci/android/lede_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.15/lib -znow -zrelro "   ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls   ; fi; )
rm -f /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.configured_*
touch /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.configured_yyynnnn
make -C /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/linux-4.4.30 HOSTCFLAGS="-O2 -I/home/luci/android/lede_64/staging_dir/host/include -I/home/luci/android/lede_64/staging_dir/host/usr/include -I/home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Sat Nov 12 15:30:06 2016" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/luci/android/lede_64/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  CC="x86_64-openwrt-linux-musl-gcc" M=/home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d CONFIG_RTL8812A=y CONFIG_RTL8821AU=y modules
make[4]: Entering directory '/home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/linux-4.4.30'
  Building modules, stage 2.
  MODPOST 0 modules
make[4]: Leaving directory '/home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/linux-4.4.30'
touch /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/.built
mkdir -p /home/luci/android/lede_64/bin/targets/x86/64/packages /home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/ipkg-x86_64/kmod-rtl8812au/CONTROL /home/luci/android/lede_64/staging_dir/target-x86_64_musl-1.1.15/pkginfo
ERROR: module '/home/luci/android/lede_64/build_dir/target-x86_64_musl-1.1.15/linux-x86_64/RTL8812A-a422338714853794b7cfb8ed7e2fcec355b4399d/8812au.ko' is missing.
Makefile:41: recipe for target '/home/luci/android/lede_64/bin/targets/x86/64/packages/kmod-rtl8812au_4.4.30+2016-09-11-a422338714853794b7cfb8ed7e2fcec355b4399d_x86_64.ipk' failed
make[3]: *** [/home/luci/android/lede_64/bin/targets/x86/64/packages/kmod-rtl8812au_4.4.30+2016-09-11-a422338714853794b7cfb8ed7e2fcec355b4399d_x86_64.ipk] Error 1
make[3]: Leaving directory '/home/luci/android/lede_64/package/kernel/8812au' package/Makefile:127: recipe for target 'package/kernel/8812au/compile' failed
make[2]: *** [package/kernel/8812au/compile] Error 2

Regards

Sorry for the delay.

so I tryed a modprobe 8812au and I get this
[ 94.443426] 8812au: Unknown symbol cfg80211_connect_result (err 0)

regards

I get the same.
So it's broken on mips and x86. I'm guessing it needs a patch for whatever magic LEDE does with compat wifi.
As I said I'm not a kernel dev so I can't do it. Maybe we can get lucky from someone finding the forum.

@weedy please look into this
https://github.com/diederikdehaas/rtl8812AU/issues/57

and this

https://github.com/dl12345/rtl8812au

I've got my 8812au started

regards

Did someone try to use this AUR driver? They claim to have rtl8812au working in ac ap mode.

https://bbs.archlinux.org/viewtopic.php?id=213230
https://github.com/Grawp/rtl8812au_rtl8821au

Hi!!

Do you have your rtl8812au adapter working plugged to your router USB port?? Can you scan and connect to a wireless network???

If yes, could you explain me how to compile Lede for your router model?? I have compiled some Lede firmware trying to apply patches but my rtl8812au adapter is not recognized by the router.

Thanks!!

I've tested it, but it didn't start in AP mode, didn't tried the client mode, I think that the driver uses the WEXT extension or other than the standard, maybe a manual setup should work but I didn't had time to test further despite that I'm very interested in using USB AC adapter

First manually copy compat-wireless "Module.symvers" located in build_dir/target.../linux-.../compat-wireless into the folder "staging_dir/target.../usr/include/mac80211/Module.symvers" as to allow proper linking.

then you need to go in package/kernel and

git clone https://github.com/dl12345/rtl8812au.git

after that the driver should appear in kernel/wireless section of menuconfig

regards

Can you provide a little more detail about how you build this, i downloaded the SDK but i cant find any compat-wireless. and the is not kernel folder under package just linux . Any help will be appreciated trying to build this driver to use on a rasberry pi.

pi 1 ?
I have one, I'll make a build and copy paste the commands

regards

I have a Pi3, but the commands should be similar
Thanks

root@lede:~# uname -a
Linux lede 4.4.53 #0 Tue Mar 14 12:29:03 2017 mips GNU/Linux
root@lede:~# modinfo 8812au
module:         /lib/modules/4.4.53/8812au.ko
license:        GPL
depends:        cfg80211,usbcore

modprobe results:

Wed Mar 15 02:25:05 2017 kern.warn kernel: [  308.411528] RTL871X: module init start
Wed Mar 15 02:25:05 2017 kern.warn kernel: [  308.415364] RTL871X: 8812au v4.3.21_17997.20160531
Wed Mar 15 02:25:05 2017 kern.info kernel: [  308.420524] usbcore: registered new interface driver 8812au
Wed Mar 15 02:25:05 2017 kern.warn kernel: [  308.426183] RTL871X: module init ret=0

This is where I'm at currently. I can't test just yet, tomorrow I should be getting my adapter and I'll give it a shot. :slight_smile:
It also should have enough of the code from https://github.com/astsam/rtl8812au to support monitor mode and frame injection. (still, as of right now, this is untested in any mode).

you should make a build first so that you have the Module.symvers from wireless compat prepared
after that in the root of lede sdk
(pi3b is aarch64_cortex-a53+neon-vfpv4)

cp build_dir/target-aarch64_cortex-a53\+neon-vfpv4_musl/linux-brcm2708_bcm2710/compat-wireless-2017-01-31/Module.symvers staging_dir/target-aarch64_cortex-a53\+neon-vfpv4_musl/usr/include/mac80211/
cd package/kernel
git clone https://github.com/dl12345/rtl8812au.git
cd ../..
make menuconfig

(select the driver from wireless kernel submenu)
anyway on pi3b target the realtek driver from dl12345 github is failing to compile
maybe you could try this one

cd package/kernel
git clone https://github.com/weedy/lede-rtl8812au-rtl8814au.git

regards

my 8812au is loaded and i can scan with the card (seeing APs on both bands) but im having issues actually using iwconfig or iw to do much of anything. usually i have to rmmod modprobe again, if i try anything in luci that connects an network interface to a wireless interface (which creates another phy# increment by 1?) because of wlan2 (the interface for the card) getting removed. i've successfully compiled 4 versions of the driver and got them loaded, they all do it when trying to get this card up in any mode. the versions i've compiled and loaded successfully are 4.3.14, 4.3.20, 4.3.21-beta, and 4.3.22-beta. im not exactly sure where to go from here.

this is the same error, it happens on every driver i've built so far.

Thu Mar 16 18:43:13 2017 kern.warn kernel: [  210.448324] RTL871X: rtw_ndev_uninit(wlan2) if1
Thu Mar 16 18:43:13 2017 daemon.notice netifd: radio2 (3925): command failed: Not supported (-122)
Thu Mar 16 18:43:13 2017 kern.warn kernel: [  210.959064] RTL871X: cfg80211_rtw_set_wiphy_params
Thu Mar 16 18:43:13 2017 kern.warn kernel: [  211.294681] RTL871X: cfg80211_rtw_add_virtual_intf wiphy:phy2, name:wlan2, type:3
Thu Mar 16 18:43:13 2017 kern.warn kernel: [  211.302282] RTL871X: cfg80211_rtw_add_virtual_intf ndev:  (null), ret:-19
Thu Mar 16 18:43:13 2017 daemon.notice netifd: radio2 (3925): command failed: No such device (-19)

here is the full output (i edited the mac address but thats it):

Tried both of them but both failed to build