From b47906964d49b129ea92df095b514e950b47cdfd Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 12 Apr 2011 09:29:10 +0000 Subject: ar71xx: Add support for WZR-HP-G301NH Add support for the Buffalo WZR-HP-G301NH. The only difference between it and the WZR-HP-G00NH is that it has a RTL8366RB instead of a RTL8366S. Since we don't do runtime detection of the switch, we need a separate machine definition for it. While we are at it, also rename the profile to reflect that it now is for more than one device. Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26601 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/etc/defconfig/wzr-hp-g301nh/network | 26 ++++++++++++++++++++++ target/linux/ar71xx/base-files/etc/diag.sh | 2 +- .../base-files/etc/uci-defaults/wzr-hp-g300nh | 2 +- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ .../ar71xx/base-files/lib/upgrade/platform.sh | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network (limited to 'target/linux/ar71xx/base-files') diff --git a/target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network b/target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network new file mode 100644 index 000000000..72a4c881d --- /dev/null +++ b/target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network @@ -0,0 +1,26 @@ +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +config interface lan + option ifname eth0.1 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth1 + option proto dhcp + +config switch + option name rtl8366rb + option reset 1 + option enable_vlan 1 + +config switch_vlan + option device rtl8366rb + option vlan 1 + option ports "0 1 2 3 5t" diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index d61a78d83..6cd6043f8 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -123,7 +123,7 @@ get_status_led() { wrt160nl) status_led="wrt160nl:blue:wps" ;; - wzr-hp-g300nh) + wzr-hp-g300nh | wzr-hp-g301nh) status_led="wzr-hp-g300nh:green:router" ;; zcn-1523h-2 | zcn-1523h-5) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh b/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh index 1308a7bb0..1448e1f9a 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh @@ -32,6 +32,6 @@ commit system EOF } -if [ "${board}" == "wzr-hp-g300nh" ]; then +if [ "${board}" == "wzr-hp-g300nh" || "${board}" == "wzr-hp-g301nh" ]; then wzrhpg300nh_set_leds fi diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 15f3250e8..25915616f 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -148,6 +148,9 @@ ar71xx_board_name() { *WZR-HP-G300NH) name="wzr-hp-g300nh" ;; + *WZR-HP-G301NH) + name="wzr-hp-g301nh" + ;; *ZCN-1523H-2) name="zcn-1523h-2" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index f0fdd8837..4ccacf4ef 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -69,7 +69,7 @@ platform_check_image() { [ "$ARGC" -gt 1 ] && return 1 case "$board" in - ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | wzr-hp-g300nh | nbg460n_550n_550nh | unifi ) + ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | wzr-hp-g300nh | wzr-hp-g301nh | nbg460n_550n_550nh | unifi ) [ "$magic" != "2705" ] && { echo "Invalid image type." return 1 -- cgit v1.2.3