2022-12-27 16:17:32 +08:00
|
|
|
# SDPX-License-Identifier: GPL-2.0-only
|
2020-03-03 14:33:08 +08:00
|
|
|
#
|
2022-12-27 16:17:32 +08:00
|
|
|
# Copyright (C) 2021-2022 ImmortalWrt.org
|
2020-03-03 14:33:08 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=rtl8821cu
|
2021-03-23 09:26:58 +08:00
|
|
|
PKG_RELEASE:=1
|
2020-03-03 14:33:08 +08:00
|
|
|
|
2021-03-23 09:26:58 +08:00
|
|
|
PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git
|
2020-03-03 14:33:08 +08:00
|
|
|
PKG_SOURCE_PROTO:=git
|
2022-05-01 23:30:01 +08:00
|
|
|
PKG_SOURCE_DATE:=2022-04-09
|
|
|
|
PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5
|
|
|
|
PKG_MIRROR_HASH:=3353a3bc4c73652eceaab95809aab27c3ae8bbf7e915b73488361a061ba91b84
|
2020-03-03 14:33:08 +08:00
|
|
|
|
2022-12-27 16:17:32 +08:00
|
|
|
PKG_LICENSE:=GPL-2.0-only
|
2021-01-05 16:16:09 +08:00
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
|
2021-03-23 09:26:58 +08:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
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
|
2021-03-23 09:26:58 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2020-03-03 14:33:08 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-12-27 16:17:32 +08:00
|
|
|
NOSTDINC_FLAGS:= \
|
|
|
|
$(KERNEL_NOSTDINC_FLAGS) \
|
2020-08-12 12:02:02 +08:00
|
|
|
-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
|
|
|
|
|
2022-12-27 16:17:32 +08:00
|
|
|
NOSTDINC_FLAGS+= \
|
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_IOCTL_CFG80211 \
|
|
|
|
-DCONFIG_CONCURRENT_MODE \
|
2021-02-18 12:20:06 +08:00
|
|
|
-DBUILD_OPENWRT
|
2020-03-03 14:33:08 +08:00
|
|
|
|
2021-02-19 18:09:01 +08:00
|
|
|
ifeq ($(BOARD),x86)
|
2022-12-27 16:17:32 +08:00
|
|
|
NOSTDINC_FLAGS+= -mhard-float
|
2021-02-19 18:09:01 +08:00
|
|
|
endif
|
|
|
|
|
2020-03-03 14:33:08 +08:00
|
|
|
define Build/Compile
|
2022-12-27 16:17:32 +08:00
|
|
|
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
|
|
|
M="$(PKG_BUILD_DIR)" \
|
|
|
|
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
|
|
|
CONFIG_RTL8821CU=m \
|
|
|
|
$(if $(CONFIG_aarch64),CONFIG_MP_VHT_HW_TX_MODE=n) \
|
|
|
|
USER_MODULE_NAME=rtl8821cu \
|
2020-03-03 14:33:08 +08:00
|
|
|
modules
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call KernelPackage,rtl8821cu))
|