1 KERNEL_IMG="openwrt-au1000-au1500-vmlinux.bin"
2 ROOTFS_IMG="openwrt-au1000-au1500-jffs2-128k.fs"
4 platform_check_image() {
5 [ "$ARGC" -gt 1 ] && return 1
6 case "$(get_magic_word "$1")" in
8 ( get_image "$1" | tar -tf - $KERNEL_IMG >/dev/null && \
9 get_image "$1" | tar -tf - $ROOTFS_IMG >/dev/null) || {
10 echo "Invalid image contents"
15 echo "Invalid image type"
20 platform_do_upgrade() {
23 [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && conf="-j $CONF_TAR"
24 get_image "$1" | tar -Oxvf - $KERNEL_IMG | mtd write - "kernel"
25 get_image "$1" | tar -Oxvf - $ROOTFS_IMG | mtd $conf write - "rootfs"
30 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
31 echo 'Could not disable watchdog'
36 append sysupgrade_pre_upgrade disable_watchdog