aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/base-files/lib
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2015-04-16 09:54:39 +0000
committerImre Kaloz <kaloz@openwrt.org>2015-04-16 09:54:39 +0000
commit2705cda81389e84687fb0325d2bf6c8bc2756bee (patch)
tree43e62f4855251c4117b245bccebe1fb75534fa9e /target/linux/mvebu/base-files/lib
parent0926e4c22feb8b9f65d7fbf9deb880de031fd0a2 (diff)
downloadupstream-2705cda81389e84687fb0325d2bf6c8bc2756bee.tar.gz
upstream-2705cda81389e84687fb0325d2bf6c8bc2756bee.tar.bz2
upstream-2705cda81389e84687fb0325d2bf6c8bc2756bee.zip
mvebu: add support for the Linksys Caiman and Cobra
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 45456
Diffstat (limited to 'target/linux/mvebu/base-files/lib')
-rwxr-xr-xtarget/linux/mvebu/base-files/lib/mvebu.sh6
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac8
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg2
-rwxr-xr-xtarget/linux/mvebu/base-files/lib/upgrade/platform.sh4
4 files changed, 16 insertions, 4 deletions
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh
index 6182d7af60..ac6d148476 100755
--- a/target/linux/mvebu/base-files/lib/mvebu.sh
+++ b/target/linux/mvebu/base-files/lib/mvebu.sh
@@ -31,9 +31,15 @@ mvebu_board_detect() {
*"Marvell Armada XP GP Board")
name="armada-xp-gp"
;;
+ *"Linksys WRT1200AC")
+ name="armada-385-linksys-caiman"
+ ;;
*"Linksys WRT1900AC")
name="armada-xp-linksys-mamba"
;;
+ *"Linksys WRT1900ACv2")
+ name="armada-385-linksys-cobra"
+ ;;
*"Marvell Armada 385 Access Point Development Board")
name="armada-385-db-ap"
;;
diff --git a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
index 7b77bea27f..7217e93370 100644
--- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
#
preinit_set_mac_address() {
@@ -15,6 +15,12 @@ preinit_set_mac_address() {
ifconfig eth0 hw ether $mac 2>/dev/null
ifconfig eth1 hw ether $mac_wan 2>/dev/null
;;
+ armada-385-linksys-caiman|armada-385-linksys-cobra)
+ mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+ mac_wan=$(macaddr_setbit_la "$mac")
+ ifconfig eth1 hw ether $mac 2>/dev/null
+ ifconfig eth0 hw ether $mac_wan 2>/dev/null
+ ;;
esac
}
diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
index d59cec3ab7..d665cb14aa 100644
--- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
+++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
@@ -8,7 +8,7 @@ preinit_mount_syscfg() {
. /lib/mvebu.sh
case $(mvebu_board_name) in
- armada-xp-linksys-mamba)
+ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-xp-linksys-mamba)
needs_recovery=0
ubiattach -m 8 || needs_recovery=1
if [ $needs_recovery -eq 1 ]
diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
index 55807f5f44..5e9c04b600 100755
--- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
@@ -13,7 +13,7 @@ platform_check_image() {
[ "$#" -gt 1 ] && return 1
case "$board" in
- armada-xp-linksys-mamba )
+ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-xp-linksys-mamba)
[ "$magic_long" != "27051956" -a "$magic_long" != "73797375" ] && {
echo "Invalid image type."
return 1
@@ -30,7 +30,7 @@ platform_do_upgrade() {
local board=$(mvebu_board_name)
case "$board" in
- armada-xp-linksys-mamba)
+ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-xp-linksys-mamba)
platform_do_upgrade_linksys "$ARGV"
;;
*)