summaryrefslogtreecommitdiff
path: root/target/linux/avr32
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-03-12 13:28:27 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-03-12 13:28:27 +0000
commitf04cccb8425c613ed6f3186ea87776432dad306f (patch)
tree46097dd1789a3f0182155c240d05009c9fe173bd /target/linux/avr32
parent6c3dd84897cbc19a31e5ec1a5da9bcd735b71c9e (diff)
downloadmtk-20170518-f04cccb8425c613ed6f3186ea87776432dad306f.zip
mtk-20170518-f04cccb8425c613ed6f3186ea87776432dad306f.tar.gz
mtk-20170518-f04cccb8425c613ed6f3186ea87776432dad306f.tar.bz2
avr32: add sysupgrade support
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35982
Diffstat (limited to 'target/linux/avr32')
-rwxr-xr-xtarget/linux/avr32/base-files/lib/upgrade/platform.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/avr32/base-files/lib/upgrade/platform.sh b/target/linux/avr32/base-files/lib/upgrade/platform.sh
new file mode 100755
index 0000000..00ad863
--- /dev/null
+++ b/target/linux/avr32/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+PART_NAME=firmware
+
+platform_check_image() {
+ local magic="$(get_magic_long "$1")"
+
+ [ "$ARGC" -gt 1 ] && return 1
+
+ [ "$magic" != "27051956" ] && {
+ echo "Invalid image type."
+ return 1
+ }
+
+ return 0
+}
+
+disable_watchdog() {
+ killall watchdog
+ ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
+ echo 'Could not disable watchdog'
+ return 1
+ }
+}
+
+append sysupgrade_pre_upgrade disable_watchdog