summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-23 14:27:10 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-23 14:27:10 +0000
commita46cfc6bccf2343230f701e86fa88be1404ca1ce (patch)
treeddd07646b579c1b93b56fd20d7ab91590b76edb7 /target/linux/ramips/base-files
parentf3c0d1bebb17d61208521a102a282ce85d672a0b (diff)
ramips: add support for the Senao/EnGenius ESR-9753 board
Signed-off-by: Artur Wronowski <arteqw@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29603 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/diag.sh3
-rw-r--r--target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom1
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/leds17
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network1
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac2
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
6 files changed, 26 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index e0a4a3921..a150cc26d 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -33,6 +33,9 @@ get_status_led() {
dir-300-b1 | dir-600-b1 | dir-600-b2)
status_led="d-link:green:status"
;;
+ esr-9753)
+ status_led="esr-9753:orange:power"
+ ;;
fonera20n)
status_led="fonera20n:green:power"
;;
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index d6db35c04..fa6607fd7 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -47,6 +47,7 @@ case "$FIRMWARE" in
argus-atp52b | \
bc2 | \
+ esr-9753 | \
fonera20n | \
hw550-3g | \
mofi3500-3gn | \
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/leds b/target/linux/ramips/base-files/etc/uci-defaults/leds
index e6c7e8456..d0a9ac071 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/leds
@@ -16,12 +16,29 @@ commit system
EOF
}
+set_wifi_led() {
+ local sysfs="$1"
+
+ uci batch <<EOF
+set system.wifi_led=led
+set system.wifi_led.name='wifi'
+set system.wifi_led.sysfs='$sysfs'
+set system.wifi_led.trigger='netdev'
+set system.wifi_led.dev='wlan0'
+set system.wifi_led.mode='link rx tx'
+commit system
+EOF
+}
+
board=$(ramips_board_name)
case $board in
bc2)
set_usb_led "bc2:blue:usb"
;;
+ esr-9753)
+ set_wifi_led "rt2800pci-phy0::radio"
+ ;;
fonera20n)
set_usb_led "fonera20n:amber:usb"
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index f78f9bf9d..bb1d90ef4 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -68,6 +68,7 @@ ramips_setup_macs()
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
;;
+ esr-9753 | \
nbg-419n)
lan_mac=$(ramips_get_mac_binary factory 4)
wan_mac=$(ramips_get_mac_binary factory 40)
diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
index 0518b7be9..eade567c3 100644
--- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
@@ -8,7 +8,7 @@ preinit_set_mac_address() {
. /lib/ramips.sh
case $(ramips_board_name) in
- bc2 | nw718)
+ bc2 | nw718 | esr-9753)
mac=$(ramips_get_mac_binary factory 4)
mac=$(maccalc or "$mac" "02:00:00:00:00:00")
ifconfig eth0 hw ether $mac 2>/dev/null
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 7d45bde09..faed42162 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -62,6 +62,9 @@ ramips_board_name() {
*"DIR-600 B2")
name="dir-600-b2"
;;
+ *"ESR-9753")
+ name="esr-9753"
+ ;;
*"F5D8235 v2")
name="f5d8235-v2"
;;