From ac3017fc154278a3a41d074f84639ba0bd804224 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 17 Dec 2020 16:28:36 +0100 Subject: [PATCH] Add RTL8812AU driver from aircrack-ng (#1097) * Add Realtek RTL8812AU out-of-tree driver This adds support for Realtek RTL8812AU devices such as the Hardkernel WiFi Module 5A (with the RTL8811AU chipset, supported by this driver as well). This patch uses Realtek driver 5.9.3.2 which has been made to compile up to Linux 5.10. Note: This driver does not seem to support 5GHz networks! But it seems the only driver which supports the RTL8811AU chipset and also works with recent mainline drivers... * Enable RTL8812AU driver for Hardkernel modules The WiFi Module 5A comes with a RTL8811AU chipset. Enable the driver for all Hardkernel modules. --- buildroot-external/Config.in | 1 + .../board/hardkernel/kernel-amlogic.config | 2 +- .../configs/odroid_c2_defconfig | 1 + .../configs/odroid_c4_defconfig | 1 + .../configs/odroid_n2_defconfig | 1 + .../configs/odroid_xu4_defconfig | 1 + .../package/rtl8812au/Config.in | 10 ++++++++++ .../package/rtl8812au/rtl8812au.mk | 19 +++++++++++++++++++ 8 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 buildroot-external/package/rtl8812au/Config.in create mode 100644 buildroot-external/package/rtl8812au/rtl8812au.mk diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in index 2ffef747f..dc2248fae 100644 --- a/buildroot-external/Config.in +++ b/buildroot-external/Config.in @@ -5,3 +5,4 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in" +source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8812au/Config.in" diff --git a/buildroot-external/board/hardkernel/kernel-amlogic.config b/buildroot-external/board/hardkernel/kernel-amlogic.config index 1aac72e9e..950f62df5 100644 --- a/buildroot-external/board/hardkernel/kernel-amlogic.config +++ b/buildroot-external/board/hardkernel/kernel-amlogic.config @@ -1253,7 +1253,7 @@ CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y CONFIG_CFG80211_DEFAULT_PS=y CONFIG_CFG80211_CRDA_SUPPORT=y -# CONFIG_CFG80211_WEXT is not set +CONFIG_CFG80211_WEXT=y CONFIG_MAC80211=m CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 594e63709..3413d2a29 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -101,3 +101,4 @@ BR2_PACKAGE_HARDKERNEL_BOOT=y BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C2=y BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_RTL8812AU=y diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index 53208b474..9fdb9a279 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -99,3 +99,4 @@ BR2_PACKAGE_APPARMOR=y BR2_PACKAGE_APPARMOR_PROFILES=y BR2_PACKAGE_HARDKERNEL_BOOT=y BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C4=y +BR2_PACKAGE_RTL8812AU=y diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index 9f6f90598..aa333b994 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -101,3 +101,4 @@ BR2_PACKAGE_HARDKERNEL_BOOT=y BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_N2=y BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_RTL8812AU=y diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index c849f7c0b..27e1128bd 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -105,3 +105,4 @@ BR2_PACKAGE_HARDKERNEL_BOOT=y BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_XU4=y BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_RTL8812AU=y diff --git a/buildroot-external/package/rtl8812au/Config.in b/buildroot-external/package/rtl8812au/Config.in new file mode 100644 index 000000000..125d97ecf --- /dev/null +++ b/buildroot-external/package/rtl8812au/Config.in @@ -0,0 +1,10 @@ +comment "RTL8812AU needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_RTL8812AU + bool "Realtek RTL8812AU Wi-Fi driver" + depends on BR2_LINUX_KERNEL + help + Install Realtek RTL8812AU Wi-Fi driver as a kernel module. + + https://github.com/gnab/rtl8812au/ diff --git a/buildroot-external/package/rtl8812au/rtl8812au.mk b/buildroot-external/package/rtl8812au/rtl8812au.mk new file mode 100644 index 000000000..eb721bc6a --- /dev/null +++ b/buildroot-external/package/rtl8812au/rtl8812au.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# Realtek RTL8812AU driver +# +################################################################################ + +RTL8812AU_VERSION = cc4c64deef8090515a3dea8b709bfff0a1007d8b +RTL8812AU_SITE = $(call github,aircrack-ng,rtl8812au,$(RTL8812AU_VERSION)) +RTL8812AU_LICENSE = GPL-2.0 +RTL8812AU_LICENSE_FILES = COPYING +#RTL8812AU_MODULE_SUBDIRS = src + +RTL8812AU_MODULE_MAKE_OPTS = \ + CONFIG_88XXAU=m \ + KVER=$(LINUX_VERSION_PROBED) \ + KSRC=$(LINUX_DIR) + +$(eval $(kernel-module)) +$(eval $(generic-package))