Ignore:
Timestamp:
2012-04-04T18:06:29+02:00 (4 years ago)
Author:
florian
Message:

[orion] generic: use magic_long in sysupgrade

Signed-off-by: Matthias Bücher <mail@…>

File:
1 edited

Legend:

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

    r21833 r31200  
     1# 
     2# Copyright (C) 2010-2011 OpenWrt.org 
     3# 
     4 
    15# use default "image" for PART_NAME 
    26# use default for platform_do_upgrade() 
     
    711        local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo` 
    812        local magic="$(get_magic_word "$1")" 
     13        local magic_long="$(get_magic_long "$1")" 
    914 
    1015        case "${hardware}" in 
    11          # hardware with padded uImage + padded rootfs 
     16         # hardware with a direct uImage partition 
     17         # image header format as described in U-Boot's include/image.h 
     18         # see http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h 
    1219         'Linksys WRT350N v2') 
    13                 [ "${magic}" != '2705' ] && { 
    14                         echo "Invalid image type ${magic}." 
     20                [ "${magic_long}" != '27051956' ] && { 
     21                        echo "Invalid image type ${magic_long}." 
    1522                        return 1 
    1623                } 
    1724                return 0 
    1825                ;; 
    19          # Netgear WNR854T has extra header before uImage 
     26         # Netgear WNR854T (has uImage as file inside a JFFS2 partition) 
    2027         'Netgear WNR854T') 
    2128                [ "${magic}" != '8519' ] && { 
Note: See TracChangeset for help on using the changeset viewer.