Skip to content

Commit

Permalink
update patches,update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhpx committed Apr 13, 2024
1 parent eb38b36 commit f7203ec
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# 用于OpenWrt的MEDIATEK WIFI驱动程序
用于OpenWrt的MEDIATEK WIFI驱动程序
I18N: [English](README_EN.md) | [简体中文](README.md)
包含MT7622和MT7915无线驱动,包含MEDIATEK HNAT驱动。兼容linux内核5.10.x,其他内核版本自行测试。测试过的openwrt fork有:openwrt 22.03、lean's lede。附带的内核包、软件包名有:kmod-mtk-hnat、kmod-mt7622、kmod-mt_wifi、luci-app-mtwifi、l1profile

使用方法:
1) 克隆你需要的openwrt repo
2) ,进入openwrt源码根目录,克隆本repo
3) ./scripts/feeds install -a
3) ./scripts/feeds update -a
4) ./scripts/feeds install -a
5) 进入到MT7622-mtkwifi目录,运行"install -n",如果luci版本低于luci18,执行"install -o"
5) 进入到MT7622-mtkwifi目录,运行"./install.sh -n",如果luci版本低于luci18,执行"./install -o"(注意一定要先安装feed再install,不然luci补丁打不上)
6) 根据需要选择软件包,已针对xiaomiredmiax6s修改了默认软件包
7) make menuconfig
8) make
Expand Down
25 changes: 12 additions & 13 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# MT7622 WIFI Driver for OpenWrt

MEDIATEK WIFI Driver for OpenWrt Includes MT7622 and MT7915 wireless drivers Includes MEDIATEK HNAT driver Compatible with Linux kernel 5.10.x, other kernel versions require self-testing Tested OpenWrt forks include: openwrt 22.03, lean’s lede Included kernel packages and software package names: kmod-mtk-hnat, kmod-mt7622, kmod-mt_wifi, l1profile

# MediaTek WIFI Driver for OpenWrt
MediaTek WIFI Driver for OpenWrt
I18N: [English](README_EN.md) | [简体中文](README.md)
Includes MT7622 and MT7915 wireless drivers, as well as the MediaTek HNAT driver. Compatible with Linux kernel 5.10.x; other kernel versions require self-testing. Tested OpenWrt forks include: openwrt 22.03, lean's lede. The included kernel packages and software package names are: kmod-mtk-hnat, kmod-mt7622, kmod-mt_wifi, luci-app-mtwifi, l1profile.
Instructions:

Clone the openwrt repo you need
Navigate to the root directory of the openwrt source code and clone this repo
./scripts/feeds update -a
./scripts/feeds install -a
Go to the MT7622-mtkwifi directory and run “install -n”, if the luci version is below luci18, execute “install -o”
Select packages as needed, default packages have been modified for xiaomiredmiax6s
make menuconfig
make
1) Clone the openwrt repo you need
2) Navigate to the root directory of the openwrt source code and clone this repo
3) ./scripts/feeds update -a
4) ./scripts/feeds install -a
5) Go to the MT7622-mtkwifi directory and run "./install.sh -n". If the luci version is below luci18, execute "./install -o" (Note: Make sure to install feeds before running install, otherwise the luci patches will not apply)
6) Select packages as needed; the default packages have been modified for xiaomiredmiax6s
7) make menuconfig
8) make
14 changes: 10 additions & 4 deletions patches/general/1_add_mtkhnat_modules.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
--- target/linux/mediatek/modules.mk
+++ target/linux/mediatek/modules.mk
@@ -1,0 +1,11 @@
@@ -28,1 +28,16 @@
-$(eval $(call KernelPackage,btmtkuart))
+$(eval $(call KernelPackage,btmtkuart))
+
+define KernelPackage/mtk-hnat
+ SUBMENU:=Network Devices
+ TITLE:=MediaTek MT762x HW NAT driver
+ DEPENDS:=@TARGET_mediatek_mt7622 +kmod-nf-flow
+ KCONFIG:= + CONFIG_BRIDGE_NETFILTER=y + CONFIG_NET_MEDIATEK_HNAT + CONFIG_NETFILTER_FAMILY_BRIDGE=y
+ FILES:= + $(LINUX_DIR)/drivers/net/ethernet/mtk/mtk_hnat/mtkhnat.ko
+ KCONFIG:= \
+ CONFIG_BRIDGE_NETFILTER=y \
+ CONFIG_NET_MEDIATEK_HNAT \
+ CONFIG_NETFILTER_FAMILY_BRIDGE=y
+ FILES:= \
+ $(LINUX_DIR)/drivers/net/ethernet/mtk/mtk_hnat/mtkhnat.ko
+ AUTOLOAD:=$(call AutoLoad,55,mtkhnat)
+endef
+
+$(eval $(call KernelPackage,mtk-hnat))
+
--- target/linux/mediatek/mt7622/config-5.10
+++ target/linux/mediatek/mt7622/config-5.10
@@ -286,1 +286,2 @@
Expand Down

0 comments on commit f7203ec

Please sign in to comment.