summaryrefslogtreecommitdiff
path: root/package/ramips/drivers/mt76x2e/Makefile
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:55:45 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:55:45 +0200
commitc0ce88c586a467665b35d93c2f6962cac8e8dc27 (patch)
treedf24b1ae76338fa83f45c14f8518720f0266705d /package/ramips/drivers/mt76x2e/Makefile
parentffb3f790a5075e5c294420e8348dfe6c429ac921 (diff)
downloadmtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.zip
mtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.tar.gz
mtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.tar.bz2
mt7xxx proprietary Wifi drivers integration + mac80211 weird changes
Diffstat (limited to 'package/ramips/drivers/mt76x2e/Makefile')
-rwxr-xr-xpackage/ramips/drivers/mt76x2e/Makefile98
1 files changed, 98 insertions, 0 deletions
diff --git a/package/ramips/drivers/mt76x2e/Makefile b/package/ramips/drivers/mt76x2e/Makefile
new file mode 100755
index 0000000..9283fe8
--- /dev/null
+++ b/package/ramips/drivers/mt76x2e/Makefile
@@ -0,0 +1,98 @@
+# All rights reserved.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=mt76x2e
+P4REV:=130093
+PKG_VERSION:=3.0.4.0
+
+PKG_SOURCE:=MT76x2e_MT7620_LinuxAP_V3.0.4.0_DPA_20150617.tar.bz2
+PKG_SOURCE_URL:=http://localhost/
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_KCONFIG:= \
+ RALINK_MT7612E RALINK_MT7620 RLT_AP_SUPPORT WDS_SUPPORT MBSS_SUPPORT ENHANCE_NEW_MBSSID_MODE \
+ APCLI_SUPPORT APCLI_CERT_SUPPORT DFS_SUPPORT LLTD_SUPPORT NINTENDO_AP COC_SUPPORT \
+ DELAYED_TCP_ACK_SUPPORT RT_FIRST_CARD_EEPROM \
+ RT_FIRST_IF_RF_OFFSET RT_SECOND_IF_RF_OFFSET \
+ RT_FIRST_CARD RT_SECOND_CARD SNIFFER_SUPPORT CFG80211_SUPPORT \
+ RT_FIRST_CARD_EEPROM FIRST_IF_EEPROM_PROM FIRST_IF_EEPROM_EFUSE FIRST_IF_EEPROM_FLASH \
+ SECOND_IF_EEPROM_PROM SECOND_IF_EEPROM_EFUSE SECOND_IF_EEPROM_FLASH \
+ WIFI_BASIC_FUNC WSC_INCLUDED WSC_V2_SUPPORT WSC_NFC_SUPPORT DOT11N_DRAFT3 DOT11_VHT_AC \
+ DOT11W_PMF_SUPPORT TXBF_SUPPORT LLTD_SUPPORT QOS_DLS_SUPPORT \
+ CARRIER_DETECTION_SUPPORT IGMP_SNOOP_SUPPORT BLOCK_NET_IF \
+ TXBF_SUPPORT RATE_ADAPTION NEW_RATE_ADAPT_SUPPORT AGS_SUPPORT \
+ IDS_SUPPORT WIFI_WORK_QUEUE WIFI_SKB_RECYCLE RTMP_FLASH_SUPPORT \
+ LED_CONTROL_SUPPORT HW_ANTENNA_DIVERSITY ATE_SUPPORT \
+ RT2860V2_AP_V24_DATA_STRUCTURE RT2860V2_AP_32B_DESC MEMORY_OPTIMIZATION \
+ RTMP_INTERNAL_TX_ALC RTMP_TEMPERATURE_CALIBRATION HOTSPOT \
+ SINGLE_SKU_V2 RLT_MAC RLT_BBP RLT_RF RTMP_MAC RTMP_BBP RTMP_RF \
+ RTMP_PCI_SUPPORT RTMP_USB_SUPPORT RTMP_RBUS_SUPPORT DISABLE_EDCCA MULTI_CORE_SUPPORT
+
+PKG_CONFIG_DEPENDS:=$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_$c),CONFIG_$(c)))
+
+include $(INCLUDE_DIR)/package.mk
+
+TAR_CMD=$(HOST_TAR) -C $(1)/ $(TAR_OPTIONS)
+
+define KernelPackage/mt76x2e
+ CATEGORY:=MTK Properties
+ TITLE:=MTK MT76x2e wifi AP driver
+ FILES:=$(PKG_BUILD_DIR)/rlt_wifi_ap/mt76x2e.ko
+ DEPENDS:=+kmod-cfg80211
+ SUBMENU:=Drivers
+ MENU:=1
+endef
+
+define KernelPackage/mt76x2e/config
+ source "$(SOURCE)/config.in"
+endef
+
+define P4/Info
+ P4URL:=//Embedded_WIFI/MP/MT76x2/MT7612e/AP/rlt_wifi/
+endef
+
+define P4/Release
+ make release
+ mkdir -p build
+ cp os/linux/Makefile.rlt_wifi_ap build/Makefile
+ cp os/linux/Kconfig.rlt_wifi_ap build/Kconfig
+ mv DPA src
+ tar cjf mt76x2e.tar.bz2 build src
+endef
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" V=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ ARCH="$(LINUX_KARCH)" \
+ SUBDIRS="$(PKG_BUILD_DIR)/rlt_wifi_ap/" \
+ $(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_MT76X2E_$c),CONFIG_$(c)=$(CONFIG_MT76X2E_$c)))\
+ modules
+endef
+
+define KernelPackage/mt76x2e/install
+ $(INSTALL_DIR) $(1)/lib/wifi/
+ echo ------------------------------------------------------------------- $(CONFIG_RT_SECOND_CARD)
+ if [ "$$(CONFIG_MT76X2E_RT_FIRST_CARD)" = "7602" ] || [ "$$(CONFIG_MT76X2E_RT_FIRST_CARD)" = "7602e" ]; then \
+ $(INSTALL_DIR) $(1)/etc/wireless/mt7602e/ ; \
+ $(INSTALL_BIN) ./files/mt7602e.sh $(1)/lib/wifi/ ; \
+ $(INSTALL_BIN) ./files/mt7602e.dat $(1)/etc/wireless/mt7602e/ ; \
+ $(INSTALL_BIN) ./files/mt7602e*.bin $(1)/etc/wireless/mt7602e/ ; \
+ $(INSTALL_BIN) ./files/SingleSKU.dat $(1)/etc/wireless/mt7602/SingleSKU.dat ; \
+ echo p$(P4REV) > $(1)/etc/wireless/mt7602e/version; \
+ fi
+ if [ "$$(CONFIG_MT76X2E_RT_SECOND_CARD)" = "7612" ] || [ "$$(CONFIG_MT76X2E_RT_SECOND_CARD)" = "7612e" ]; then \
+ $(INSTALL_DIR) $(1)/etc/wireless/mt7612e/ ; \
+ $(INSTALL_BIN) ./files/mt7612e.sh $(1)/lib/wifi/ ; \
+ $(INSTALL_BIN) ./files/mt7612e.dat $(1)/etc/wireless/mt7612e/ ; \
+ $(INSTALL_BIN) ./files/mt7612e*.bin $(1)/etc/wireless/mt7612e/ ; \
+ $(INSTALL_BIN) ./files/SingleSKU.dat $(1)/etc/wireless/mt7612/SingleSKU.dat ; \
+ echo p$(P4REV) > $(1)/etc/wireless/mt7612e/version; \
+ fi
+endef
+
+$(eval $(call KernelPackage,mt76x2e))