Explorar o código

avr32: add sysupgrade support

Signed-off-by: Gabor Juhos <[email protected]>

SVN-Revision: 35982
Gabor Juhos %!s(int64=12) %!d(string=hai) anos
pai
achega
f04cccb842
Modificáronse 1 ficheiros con 28 adicións e 0 borrados
  1. 28 0
      target/linux/avr32/base-files/lib/upgrade/platform.sh

+ 28 - 0
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