Today, Lenovo released a new product,an 11ac wireless router base MTK's mt7620a + mt7612e evaluation board. It has Two GE ports(RTL8211E) and 4 FE ports(Internal switch),256MByte DDR2, 3xUSB 2.0. This patch will make openwrt support it.
Sorry for my pool english,tks at all. Regards, Lintel Signed-off-by:Lintel<lintel.hu...@gmail.com> diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 908547e..edebed8 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -182,6 +182,9 @@ get_status_led() { na930) status_led="na930:blue:power" ;; + ac1200) + status_led="lenovo:blue:power" + ;; esac } diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index b372893..b862d9c 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -172,6 +172,12 @@ ramips_setup_interfaces() ucidef_add_switch_vlan "switch0" "2" "4 6t" ;; + ac1200) + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t" + ucidef_add_switch_vlan "switch0" "2" "0 6t" + ;; d105 | \ na930 | \ omni-emb-hpm|\ @@ -254,7 +260,8 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; - wr8305rt) + wr8305rt | \ + ac1200) lan_mac=$(mtd_get_mac_binary factory 4) wan_mac=$(macaddr_add "$lan_mac" 1) ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index f9ab1e3..9a339b1 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -313,6 +313,9 @@ ramips_board_detect() { *"ZBT WR8305RT") name="wr8305rt" ;; + *"Lenovo AC1200") + name="ac1200" + ;; *) name="generic" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8ada58b..a5a63ae 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -93,7 +93,8 @@ platform_check_image() { wrtnode |\ x5 |\ x8 |\ - zbt-wa05) + zbt-wa05 |\ + ac1200) [ "$magic" != "27051956" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index ef019ef..79e1787 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -716,6 +716,7 @@ Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/AC1200=$(call BuildFirmware/Default16M/$(1),$(1),ac1200,AC1200) ifeq ($(SUBTARGET),mt7620a) define Image/Build/Profile/Default @@ -730,6 +731,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) $(call Image/Build/Profile/NA930,$(1)) + $(call Image/Build/Profile/AC1200,$(1)) endef endif diff --git a/target/linux/ramips/mt7620a/config-3.10 b/target/linux/ramips/mt7620a/config-3.10 index 6805dd9..50e0a55 100644 --- a/target/linux/ramips/mt7620a/config-3.10 +++ b/target/linux/ramips/mt7620a/config-3.10 @@ -1,6 +1,7 @@ CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAS_RESET_CONTROLLER=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_REQUIRE_GPIOLIB=y @@ -78,6 +79,7 @@ CONFIG_HAVE_PERF_EVENTS=y CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=m CONFIG_HZ_PERIODIC=y +CONFIG_ICPLUS_PHY=y CONFIG_IMAGE_CMDLINE_HACK=y CONFIG_INET_LRO=y CONFIG_INITRAMFS_SOURCE="" @@ -88,6 +90,7 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_INTC=y CONFIG_IRQ_WORK=y CONFIG_M25PXX_USE_FAST_READ=y +CONFIG_MARVELL_PHY=y CONFIG_MDIO_BOARDINFO=y # CONFIG_MII is not set CONFIG_MIPS=y @@ -138,7 +141,9 @@ CONFIG_PINMUX=y CONFIG_RALINK=y CONFIG_RALINK_USBPHY=y CONFIG_RALINK_WDT=y +CONFIG_RA_NAT_NONE=y # CONFIG_RCU_STALL_COMMON is not set +CONFIG_REALTEK_PHY=y CONFIG_RESET_CONTROLLER=y # CONFIG_SAMSUNG_USB2PHY is not set # CONFIG_SAMSUNG_USB3PHY is not set
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 908547e..edebed8 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -182,6 +182,9 @@ get_status_led() { na930) status_led="na930:blue:power" ;; + ac1200) + status_led="lenovo:blue:power" + ;; esac } diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index b372893..b862d9c 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -172,6 +172,12 @@ ramips_setup_interfaces() ucidef_add_switch_vlan "switch0" "2" "4 6t" ;; + ac1200) + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t" + ucidef_add_switch_vlan "switch0" "2" "0 6t" + ;; d105 | \ na930 | \ omni-emb-hpm|\ @@ -254,7 +260,8 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; - wr8305rt) + wr8305rt | \ + ac1200) lan_mac=$(mtd_get_mac_binary factory 4) wan_mac=$(macaddr_add "$lan_mac" 1) ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index f9ab1e3..9a339b1 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -313,6 +313,9 @@ ramips_board_detect() { *"ZBT WR8305RT") name="wr8305rt" ;; + *"Lenovo AC1200") + name="ac1200" + ;; *) name="generic" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8ada58b..a5a63ae 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -93,7 +93,8 @@ platform_check_image() { wrtnode |\ x5 |\ x8 |\ - zbt-wa05) + zbt-wa05 |\ + ac1200) [ "$magic" != "27051956" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index ef019ef..79e1787 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -716,6 +716,7 @@ Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/AC1200=$(call BuildFirmware/Default16M/$(1),$(1),ac1200,AC1200) ifeq ($(SUBTARGET),mt7620a) define Image/Build/Profile/Default @@ -730,6 +731,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) $(call Image/Build/Profile/NA930,$(1)) + $(call Image/Build/Profile/AC1200,$(1)) endef endif diff --git a/target/linux/ramips/mt7620a/config-3.10 b/target/linux/ramips/mt7620a/config-3.10 index 6805dd9..50e0a55 100644 --- a/target/linux/ramips/mt7620a/config-3.10 +++ b/target/linux/ramips/mt7620a/config-3.10 @@ -1,6 +1,7 @@ CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAS_RESET_CONTROLLER=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_REQUIRE_GPIOLIB=y @@ -78,6 +79,7 @@ CONFIG_HAVE_PERF_EVENTS=y CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=m CONFIG_HZ_PERIODIC=y +CONFIG_ICPLUS_PHY=y CONFIG_IMAGE_CMDLINE_HACK=y CONFIG_INET_LRO=y CONFIG_INITRAMFS_SOURCE="" @@ -88,6 +90,7 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_INTC=y CONFIG_IRQ_WORK=y CONFIG_M25PXX_USE_FAST_READ=y +CONFIG_MARVELL_PHY=y CONFIG_MDIO_BOARDINFO=y # CONFIG_MII is not set CONFIG_MIPS=y @@ -138,7 +141,9 @@ CONFIG_PINMUX=y CONFIG_RALINK=y CONFIG_RALINK_USBPHY=y CONFIG_RALINK_WDT=y +CONFIG_RA_NAT_NONE=y # CONFIG_RCU_STALL_COMMON is not set +CONFIG_REALTEK_PHY=y CONFIG_RESET_CONTROLLER=y # CONFIG_SAMSUNG_USB2PHY is not set # CONFIG_SAMSUNG_USB3PHY is not set
AC1200.dts
Description: Binary data
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel