Changeset 35982


Ignore:
Timestamp:
2013-03-12T14:28:27+01:00 (5 years ago)
Author:
juhosg
Message:

avr32: add sysupgrade support

Signed-off-by: Gabor Juhos <juhosg@…>

Location:
trunk/target/linux/avr32/base-files/lib
Files:
2 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/avr32/base-files/lib/upgrade/platform.sh

    r35981 r35982  
    1 PART_NAME=linux 
     1# 
     2# Copyright (C) 2013 OpenWrt.org 
     3# 
     4 
     5PART_NAME=firmware 
    26 
    37platform_check_image() { 
     8        local magic="$(get_magic_long "$1")" 
     9 
    410        [ "$ARGC" -gt 1 ] && return 1 
    511 
    6         case "$(get_magic_word "$1")" in 
    7                 # .trx files 
    8                 2705) return 0;; 
    9                 *) 
    10                         echo "Invalid image type" 
    11                         return 1 
    12                 ;; 
    13         esac 
     12        [ "$magic" != "27051956" ] && { 
     13                echo "Invalid image type." 
     14                return 1 
     15        } 
     16 
     17        return 0 
    1418} 
    15  
    16 # use default for platform_do_upgrade() 
    1719 
    1820disable_watchdog() { 
     
    2325        } 
    2426} 
     27 
    2528append sysupgrade_pre_upgrade disable_watchdog 
Note: See TracChangeset for help on using the changeset viewer.