1 include $(TOPDIR)/rules.mk
4 PKG_VERSION:=2015-08-28
10 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
12 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
13 PKG_SOURCE_VERSION:=b6de6a08e46e1a1087a1fcd41a2ee0590de7c4a0
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
16 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19 include $(INCLUDE_DIR)/kernel.mk
20 include $(INCLUDE_DIR)/package.mk
22 define KernelPackage/mt76
23 SUBMENU:=Wireless Drivers
24 TITLE:=MediaTek MT76x2 wireless driver
25 DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT @PCI_SUPPORT
26 FILES:=$(PKG_BUILD_DIR)/mt76pci.ko
27 AUTOLOAD:=$(call AutoLoad,50,mac80211 mt76pci)
32 -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
33 -I$(STAGING_DIR)/usr/include/mac80211-backport \
34 -I$(STAGING_DIR)/usr/include/mac80211/uapi \
35 -I$(STAGING_DIR)/usr/include/mac80211 \
36 -include backport/autoconf.h \
37 -include backport/backport.h
39 ifdef CONFIG_PACKAGE_MAC80211_MESH
40 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
44 +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
45 ARCH="$(LINUX_KARCH)" \
46 CROSS_COMPILE="$(TARGET_CROSS)" \
47 SUBDIRS="$(PKG_BUILD_DIR)" \
48 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
52 define KernelPackage/mt76/install
53 $(INSTALL_DIR) $(1)/lib/firmware
55 $(PKG_BUILD_DIR)/firmware/mt7662_rom_patch.bin \
56 $(PKG_BUILD_DIR)/firmware/mt7662.bin \
60 $(eval $(call KernelPackage,mt76))