diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-03-12 13:28:27 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-03-12 13:28:27 +0000 |
commit | 34b8fc733e8a35779bda9e4ddbb6523d733ef1fc (patch) | |
tree | 3ac8ccaa1e421af524a504387908368e566712ec /target/linux/avr32 | |
parent | 3d115adb28386cb33ecc92f5ab1d688818307557 (diff) | |
download | master-187ad058-34b8fc733e8a35779bda9e4ddbb6523d733ef1fc.tar.gz master-187ad058-34b8fc733e8a35779bda9e4ddbb6523d733ef1fc.tar.bz2 master-187ad058-34b8fc733e8a35779bda9e4ddbb6523d733ef1fc.zip |
avr32: add sysupgrade support
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35982 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/avr32')
-rwxr-xr-x | target/linux/avr32/base-files/lib/upgrade/platform.sh | 28 |
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 0000000000..00ad863d1b --- /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 |