diff --git a/README.md b/README.md index bef197c..8173d75 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README_EN.md b/README_EN.md index 336537a..c3f9792 100644 --- a/README_EN.md +++ b/README_EN.md @@ -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 \ No newline at end of file +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 diff --git a/patches/general/1_add_mtkhnat_modules.patch b/patches/general/1_add_mtkhnat_modules.patch index 861175a..e717104 100644 --- a/patches/general/1_add_mtkhnat_modules.patch +++ b/patches/general/1_add_mtkhnat_modules.patch @@ -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 @@