From 6b0b526a4fc11d3b1b588d5b3b789da0c66adce9 Mon Sep 17 00:00:00 2001 From: FUKAUMI Naoki Date: Sun, 29 Jan 2017 01:05:56 +0900 Subject: ramips: add support for Buffalo WCR-1166DS Buffalo WCR-1166DS is a small wireless router with - MT7628AN + MT7612E - 64MiB DDR2 SDRAM - 16MiB SPI flash - 2T2R 11ac/a/b/g/n Wi-Fi - 2x 10/100M ethernet switch - 8x programmable LED - 3x button - UART pad on PCB (J2: 3.3V, GND, TX, RX) factory image can be installed via stock web UI. due to the "dual image" function in the bootloader, the second half of the SPI flash ("firmware2" partition) cannot be used as a part of the file system. Signed-off-by: FUKAUMI Naoki --- target/linux/ramips/base-files/etc/board.d/02_network | 15 ++++++++++----- target/linux/ramips/base-files/etc/diag.sh | 11 ++++++----- target/linux/ramips/base-files/lib/ramips.sh | 3 +++ target/linux/ramips/base-files/lib/upgrade/platform.sh | 9 +++++---- 4 files changed, 24 insertions(+), 14 deletions(-) (limited to 'target/linux/ramips/base-files') diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 91f1aaacbe..c001dfe85a 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -263,6 +263,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" ;; + wcr-1166ds) + ucidef_add_switch "switch0" \ + "3:lan" "4:wan" "6@eth0" + ;; wcr-150gn) ucidef_add_switch "switch0" \ "0:lan" "6t@eth0" @@ -410,6 +414,12 @@ ramips_setup_macs() lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 5) ;; + wcr-1166ds|\ + wsr-1166) + local index="$(find_mtd_index "board_data")" + wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)" + lan_mac=$wan_mac + ;; wcr-150gn) wan_mac=$(mtd_get_mac_binary factory 40) ;; @@ -427,11 +437,6 @@ ramips_setup_macs() wlr-6000) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2) ;; - wsr-1166) - local index="$(find_mtd_index "board_data")" - wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)" - lan_mac=$wan_mac - ;; *) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 94998333b3..5fb221380e 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -219,6 +219,12 @@ get_status_led() { zbt-wr8305rt) status_led="$board:green:sys" ;; + wcr-1166ds|\ + whr-300hp2|\ + wsr-1166|\ + wsr-600) + status_led="$board:green:power" + ;; wcr-150gn|\ wl-351) status_led="$board:amber:power" @@ -233,11 +239,6 @@ get_status_led() { wizfi630a) status_led="$board::run" ;; - whr-300hp2|\ - wsr-1166|\ - wsr-600) - status_led="$board:green:power" - ;; wrtnode2r | \ wrtnode2p | \ wrtnode) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 8292da1d4a..d9918cceb5 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -499,6 +499,9 @@ ramips_board_detect() { *"W502U") name="w502u" ;; + *"WCR-1166DS") + name="wcr-1166ds" + ;; *"WCR-150GN") name="wcr-150gn" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c6ad8ca3e5..d83e5c1dd2 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -226,6 +226,11 @@ platform_check_image() { } return 0 ;; + ubnt-erx) + nand_do_platform_check "$board" "$1" + return $?; + ;; + wcr-1166ds|\ wsr-1166) [ "$magic" != "48445230" ] && { echo "Invalid image type." @@ -233,10 +238,6 @@ platform_check_image() { } return 0 ;; - ubnt-erx) - nand_do_platform_check "$board" "$1" - return $?; - ;; esac echo "Sysupgrade is not yet supported on $board." -- cgit v1.2.3