2020-03-03 14:33:08 +08:00
|
|
|
#
|
2021-01-05 16:16:09 +08:00
|
|
|
# Copyright (C) 2020 CTCGFW Project-OpenWrt
|
2020-03-03 14:33:08 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=rtl8821cu
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2020-08-09 14:08:11 +08:00
|
|
|
PKG_SOURCE_DATE:=2020-07-27
|
|
|
|
PKG_SOURCE_VERSION:=93b04bfcd293fdd7d98d5a7c964ae9416a40159c
|
2021-01-05 16:16:09 +08:00
|
|
|
PKG_MIRROR_HASH:=e3d798355625bd71596ce08741e1f7f3523951e91be775edf2a936ab260bd5de
|
2020-03-03 14:33:08 +08:00
|
|
|
|
|
|
|
PKG_MAINTAINER:=[CTCGFW] Project OpenWrt
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
2021-01-05 16:16:09 +08:00
|
|
|
PKG_LICENSE:=GPLv2
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
|
2020-08-12 12:02:02 +08:00
|
|
|
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2020-03-03 14:33:08 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define KernelPackage/rtl8821cu
|
|
|
|
SUBMENU:=Wireless Drivers
|
2021-01-05 16:16:09 +08:00
|
|
|
TITLE:=Realtek RTL8811CU/RTL8821CU support
|
2020-12-21 00:05:13 +08:00
|
|
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
2020-03-03 14:33:08 +08:00
|
|
|
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
|
|
|
|
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
|
|
|
|
PROVIDES:=kmod-rtl8821cu
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/rtl8821cu/description
|
2021-01-05 16:16:09 +08:00
|
|
|
Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver.
|
2020-03-03 14:33:08 +08:00
|
|
|
endef
|
|
|
|
|
2020-08-12 12:02:02 +08:00
|
|
|
NOSTDINC_FLAGS = \
|
|
|
|
-I$(PKG_BUILD_DIR) \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211 \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
2020-12-01 11:30:02 +08:00
|
|
|
-include backport/autoconf.h \
|
2020-08-12 12:02:02 +08:00
|
|
|
-include backport/backport.h
|
|
|
|
|
2020-03-03 14:33:08 +08:00
|
|
|
EXTRA_KCONFIG:=\
|
|
|
|
CONFIG_RTL8821CU=m \
|
2020-03-14 20:28:56 +08:00
|
|
|
USER_MODULE_NAME=rtl8821cu
|
2020-03-03 14:33:08 +08:00
|
|
|
|
2020-03-25 06:06:18 +08:00
|
|
|
ifeq ($(ARCH),aarch64)
|
2020-04-20 15:08:05 +08:00
|
|
|
EXTRA_KCONFIG += CONFIG_MP_VHT_HW_TX_MODE=n
|
2020-03-25 06:06:18 +08:00
|
|
|
endif
|
|
|
|
|
2020-03-03 14:33:08 +08:00
|
|
|
EXTRA_CFLAGS:= \
|
2020-12-01 11:30:02 +08:00
|
|
|
-DRTW_SINGLE_WIPHY \
|
2020-03-03 14:33:08 +08:00
|
|
|
-DRTW_USE_CFG80211_STA_EVENT \
|
|
|
|
-DCONFIG_RADIO_WORK \
|
|
|
|
-DCONFIG_IOCTL_CFG80211 \
|
|
|
|
-DCONFIG_CONCURRENT_MODE \
|
2020-08-12 12:02:02 +08:00
|
|
|
-DBUILD_OPENWRT \
|
2020-03-03 14:33:08 +08:00
|
|
|
|
2020-06-26 18:06:04 +08:00
|
|
|
ifeq ($(ARCH),arm)
|
|
|
|
EXTRA_CFLAGS += -mfloat-abi=softfp
|
|
|
|
endif
|
|
|
|
|
2020-04-20 15:08:05 +08:00
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
EXTRA_CFLAGS += -mhard-float
|
|
|
|
endif
|
|
|
|
|
2020-03-03 14:33:08 +08:00
|
|
|
MAKE_OPTS:= \
|
|
|
|
$(KERNEL_MAKE_FLAGS) \
|
|
|
|
M="$(PKG_BUILD_DIR)" \
|
2020-08-12 12:02:02 +08:00
|
|
|
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
2020-03-03 14:33:08 +08:00
|
|
|
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
|
|
|
$(EXTRA_KCONFIG)
|
|
|
|
|
|
|
|
define Build/Compile
|
2020-04-17 21:14:01 +08:00
|
|
|
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
2020-03-03 14:33:08 +08:00
|
|
|
$(MAKE_OPTS) \
|
|
|
|
modules
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call KernelPackage,rtl8821cu))
|