summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-10 08:24:56 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-10 08:24:56 +0000
commitfe4e66bfd8f43e68151272632986ca034efb6d35 (patch)
tree1cdc9399acf9a0c3dbf805d13ee94e9c11f1ead8 /target/linux/ramips/base-files
parentf82c1b144f2ca6e9bc1e66436c89129ac966f3ab (diff)
ramips: add HAME MPR-A2 support
This patch adds support for HAME MPR-A2 router using a DTS file. The platform is Ralink RT5350. http://wiki.openwrt.org/toh/hame/mpr-a2 Signed-off-by: Dmitry Shmygov <shmygov@rambler.ru> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36898 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/01_leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/02_network1
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac1
-rw-r--r--target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips12
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
8 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index be2fa56faf..894be0f5e6 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -55,6 +55,9 @@ get_status_led() {
mofi3500-3gn)
status_led="mofi3500-3gn:green:status"
;;
+ mpr-a2)
+ status_led="mpr-a2:red:power"
+ ;;
nbg-419n)
status_led="nbg-419n: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 41dabd9f01..810dddfe86 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
@@ -77,6 +77,7 @@ case "$FIRMWARE" in
freestation5 | \
hw550-3g | \
mofi3500-3gn | \
+ mpr-a2 | \
pwh2004 | \
nbg-419n | \
nw718 | \
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index ec031883ea..608816f195 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -94,6 +94,9 @@ case $board in
mofi3500-3gn)
set_usb_led "mofi3500-3gn:green:usb"
;;
+ mpr-a2)
+ set_wifi_led "mpr-a2:blue:system"
+ ;;
mzk-w300nh2)
set_wifi_led "mzkw300nh2:amber:wlan"
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index fe81899e7b..b45b0ca25a 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -172,6 +172,7 @@ ramips_setup_macs()
broadway | \
dir-620-d1 | \
f5d8235-v1 | \
+ mpr-a2 | \
mzk-w300nh2 | \
nw718 | \
psr-680w | \
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 022f72e240..bd1dac0dee 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
@@ -26,6 +26,7 @@ preinit_set_mac_address() {
dir-620-a1 |\
esr-9753 |\
freestation5 |\
+ mpr-a2 | \
nw718 |\
psr-680w |\
rt-n56u |\
diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
index c8b7f2ad38..edc5a12e34 100644
--- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
+++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
@@ -6,6 +6,18 @@
. /lib/ramips.sh
ramips_set_preinit_iface() {
+ local board=$(ramips_board_name)
+
+ case "$board" in
+ mpr-a2)
+ #TODO
+ # Ralink ethernet driver cannot re-open ethernet if it is opened during preinit and then closed.
+ # Looks like Ralink ethernet driver has a problem.
+ # Temporary solution is not to open ethernet during preinit.
+ return 0
+ ;;
+ esac
+
ifname=eth0
}
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 03ae25bcb1..c5f216f780 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -115,6 +115,9 @@ ramips_board_detect() {
*"MoFi Network MOFI3500-3GN")
name="mofi3500-3gn"
;;
+ *"HAME MPR-A2")
+ name="mpr-a2"
+ ;;
*"NBG-419N")
name="nbg-419n"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 2d24f182d7..eaa7e64312 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -43,6 +43,7 @@ platform_check_image() {
freestation5 | \
hw550-3g | \
mofi3500-3gn | \
+ mpr-a2 | \
mzk-w300nh2 | \
nbg-419n | \
nw718 | \