summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-28 08:43:32 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-28 08:43:32 +0000
commit98437278c4ee4f12bc224e0a80168a04075e3055 (patch)
tree5ac11087de31670eae48029f1f9fbcf522542764 /target/linux/ramips/base-files
parent76dacee9956eaa02b6e493992d83764f123025bb (diff)
downloadmtk-20170518-98437278c4ee4f12bc224e0a80168a04075e3055.zip
mtk-20170518-98437278c4ee4f12bc224e0a80168a04075e3055.tar.gz
mtk-20170518-98437278c4ee4f12bc224e0a80168a04075e3055.tar.bz2
ramips: rt305x: add support for the ALFA Networks W502U (R36) board
SVN-Revision: 29615
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/leds4
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network8
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
7 files changed, 21 insertions, 2 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 652787b..3cd5c0f 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -63,6 +63,9 @@ get_status_led() {
v22rw-2x2)
status_led="v22rw-2x2:green:security"
;;
+ w502u)
+ status_led="alfa:blue:wps"
+ ;;
whr-g300n)
status_led="whr-g300n:green:router"
;;
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 55c577e..47f7f01 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
@@ -57,6 +57,7 @@ case "$FIRMWARE" in
omni-emb | \
rt-n15 | \
v22rw-2x2 | \
+ w502u | \
wcr-150gn | \
whr-g300n | \
wl-351 | \
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/leds b/target/linux/ramips/base-files/etc/uci-defaults/leds
index d0a9ac0..0877a1d 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/leds
@@ -51,4 +51,8 @@ case $board in
nw718)
set_usb_led "nw718:amber:usb"
;;
+ w502u)
+ set_usb_led "alfa:blue:usb"
+ set_wifi_led "rt2800pci-phy0::radio"
+ ;;
esac
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index 834a2a7..f98162c 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -19,7 +19,8 @@ ramips_setup_interfaces()
argus-atp52b | \
b2c | \
f5d8235-v2 | \
- nw718)
+ nw718 | \
+ w502u)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
;;
@@ -86,6 +87,11 @@ ramips_setup_macs()
wan_mac=$(ramips_get_mac_binary factory 40)
;;
+ w502u)
+ lan_mac=$(ramips_get_mac_binary factory 40)
+ wan_mac=$(ramips_get_mac_binary factory 46)
+ ;;
+
wli-tx4-ag300n)
lan_mac=$(ramips_get_mac_binary factory 4)
;;
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 eade567..f1d641c 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
@@ -21,7 +21,8 @@ preinit_set_mac_address() {
;;
hw550-3g |\
nbg-419n |\
- omni-emb)
+ omni-emb |\
+ w502u)
mac=$(ramips_get_mac_binary factory 40)
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 d197fce..f05fc3d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -101,6 +101,9 @@ ramips_board_name() {
*"V22RW-2X2")
name="v22rw-2x2"
;;
+ *"W502U")
+ name="w502u"
+ ;;
*"WHR-G300N")
name="whr-g300n"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index aebaf38..6d5d602 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -26,6 +26,7 @@ platform_check_image() {
omni-emb | \
rt-g32-b1 | \
rt-n15 | \
+ w502u |\
v22rw-2x2 | \
wli-tx4-ag300n | \
whr-g300n)