[OpenWrt-Devel] [PATCH 6/9] ar71xx: PowerCloud CR3000 OpenWrt configuration
openwrt at daniel.thecshore.com
openwrt at daniel.thecshore.com
Wed Dec 9 04:21:36 EST 2015
From: Daniel Dickinson <openwrt at daniel.thecshore.com>
OpenWRt configuration part of support for the PowerCloud
Systems CR3000. The CR3000 is a 802.11n 2.4 GHz wireless router with
8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast
ethernet wan port that was sold by PowerCloud Systems as
hardware for the Skydog cloud-managed router service.
Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
package/boot/uboot-envtools/files/ar71xx | 1 +
target/linux/ar71xx/base-files/etc/board.d/01_leds | 9 +++++++++
target/linux/ar71xx/base-files/etc/board.d/02_network | 6 ++++++
target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++-
6 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx
index 4a9bec5..aed7b0b 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -18,6 +18,7 @@ all0258n | \
cap324 | \
cap4200ag | \
carambola2 | \
+cr3000 | \
eap300v2 | \
hornet-ub | \
hornet-ub-x2 | \
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 6a17d82..e81a889 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -126,6 +126,15 @@ cpe510)
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
;;
+cr3000)
+ ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
+ ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
+ ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
+ ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
+ ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt"
+ ;;
+
db120)
ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 869d30f..291f9c4 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -247,6 +247,12 @@ wzr-hp-g300nh)
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
;;
+cr3000)
+ ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
+ ucidef_add_switch "switch0" "1" "1"
+ ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
+ ;;
+
dgl-5500-a1 |\
dir-825-c1)
local mac
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 8f8fe32..88f807d 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -67,6 +67,9 @@ get_status_led() {
cpe510)
status_led="tp-link:green:link4"
;;
+ cr3000)
+ status_led="pcs:amber:power"
+ ;;
db120)
status_led="db120:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 7e239b6..99c284a 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -424,6 +424,9 @@ ar71xx_board_detect() {
name="cpe510"
tplink_pharos_board_detect
;;
+ *CR3000)
+ name="cr3000"
+ ;;
*"DB120 reference board")
name="db120"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 23e87e3..b163161 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -168,7 +168,8 @@ platform_check_image() {
all0315n | \
all0258n | \
cap324 | \
- cap4200ag)
+ cap4200ag | \
+ cr3000)
platform_check_image_allnet "$1" && return 0
return 1
;;
--
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list