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

Hauke Mehrtens hauke at hauke-m.de
Sat Nov 24 08:37:07 EST 2018


On 11/10/18 1:32 AM, greearb at candelatech.com wrote:
> 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.

Having fun with Realtek drivers? ;-)

> 
> 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

Just leave this Configure out

> +
> +NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
> +
> +MYARCH=$(ARCH)
> +ifeq ($(ARCH),aarch64)
> +MYARCH=arm64
> +endif

Use LINUX_KARCH instead if needed or KERNEL_MAKE_FLAGS.

> +
> +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))

Why is this line commented?

> +endef
> +
> +$(eval $(call KernelPackage,rtl8812au-ct))
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181124/13085a8c/attachment.sig>
-------------- next part --------------
_______________________________________________
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