[OpenWrt-Devel] [PATCH] rtl8812au: Add out-of-tree driver.

greearb at candelatech.com greearb at candelatech.com
Fri Nov 9 19:32:44 EST 2018


From: Ben Greear <greearb at candelatech.com>

It loads now, at least.  Previosly worked on x86 when not trying
to do backports build.  Had to hack on the driver's include files
and some related stuff a bit to get it to compile for OpenWRT.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 package/kernel/rtl8812AU/Makefile | 63 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 package/kernel/rtl8812AU/Makefile

diff --git a/package/kernel/rtl8812AU/Makefile b/package/kernel/rtl8812AU/Makefile
new file mode 100644
index 0000000..6caa002
--- /dev/null
+++ b/package/kernel/rtl8812AU/Makefile
@@ -0,0 +1,63 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rtl8812au-ct
+PKG_RELEASE=1
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=
+
+PKG_SOURCE_URL:=https://github.com/greearb/rtl8812AU_8821AU_linux.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2018-11-09
+PKG_SOURCE_VERSION:=9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4
+PKG_MIRROR_HASH:=
+
+PKG_MAINTAINER:=Ben Greear <greearb at candelatech.com>
+PKG_BUILD_PARALLEL:=1
+#PKG_EXTMOD_SUBDIRS:=rtl8812au-ct
+
+STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/rtl8812au-ct
+  SUBMENU:=Wireless Drivers
+  TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc
+  DEPENDS:=+kmod-mac80211 + at DRIVER_11N_SUPPORT + at DRIVER_11AC_SUPPORT
+  FILES:=\
+	$(PKG_BUILD_DIR)/rtl8812au.ko 
+  AUTOLOAD:=$(call AutoProbe,rtl8812au)
+  PROVIDES:=kmod-rtl8812au
+endef
+
+NOSTDINC_FLAGS = \
+	-I$(PKG_BUILD_DIR) \
+	-I$(PKG_BUILD_DIR)/include \
+	-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
+	-I$(STAGING_DIR)/usr/include/mac80211-backport \
+	-I$(STAGING_DIR)/usr/include/mac80211/uapi \
+	-I$(STAGING_DIR)/usr/include/mac80211 \
+	-include backport/backport.h
+
+define Build/Configure
+	-#echo "rtl8812au-ct:  Nothing to configure."
+endef
+
+NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
+
+MYARCH=$(ARCH)
+ifeq ($(ARCH),aarch64)
+MYARCH=arm64
+endif
+
+define Build/Compile
+	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
+		$(KERNEL_MAKE_FLAGS) \
+		SUBDIRS="$(PKG_BUILD_DIR)" \
+		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
+		modules
+#	(cd $(PKG_BUILD_DIR) && KSRC=$(LINUX_DIR) EXT_EXTRA_CFLAGS="$(EXT_EXTRA_CFLAGS)" ARCH=$(MYARCH) CROSS_COMPILE=$(TARGET_CROSS) $(MAKE) $(CT_MAKEDEFS))
+endef
+
+$(eval $(call KernelPackage,rtl8812au-ct))
-- 
2.4.11


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list