diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2016-10-13 12:52:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-10-24 08:45:06 +0200 |
commit | 3764caa93478e3472df3128b79b6d0f6b0fb999c (patch) | |
tree | 3ddc2ed6f8a0eb6525ef0267042fd81bab749223 /target/linux/mvebu/base-files/lib/preinit | |
parent | 5da412bf802f902bfa227157c457e41daa4558f8 (diff) | |
download | upstream-3764caa93478e3472df3128b79b6d0f6b0fb999c.tar.gz upstream-3764caa93478e3472df3128b79b6d0f6b0fb999c.tar.bz2 upstream-3764caa93478e3472df3128b79b6d0f6b0fb999c.zip |
mvebu: add support for the Linksys WRT3200ACM (Rango)
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/mvebu/base-files/lib/preinit')
-rw-r--r-- | target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac | 3 | ||||
-rw-r--r-- | target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg | 14 |
2 files changed, 10 insertions, 7 deletions
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 876c08b771..3e870e8b84 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,6 @@ # # Copyright (C) 2014-2015 OpenWrt.org +# Copyright (C) 2016 LEDE-Project.org # preinit_set_mac_address() { @@ -14,7 +15,7 @@ preinit_set_mac_address() { ifconfig eth0 hw ether $mac 2>/dev/null ifconfig eth1 hw ether $mac 2>/dev/null ;; - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby) + armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby) mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) mac_wan=$(macaddr_setbit_la "$mac") ifconfig eth1 hw ether $mac 2>/dev/null 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 a54226f00c..3edd82ebcd 100644 --- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg +++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg @@ -1,5 +1,6 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2014-2016 OpenWrt.org +# Copyright (C) 2016 LEDE-Project.org # preinit_mount_syscfg() { @@ -8,15 +9,16 @@ preinit_mount_syscfg() { . /lib/mvebu.sh case $(mvebu_board_name) in - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba) + armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba) needs_recovery=0 - ubiattach -m 8 || needs_recovery=1 + syscfg_part=$(grep syscfg /proc/mtd |cut -c4) + ubiattach -m $syscfg_part || needs_recovery=1 if [ $needs_recovery -eq 1 ] then echo "ubifs syscfg partition is damaged, reformatting" - ubidetach -m 8 - ubiformat -y -O 2048 -q /dev/mtd8 - ubiattach -m 8 + ubidetach -m $syscfg_part + ubiformat -y -O 2048 -q /dev/mtd$syscfg_part + ubiattach -m $syscfg_part ubimkvol /dev/ubi1 -n 0 -N syscfg -t dynamic --maxavsize fi mkdir /tmp/syscfg |