Author: luka Date: 2015-11-10 01:16:37 +0100 (Tue, 10 Nov 2015) New Revision: 47433
Added: trunk/target/linux/kirkwood/base-files/etc/init.d/ trunk/target/linux/kirkwood/base-files/etc/init.d/linksys_recovery Modified: trunk/package/system/mtd/src/Makefile Log: kirkwood: support Linksys boot counter on EA[34]500 This is done with existing code from the WRT1900AC port. It makes sure the "auto_recovery" bootloader option is set, and resets the s_env boot counter after a successful boot. This gives users without a serial console connection some measure of safety. Signed-off-by: Claudio Leite <[email protected]> Modified: trunk/package/system/mtd/src/Makefile =================================================================== --- trunk/package/system/mtd/src/Makefile 2015-11-10 00:16:35 UTC (rev 47432) +++ trunk/package/system/mtd/src/Makefile 2015-11-10 00:16:37 UTC (rev 47433) @@ -11,6 +11,7 @@ obj.brcm63xx = imagetag.o obj.ramips = $(obj.seama) obj.mvebu = linksys_bootcount.o +obj.kirkwood = linksys_bootcount.o ifdef FIS_SUPPORT obj += fis.o Copied: trunk/target/linux/kirkwood/base-files/etc/init.d/linksys_recovery (from rev 47432, trunk/target/linux/mvebu/base-files/etc/init.d/linksys_recovery) =================================================================== --- trunk/target/linux/kirkwood/base-files/etc/init.d/linksys_recovery (rev 0) +++ trunk/target/linux/kirkwood/base-files/etc/init.d/linksys_recovery 2015-11-10 00:16:37 UTC (rev 47433) @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=97 +boot() { +. /lib/functions.sh +. /lib/kirkwood.sh + +case $(kirkwood_board_name) in + linksys-audi|linksys-viper) + # make sure auto_recovery in uboot is always on + AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" + if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then + fw_setenv auto_recovery yes + fi + # reset the boot counter + mtd resetbc s_env + ;; +esac +} _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
