mt76: fix download hash
[openwrt/openwrt.git] / package / kernel / mt76 / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=mt76
4 PKG_RELEASE=1
5
6 PKG_LICENSE:=GPLv2
7 PKG_LICENSE_FILES:=
8
9 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
10 PKG_SOURCE_PROTO:=git
11 PKG_SOURCE_DATE:=2023-06-30
12 PKG_SOURCE_VERSION:=1377f586c6f520a6d032053a2e9c0ebc8b277e9b
13 PKG_MIRROR_HASH:=247d045d4cbc6907b9856432ee8028a0fd573bb3ffe3c42a3e366abfdb624259
14
15 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
16 PKG_USE_NINJA:=0
17 PKG_BUILD_PARALLEL:=1
18
19 PKG_CONFIG_DEPENDS += \
20 CONFIG_PACKAGE_kmod-mt76-usb \
21 CONFIG_PACKAGE_kmod-mt76x02-common \
22 CONFIG_PACKAGE_kmod-mt76x0-common \
23 CONFIG_PACKAGE_kmod-mt76x0u \
24 CONFIG_PACKAGE_kmod-mt76x2-common \
25 CONFIG_PACKAGE_kmod-mt76x2 \
26 CONFIG_PACKAGE_kmod-mt76x2u \
27 CONFIG_PACKAGE_kmod-mt7603 \
28 CONFIG_PACKAGE_CFG80211_TESTMODE
29
30 STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
31
32 include $(INCLUDE_DIR)/kernel.mk
33 include $(INCLUDE_DIR)/package.mk
34 include $(INCLUDE_DIR)/cmake.mk
35
36 CMAKE_SOURCE_DIR:=$(PKG_BUILD_DIR)/tools
37 CMAKE_BINARY_DIR:=$(PKG_BUILD_DIR)/tools
38
39 define KernelPackage/mt76-default
40 SUBMENU:=Wireless Drivers
41 DEPENDS:= \
42 +kmod-mac80211 \
43 +@DRIVER_11AC_SUPPORT \
44 +@KERNEL_PAGE_POOL
45 endef
46
47 define KernelPackage/mt76
48 SUBMENU:=Wireless Drivers
49 TITLE:=MediaTek MT76x2/MT7603 wireless driver (metapackage)
50 DEPENDS:= \
51 +kmod-mt76-core +kmod-mt76x2 +kmod-mt7603
52 endef
53
54 define KernelPackage/mt76-core
55 $(KernelPackage/mt76-default)
56 TITLE:=MediaTek MT76xx wireless driver
57 HIDDEN:=1
58 FILES:=\
59 $(PKG_BUILD_DIR)/mt76.ko
60 endef
61
62 define KernelPackage/mt76-usb
63 $(KernelPackage/mt76-default)
64 TITLE:=MediaTek MT76xx wireless driver USB support
65 DEPENDS += +kmod-usb-core +kmod-mt76-core
66 HIDDEN:=1
67 FILES:=\
68 $(PKG_BUILD_DIR)/mt76-usb.ko
69 endef
70
71 define KernelPackage/mt76x02-usb
72 $(KernelPackage/mt76-default)
73 TITLE:=MediaTek MT76x0/MT76x2 USB wireless driver common code
74 DEPENDS+=+kmod-mt76-usb +kmod-mt76x02-common
75 HIDDEN:=1
76 FILES:=$(PKG_BUILD_DIR)/mt76x02-usb.ko
77 endef
78
79 define KernelPackage/mt76x02-common
80 $(KernelPackage/mt76-default)
81 TITLE:=MediaTek MT76x0/MT76x2 wireless driver common code
82 DEPENDS+=+kmod-mt76-core
83 HIDDEN:=1
84 FILES:=$(PKG_BUILD_DIR)/mt76x02-lib.ko
85 endef
86
87 define KernelPackage/mt76x0-common
88 $(KernelPackage/mt76-default)
89 TITLE:=MediaTek MT76x0 wireless driver common code
90 DEPENDS+=+kmod-mt76x02-common
91 HIDDEN:=1
92 FILES:=$(PKG_BUILD_DIR)/mt76x0/mt76x0-common.ko
93 endef
94
95 define KernelPackage/mt76x0e
96 $(KernelPackage/mt76-default)
97 TITLE:=MediaTek MT76x0E wireless driver
98 DEPENDS+=@PCI_SUPPORT +kmod-mt76x0-common
99 FILES:=\
100 $(PKG_BUILD_DIR)/mt76x0/mt76x0e.ko
101 AUTOLOAD:=$(call AutoProbe,mt76x0e)
102 endef
103
104 define KernelPackage/mt76x0u
105 $(KernelPackage/mt76-default)
106 TITLE:=MediaTek MT76x0U wireless driver
107 DEPENDS+=+kmod-mt76x0-common +kmod-mt76x02-usb
108 FILES:=\
109 $(PKG_BUILD_DIR)/mt76x0/mt76x0u.ko
110 AUTOLOAD:=$(call AutoProbe,mt76x0u)
111 endef
112
113 define KernelPackage/mt76x2-common
114 $(KernelPackage/mt76-default)
115 TITLE:=MediaTek MT76x2 wireless driver common code
116 DEPENDS+=+kmod-mt76-core +kmod-mt76x02-common
117 HIDDEN:=1
118 FILES:=$(PKG_BUILD_DIR)/mt76x2/mt76x2-common.ko
119 endef
120
121 define KernelPackage/mt76x2u
122 $(KernelPackage/mt76-default)
123 TITLE:=MediaTek MT76x2U wireless driver
124 DEPENDS+=+kmod-mt76x2-common +kmod-mt76x02-usb
125 FILES:=\
126 $(PKG_BUILD_DIR)/mt76x2/mt76x2u.ko
127 AUTOLOAD:=$(call AutoProbe,mt76x2u)
128 endef
129
130 define KernelPackage/mt76x2
131 $(KernelPackage/mt76-default)
132 TITLE:=MediaTek MT76x2 wireless driver
133 DEPENDS+=@PCI_SUPPORT +kmod-mt76x2-common
134 FILES:=\
135 $(PKG_BUILD_DIR)/mt76x2/mt76x2e.ko
136 AUTOLOAD:=$(call AutoProbe,mt76x2e)
137 endef
138
139 define KernelPackage/mt7603
140 $(KernelPackage/mt76-default)
141 TITLE:=MediaTek MT7603 wireless driver
142 DEPENDS+=@PCI_SUPPORT +kmod-mt76-core
143 FILES:=\
144 $(PKG_BUILD_DIR)/mt7603/mt7603e.ko
145 AUTOLOAD:=$(call AutoProbe,mt7603e)
146 endef
147
148 define KernelPackage/mt76-connac
149 $(KernelPackage/mt76-default)
150 TITLE:=MediaTek MT7615/MT79xx wireless driver common code
151 HIDDEN:=1
152 DEPENDS+=+kmod-mt76-core
153 FILES:= $(PKG_BUILD_DIR)/mt76-connac-lib.ko
154 endef
155
156 define KernelPackage/mt76-sdio
157 $(KernelPackage/mt76-default)
158 TITLE:=MediaTek MT7615/MT79xx SDIO driver common code
159 HIDDEN:=1
160 DEPENDS+=+kmod-mt76-core +kmod-mmc
161 FILES:= $(PKG_BUILD_DIR)/mt76-sdio.ko
162 endef
163
164 define KernelPackage/mt7615-common
165 $(KernelPackage/mt76-default)
166 TITLE:=MediaTek MT7615 wireless driver common code
167 HIDDEN:=1
168 DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core
169 FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko
170 endef
171
172 define KernelPackage/mt7615-firmware
173 $(KernelPackage/mt76-default)
174 TITLE:=MediaTek MT7615e firmware
175 DEPENDS+=+kmod-mt7615e
176 endef
177
178 define KernelPackage/mt7615e
179 $(KernelPackage/mt76-default)
180 TITLE:=MediaTek MT7615e wireless driver
181 DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common
182 FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615e.ko
183 AUTOLOAD:=$(call AutoProbe,mt7615e)
184 endef
185
186 define KernelPackage/mt7622-firmware
187 $(KernelPackage/mt76-default)
188 TITLE:=MediaTek MT7622 firmware
189 DEPENDS+=+kmod-mt7615e
190 endef
191
192 define KernelPackage/mt7663-firmware-ap
193 $(KernelPackage/mt76-default)
194 TITLE:=MediaTek MT7663e firmware (optimized for AP)
195 endef
196
197 define KernelPackage/mt7663-firmware-sta
198 $(KernelPackage/mt76-default)
199 TITLE:=MediaTek MT7663e firmware (client mode offload)
200 endef
201
202 define KernelPackage/mt7663-usb-sdio
203 $(KernelPackage/mt76-default)
204 TITLE:=MediaTek MT7663 USB/SDIO shared code
205 DEPENDS+=+kmod-mt7615-common
206 HIDDEN:=1
207 FILES:= \
208 $(PKG_BUILD_DIR)/mt7615/mt7663-usb-sdio-common.ko
209 endef
210
211 define KernelPackage/mt7663s
212 $(KernelPackage/mt76-default)
213 TITLE:=MediaTek MT7663s wireless driver
214 DEPENDS+=+kmod-mt76-sdio +kmod-mt7615-common +kmod-mt7663-usb-sdio
215 FILES:= \
216 $(PKG_BUILD_DIR)/mt7615/mt7663s.ko
217 AUTOLOAD:=$(call AutoProbe,mt7663s)
218 endef
219
220 define KernelPackage/mt7663u
221 $(KernelPackage/mt76-default)
222 TITLE:=MediaTek MT7663u wireless driver
223 DEPENDS+=+kmod-mt76-usb +kmod-mt7615-common +kmod-mt7663-usb-sdio
224 FILES:= $(PKG_BUILD_DIR)/mt7615/mt7663u.ko
225 AUTOLOAD:=$(call AutoProbe,mt7663u)
226 endef
227
228 define KernelPackage/mt7915-firmware
229 $(KernelPackage/mt76-default)
230 TITLE:=MediaTek MT7915 firmware
231 DEPENDS+=+kmod-mt7915e
232 endef
233
234 define KernelPackage/mt7915e
235 $(KernelPackage/mt76-default)
236 TITLE:=MediaTek MT7915e wireless driver
237 DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
238 FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
239 AUTOLOAD:=$(call AutoProbe,mt7915e)
240 endef
241
242 define KernelPackage/mt7916-firmware
243 $(KernelPackage/mt76-default)
244 DEPENDS+=+kmod-mt7915e
245 TITLE:=MediaTek MT7916 firmware
246 endef
247
248 define KernelPackage/mt7981-firmware
249 $(KernelPackage/mt76-default)
250 DEPENDS:=@TARGET_mediatek_filogic
251 TITLE:=MediaTek MT7981 firmware
252 endef
253
254 define KernelPackage/mt7986-firmware
255 $(KernelPackage/mt76-default)
256 DEPENDS:=@TARGET_mediatek_filogic
257 TITLE:=MediaTek MT7986 firmware
258 endef
259
260 define KernelPackage/mt7921-firmware
261 $(KernelPackage/mt76-default)
262 TITLE:=MediaTek MT7921 firmware
263 endef
264
265 define KernelPackage/mt7921-common
266 $(KernelPackage/mt76-default)
267 TITLE:=MediaTek MT7615 wireless driver common code
268 HIDDEN:=1
269 DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT +kmod-hwmon-core
270 FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko
271 endef
272
273 define KernelPackage/mt7921u
274 $(KernelPackage/mt76-default)
275 TITLE:=MediaTek MT7921U wireless driver
276 DEPENDS+=+kmod-mt76-usb +kmod-mt7921-common
277 FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921u.ko
278 AUTOLOAD:=$(call AutoProbe,mt7921u)
279 endef
280
281 define KernelPackage/mt7921s
282 $(KernelPackage/mt76-default)
283 TITLE:=MediaTek MT7921S wireless driver
284 DEPENDS+=+kmod-mt76-sdio +kmod-mt7921-common
285 FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921s.ko
286 AUTOLOAD:=$(call AutoProbe,mt7921s)
287 endef
288
289 define KernelPackage/mt7921e
290 $(KernelPackage/mt76-default)
291 TITLE:=MediaTek MT7921e wireless driver
292 DEPENDS+=@PCI_SUPPORT +kmod-mt7921-common
293 FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921e.ko
294 AUTOLOAD:=$(call AutoProbe,mt7921e)
295 endef
296
297 define Package/mt76-test
298 SECTION:=devel
299 CATEGORY:=Development
300 TITLE:=mt76 testmode CLI
301 DEPENDS:=kmod-mt76-core +libnl-tiny
302 endef
303
304 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
305
306 NOSTDINC_FLAGS := \
307 $(KERNEL_NOSTDINC_FLAGS) \
308 -I$(PKG_BUILD_DIR) \
309 -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
310 -I$(STAGING_DIR)/usr/include/mac80211-backport \
311 -I$(STAGING_DIR)/usr/include/mac80211/uapi \
312 -I$(STAGING_DIR)/usr/include/mac80211 \
313 -include backport/autoconf.h \
314 -include backport/backport.h
315
316 ifdef CONFIG_PACKAGE_MAC80211_MESH
317 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
318 endif
319
320 ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
321 NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
322 PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
323 endif
324
325 ifdef CONFIG_PACKAGE_kmod-mt76-usb
326 PKG_MAKE_FLAGS += CONFIG_MT76_USB=m
327 endif
328 ifdef CONFIG_PACKAGE_kmod-mt76x02-common
329 PKG_MAKE_FLAGS += CONFIG_MT76x02_LIB=m
330 endif
331 ifdef CONFIG_PACKAGE_kmod-mt76x02-usb
332 PKG_MAKE_FLAGS += CONFIG_MT76x02_USB=m
333 endif
334 ifdef CONFIG_PACKAGE_kmod-mt76x0-common
335 PKG_MAKE_FLAGS += CONFIG_MT76x0_COMMON=m
336 endif
337 ifdef CONFIG_PACKAGE_kmod-mt76x0e
338 PKG_MAKE_FLAGS += CONFIG_MT76x0E=m
339 endif
340 ifdef CONFIG_PACKAGE_kmod-mt76x0u
341 PKG_MAKE_FLAGS += CONFIG_MT76x0U=m
342 endif
343 ifdef CONFIG_PACKAGE_kmod-mt76x2-common
344 PKG_MAKE_FLAGS += CONFIG_MT76x2_COMMON=m
345 endif
346 ifdef CONFIG_PACKAGE_kmod-mt76x2
347 PKG_MAKE_FLAGS += CONFIG_MT76x2E=m
348 endif
349 ifdef CONFIG_PACKAGE_kmod-mt76x2u
350 PKG_MAKE_FLAGS += CONFIG_MT76x2U=m
351 endif
352 ifdef CONFIG_PACKAGE_kmod-mt7603
353 PKG_MAKE_FLAGS += CONFIG_MT7603E=m
354 endif
355 ifdef CONFIG_PACKAGE_kmod-mt76-connac
356 PKG_MAKE_FLAGS += CONFIG_MT76_CONNAC_LIB=m
357 endif
358 ifdef CONFIG_PACKAGE_kmod-mt76-sdio
359 PKG_MAKE_FLAGS += CONFIG_MT76_SDIO=m
360 endif
361 ifdef CONFIG_PACKAGE_kmod-mt7615-common
362 PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m
363 endif
364 ifdef CONFIG_PACKAGE_kmod-mt7615e
365 PKG_MAKE_FLAGS += CONFIG_MT7615E=m
366 ifdef CONFIG_TARGET_mediatek_mt7622
367 PKG_MAKE_FLAGS += CONFIG_MT7622_WMAC=y
368 NOSTDINC_FLAGS += -DCONFIG_MT7622_WMAC
369 endif
370 endif
371 ifdef CONFIG_PACKAGE_kmod-mt7663-usb-sdio
372 PKG_MAKE_FLAGS += CONFIG_MT7663_USB_SDIO_COMMON=m
373 endif
374 ifdef CONFIG_PACKAGE_kmod-mt7663s
375 PKG_MAKE_FLAGS += CONFIG_MT7663S=m
376 endif
377 ifdef CONFIG_PACKAGE_kmod-mt7663u
378 PKG_MAKE_FLAGS += CONFIG_MT7663U=m
379 endif
380 ifdef CONFIG_PACKAGE_kmod-mt7915e
381 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
382 ifdef CONFIG_TARGET_mediatek_filogic
383 PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
384 NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
385 endif
386 endif
387 ifdef CONFIG_PACKAGE_kmod-mt7921-common
388 PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m
389 endif
390 ifdef CONFIG_PACKAGE_kmod-mt7921u
391 PKG_MAKE_FLAGS += CONFIG_MT7921U=m
392 endif
393 ifdef CONFIG_PACKAGE_kmod-mt7921s
394 PKG_MAKE_FLAGS += CONFIG_MT7921S=m
395 endif
396 ifdef CONFIG_PACKAGE_kmod-mt7921e
397 PKG_MAKE_FLAGS += CONFIG_MT7921E=m
398 endif
399
400 define Build/Compile
401 +$(KERNEL_MAKE) $(PKG_JOBS) \
402 $(PKG_MAKE_FLAGS) \
403 M="$(PKG_BUILD_DIR)" \
404 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
405 modules
406 $(MAKE) -C $(PKG_BUILD_DIR)/tools
407 endef
408
409 define Build/Install
410 :
411 endef
412
413 define Package/kmod-mt76/install
414 true
415 endef
416
417 define KernelPackage/mt76x0-common/install
418 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
419 cp \
420 $(PKG_BUILD_DIR)/firmware/mt7610e.bin \
421 $(1)/lib/firmware/mediatek
422 endef
423
424 define KernelPackage/mt76x2-common/install
425 $(INSTALL_DIR) $(1)/lib/firmware
426 cp \
427 $(PKG_BUILD_DIR)/firmware/mt7662_rom_patch.bin \
428 $(PKG_BUILD_DIR)/firmware/mt7662.bin \
429 $(1)/lib/firmware
430 endef
431
432 define KernelPackage/mt76x0u/install
433 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
434 ln -sf mt7610e.bin $(1)/lib/firmware/mediatek/mt7610u.bin
435 endef
436
437 define KernelPackage/mt76x2u/install
438 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
439 ln -sf ../mt7662.bin $(1)/lib/firmware/mediatek/mt7662u.bin
440 ln -sf ../mt7662_rom_patch.bin $(1)/lib/firmware/mediatek/mt7662u_rom_patch.bin
441 endef
442
443 define KernelPackage/mt7603/install
444 $(INSTALL_DIR) $(1)/lib/firmware
445 cp $(if $(CONFIG_TARGET_ramips_mt76x8), \
446 $(PKG_BUILD_DIR)/firmware/mt7628_e1.bin \
447 $(PKG_BUILD_DIR)/firmware/mt7628_e2.bin \
448 ,\
449 $(PKG_BUILD_DIR)/firmware/mt7603_e1.bin \
450 $(PKG_BUILD_DIR)/firmware/mt7603_e2.bin \
451 ) \
452 $(1)/lib/firmware
453 endef
454
455 define KernelPackage/mt7615-firmware/install
456 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
457 cp \
458 $(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \
459 $(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \
460 $(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \
461 $(1)/lib/firmware/mediatek
462 endef
463
464 define KernelPackage/mt7622-firmware/install
465 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
466 cp \
467 $(PKG_BUILD_DIR)/firmware/mt7622_n9.bin \
468 $(PKG_BUILD_DIR)/firmware/mt7622_rom_patch.bin \
469 $(1)/lib/firmware/mediatek
470 endef
471
472 define KernelPackage/mt7663-firmware-ap/install
473 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
474 cp \
475 $(PKG_BUILD_DIR)/firmware/mt7663_n9_rebb.bin \
476 $(PKG_BUILD_DIR)/firmware/mt7663pr2h_rebb.bin \
477 $(1)/lib/firmware/mediatek
478 endef
479
480 define KernelPackage/mt7663-firmware-sta/install
481 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
482 cp \
483 $(PKG_BUILD_DIR)/firmware/mt7663_n9_v3.bin \
484 $(PKG_BUILD_DIR)/firmware/mt7663pr2h.bin \
485 $(1)/lib/firmware/mediatek
486 endef
487
488 define KernelPackage/mt7915-firmware/install
489 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
490 cp \
491 $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
492 $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
493 $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
494 $(1)/lib/firmware/mediatek
495 endef
496
497 define KernelPackage/mt7916-firmware/install
498 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
499 cp \
500 $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
501 $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
502 $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
503 $(1)/lib/firmware/mediatek
504 endef
505
506 define KernelPackage/mt7981-firmware/install
507 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
508 cp \
509 $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
510 $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
511 $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
512 $(1)/lib/firmware/mediatek
513 endef
514
515 define KernelPackage/mt7986-firmware/install
516 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
517 cp \
518 $(PKG_BUILD_DIR)/firmware/mt7986_wa.bin \
519 $(PKG_BUILD_DIR)/firmware/mt7986_wm_mt7975.bin \
520 $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
521 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
522 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
523 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
524 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
525 $(1)/lib/firmware/mediatek
526 endef
527
528 define KernelPackage/mt7921-firmware/install
529 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
530 cp \
531 $(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \
532 $(PKG_BUILD_DIR)/firmware/WIFI_RAM_CODE_MT7961_1.bin \
533 $(1)/lib/firmware/mediatek
534 endef
535
536 define Package/mt76-test/install
537 mkdir -p $(1)/usr/sbin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
539 endef
540
541 $(eval $(call KernelPackage,mt76-core))
542 $(eval $(call KernelPackage,mt76-usb))
543 $(eval $(call KernelPackage,mt76x02-usb))
544 $(eval $(call KernelPackage,mt76x02-common))
545 $(eval $(call KernelPackage,mt76x0-common))
546 $(eval $(call KernelPackage,mt76x0e))
547 $(eval $(call KernelPackage,mt76x0u))
548 $(eval $(call KernelPackage,mt76x2-common))
549 $(eval $(call KernelPackage,mt76x2u))
550 $(eval $(call KernelPackage,mt76x2))
551 $(eval $(call KernelPackage,mt7603))
552 $(eval $(call KernelPackage,mt76-connac))
553 $(eval $(call KernelPackage,mt76-sdio))
554 $(eval $(call KernelPackage,mt7615-common))
555 $(eval $(call KernelPackage,mt7615-firmware))
556 $(eval $(call KernelPackage,mt7622-firmware))
557 $(eval $(call KernelPackage,mt7615e))
558 $(eval $(call KernelPackage,mt7663-firmware-ap))
559 $(eval $(call KernelPackage,mt7663-firmware-sta))
560 $(eval $(call KernelPackage,mt7663-usb-sdio))
561 $(eval $(call KernelPackage,mt7663u))
562 $(eval $(call KernelPackage,mt7663s))
563 $(eval $(call KernelPackage,mt7915-firmware))
564 $(eval $(call KernelPackage,mt7915e))
565 $(eval $(call KernelPackage,mt7916-firmware))
566 $(eval $(call KernelPackage,mt7981-firmware))
567 $(eval $(call KernelPackage,mt7986-firmware))
568 $(eval $(call KernelPackage,mt7921-firmware))
569 $(eval $(call KernelPackage,mt7921-common))
570 $(eval $(call KernelPackage,mt7921u))
571 $(eval $(call KernelPackage,mt7921s))
572 $(eval $(call KernelPackage,mt7921e))
573 $(eval $(call KernelPackage,mt76))
574 $(eval $(call BuildPackage,mt76-test))