Turn on the auto recovery feature when flashing
and turn it off on successful bootup.
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 45792
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2015 OpenWrt.org
+
+START=97
+boot() {
+. /lib/functions.sh
+. /lib/mvebu.sh
+
+case $(mvebu_board_name) in
+ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-xp-linksys-mamba)
+ fw_setenv auto_recovery off
+ ;;
+esac
+}
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
#
linksys_get_target_firmware() {
fw_setenv bootcmd "run nandboot"
fi
+ # re-enable recovery so we get back if the new firmware is broken
+ fw_setenv auto_recovery yes
+
echo "$target_firmware"
}