2 # Copyright (C) 2010 OpenWrt.org
8 RAMFS_COPY_DATA
=/lib
/ramips.sh
10 platform_check_image
() {
11 local board
=$
(ramips_board_name
)
12 local magic
="$(get_magic_long "$1")"
14 [ "$#" -gt 1 ] && return 1
107 [ "$magic" != "27051956" ] && {
108 echo "Invalid image type."
114 [ "$magic" != "6d000080" ] && {
115 echo "Invalid image type."
123 [ "$magic" != "5ea3a417" ] && {
124 echo "Invalid image type."
130 [ "$magic" != "43535953" ] && {
131 echo "Invalid image type."
138 echo "Sysupgrade is not yet supported on $board."
142 platform_do_upgrade
() {
143 local board
=$
(ramips_board_name
)
147 default_do_upgrade
"$ARGV"
154 ( ps |
grep -v 'grep' |
grep '/dev/watchdog' ) && {
155 echo 'Could not disable watchdog'
160 append sysupgrade_pre_upgrade disable_watchdog