-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
103 lines (87 loc) · 2.62 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
include $(TOPDIR)/rules.mk
PKG_NAME:=rtw88-backports-usb
PKG_RELEASE:=1
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/lwfinger/rtw88
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-12-21
PKG_SOURCE_VERSION:=a4909c0f0775d45fa9adbe00e464c863d260561a
# PKG_MAINTAINER:=
PKG_BUILD_PARALLEL:=1
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define Package/rtw88-backports-firmware
TITLE:= RealTek rtw88 firmware files
SECTION:=firmware
CATEGORY:=Firmware
DEPENDS:=
endef
RTW_AUTOLOAD := rtw_8821cu \
rtw_8822bu \
rtw_8822cu \
rtw_8812au \
rtw_8821au \
rtw_8723du
define KernelPackage/rtw88-backports-usb
SUBMENU:=Wireless Drivers
TITLE:= Realtek RTL8822CU AP Mode
DEPENDS:=+kmod-cfg80211 +kmod-mac80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@PCI_SUPPORT +rtw88-backports-firmware
FILES:=\
$(PKG_BUILD_DIR)/rtw_usb.ko \
$(PKG_BUILD_DIR)/rtw_core.ko \
$(PKG_BUILD_DIR)/rtw_88xxa.ko \
$(PKG_BUILD_DIR)/rtw_8822cu.ko \
$(PKG_BUILD_DIR)/rtw_8822c.ko \
$(PKG_BUILD_DIR)/rtw_8822b.ko \
$(PKG_BUILD_DIR)/rtw_8822bu.ko \
$(PKG_BUILD_DIR)/rtw_8821c.ko \
$(PKG_BUILD_DIR)/rtw_8821cu.ko \
$(PKG_BUILD_DIR)/rtw_8821a.ko \
$(PKG_BUILD_DIR)/rtw_8821au.ko \
$(PKG_BUILD_DIR)/rtw_8812a.ko \
$(PKG_BUILD_DIR)/rtw_8812au.ko \
$(PKG_BUILD_DIR)/rtw_8723d.ko \
$(PKG_BUILD_DIR)/rtw_8723x.ko \
$(PKG_BUILD_DIR)/rtw_8723du.ko
AUTOLOAD:=$(call AutoLoad,50,$(RTW_AUTOLOAD))
endef
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 \
-include backport/autoconf.h \
-include backport/backport.h \
-Wno-error=cast-function-type
EXTRA_CFLAGS:= \
-DRTW_SINGLE_WIPHY \
-DRTW_USE_CFG80211_STA_EVENT \
-DCONFIG_IOCTL_CFG80211 \
-DCONFIG_CONCURRENT_MODE \
-DBUILD_OPENWRT
EXTRA_KCONFIG:= \
CONFIG_RTW88-BACKPORTS-USB=m \
USER_MODULE_NAME=rtw88-backports-usb
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
define Package/rtw88-backports-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/firmware/* \
$(1)/lib/firmware/rtw88/
endef
$(eval $(call KernelPackage,rtw88-backports-usb))
$(eval $(call BuildPackage,rtw88-backports-firmware))