mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
mvebu: make flashing more safe
Turn on the auto recovery feature when flashing and turn it off on successful bootup. Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45792 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
14
target/linux/mvebu/base-files/etc/init.d/u-boot_env
Executable file
14
target/linux/mvebu/base-files/etc/init.d/u-boot_env
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
# Copyright (C) 2014-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
linksys_get_target_firmware() {
|
||||
@@ -19,6 +19,9 @@ 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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user