Re: [OpenWrt-Devel] [PATCH] [ar71xx] Support for HiWifi HC6361 router
Hi, On 26 March 2014 18:41, Yousong Zhou yszhou4t...@gmail.com wrote: Hi, Just got my my chance to try this router. It's 2014 now and my comments are late... Sorry, but getting this board supported in the OpenWrt trunk is really good. For those interested, the original patch can be found at the following URL. http://patchwork.openwrt.org/patch/4244/ I have created a wiki page for HiWiFi HC6361 [1] and a working patch series is sitting in my local tree. I also discussed with Xiaoning through email that it is okay I will post my updated version, maybe after the merge of my previous patch for ar71xx image Makefile [2]. [1] http://wiki.openwrt.org/toh/hiwifi/hc6361 [2] http://patchwork.openwrt.org/patch/5075/ yousong ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [ar71xx] Support for HiWifi HC6361 router
Hi, Just got my my chance to try this router. It's 2014 now and my comments are late... Sorry, but getting this board supported in the OpenWrt trunk is really good. For those interested, the original patch can be found at the following URL. http://patchwork.openwrt.org/patch/4244/ On 29 October 2013 22:10, Xiaoning Kang kan...@gmail.com wrote: From: Xiaoning Kang kan...@gmail.com HiWifi HC6361(aka tw150v1) is a router developed by http://www.hiwifi.com, which is basically a WR703N with larger flash and ram. It also carries a 4G emmc chip. The manufacturer had released a copy of modified openwrt sources at https://code.hiwifi.com/. so I tried to migrate those changes to openwrt trunk. Most of the changes were imported, with a few exceptions like button handling. The firmware builds and runs fine on my router. There is only one reset button on the router and you have added the support in the mach file. Did I miss something? Signed-off-by: Xiaoning Kang kan...@gmail.com -- diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 3962aa2..55e9a0b 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -149,6 +149,9 @@ get_status_led() { tl-wr2543n) status_led=tp-link:green:wps ;; + tw150v1) + status_led=tw150v1:green:system + ;; unifi) status_led=ubnt:green:dome ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index bd1c4b7..ed30755 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -229,6 +229,11 @@ tl-wr2543n) ucidef_set_led_usbdev usb USB tp-link:green:usb 1-1 ;; +tw150v1) + ucidef_set_led_default inet INET tw150v1:green:internet 0 + ucidef_set_led_wlan wlan WLAN tw150v1:green:wlan-2p4 wifi0tpt + ;; + Do not know about wifi0tpt, shouldn't it be wifi0tpt? There is no wifi0tpt in the wiki page for ledtrig. http://wiki.openwrt.org/doc/uci/system#leds wrt160nl) ucidef_set_led_wlan wlan WLAN wrt160nl:blue:wlan phy0tpt ;; @@ -272,6 +277,10 @@ wzr-hp-g300nh) ucidef_set_led_netdev router Router buffalo:green:router eth1 ucidef_set_led_usbdev usb USB buffalo:blue:usb 1-1 ;; +tw150v1) +ucidef_set_led_default inet INET tw150v1:green:internet 0 +ucidef_set_led_wlan wlan WLAN tw150v1:green:wlan-2p4 wifi0tpt +;; ditto. zcn-1523h-2) ucidef_set_led_netdev lan1 lan1 zcn-1523h:green:lan1 eth0 diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 3d6ab29..03e30c4 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -271,6 +271,7 @@ tl-wdr3500 |\ tl-wr741nd |\ tl-wr741nd-v4 |\ tl-wr841n-v7 |\ +tw150v1 |\ whr-g301n |\ whr-hp-g300n |\ whr-hp-gn |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 06786e7..b5c50bd 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -573,6 +573,9 @@ ar71xx_board_detect() { 8devices Carambola2*) name=carambola2 ;; +*Hiwifi Wireless HC6361 Board) +name=tw150v1 +;; I saw in the homepage that the formal brand name for this router is HiWiFi, so you may want to use it here. esac case $machine in diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 28e4a91..5122c64 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -106,6 +106,13 @@ platform_check_image() { } return 0 ;; + tw150v1) + [ $magic_long != 68737173 -a $magic_long != 2705 ] { + echo Invalid image type. + return 1 + } + return 0 + ;; $magic_long will never equal to 2705 as it is always of length 8 bytes. Do you actually mean $magic and 2705? ap81 | \ ap83 | \ ap132 | \ @@ -324,6 +331,9 @@ platform_do_upgrade() { om2p-lc) platform_do_upgrade_openmesh $ARGV ;; +tw150v1) +platform_do_upgrade_twarxx $ARGV +;; Looks like definition of platform_do_upgrade_twarxx() is missing from this patch. *)
[OpenWrt-Devel] [PATCH] [ar71xx] Support for HiWifi HC6361 router
From: Xiaoning Kang kan...@gmail.com HiWifi HC6361(aka tw150v1) is a router developed by http://www.hiwifi.com, which is basically a WR703N with larger flash and ram. It also carries a 4G emmc chip. The manufacturer had released a copy of modified openwrt sources at https://code.hiwifi.com/. so I tried to migrate those changes to openwrt trunk. Most of the changes were imported, with a few exceptions like button handling. The firmware builds and runs fine on my router. Signed-off-by: Xiaoning Kang kan...@gmail.com -- diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 3962aa2..55e9a0b 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -149,6 +149,9 @@ get_status_led() { tl-wr2543n) status_led=tp-link:green:wps ;; + tw150v1) + status_led=tw150v1:green:system + ;; unifi) status_led=ubnt:green:dome ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index bd1c4b7..ed30755 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -229,6 +229,11 @@ tl-wr2543n) ucidef_set_led_usbdev usb USB tp-link:green:usb 1-1 ;; +tw150v1) + ucidef_set_led_default inet INET tw150v1:green:internet 0 + ucidef_set_led_wlan wlan WLAN tw150v1:green:wlan-2p4 wifi0tpt + ;; + wrt160nl) ucidef_set_led_wlan wlan WLAN wrt160nl:blue:wlan phy0tpt ;; @@ -272,6 +277,10 @@ wzr-hp-g300nh) ucidef_set_led_netdev router Router buffalo:green:router eth1 ucidef_set_led_usbdev usb USB buffalo:blue:usb 1-1 ;; +tw150v1) +ucidef_set_led_default inet INET tw150v1:green:internet 0 +ucidef_set_led_wlan wlan WLAN tw150v1:green:wlan-2p4 wifi0tpt +;; zcn-1523h-2) ucidef_set_led_netdev lan1 lan1 zcn-1523h:green:lan1 eth0 diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 3d6ab29..03e30c4 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -271,6 +271,7 @@ tl-wdr3500 |\ tl-wr741nd |\ tl-wr741nd-v4 |\ tl-wr841n-v7 |\ +tw150v1 |\ whr-g301n |\ whr-hp-g300n |\ whr-hp-gn |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 06786e7..b5c50bd 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -573,6 +573,9 @@ ar71xx_board_detect() { 8devices Carambola2*) name=carambola2 ;; +*Hiwifi Wireless HC6361 Board) +name=tw150v1 +;; esac case $machine in diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 28e4a91..5122c64 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -106,6 +106,13 @@ platform_check_image() { } return 0 ;; + tw150v1) + [ $magic_long != 68737173 -a $magic_long != 2705 ] { + echo Invalid image type. + return 1 + } + return 0 + ;; ap81 | \ ap83 | \ ap132 | \ @@ -324,6 +331,9 @@ platform_do_upgrade() { om2p-lc) platform_do_upgrade_openmesh $ARGV ;; +tw150v1) +platform_do_upgrade_twarxx $ARGV +;; *) default_do_upgrade $ARGV ;; diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10 index f88d008..ee41ffd 100644 --- a/target/linux/ar71xx/config-3.10 +++ b/target/linux/ar71xx/config-3.10 @@ -84,6 +84,7 @@ CONFIG_ATH79_MACH_TL_WR741ND_V4=y CONFIG_ATH79_MACH_TL_WR841N_V1=y CONFIG_ATH79_MACH_TL_WR841N_V8=y CONFIG_ATH79_MACH_TL_WR941ND=y +CONFIG_ATH79_MACH_TW150V1=y CONFIG_ATH79_MACH_UBNT=y CONFIG_ATH79_MACH_UBNT_XM=y CONFIG_ATH79_MACH_WHR_HP_G300N=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tw150v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tw150v1.c new file mode 100644 index 000..738d890 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tw150v1.c @@ -0,0 +1,194 @@ +/* + * Hiwifi Wireless AR9331 Dreamboard (HORNET SoC) support + * + * Copyright (C) 2012-2013 eric + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software