Changeset 692

Show
Ignore:
Timestamp:
09/24/06 04:27:06 (2 years ago)
Author:
tg
Message:

we need to flash to different addresses too

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/scripts/flash.sh

    r687 r692  
    2424usage() { 
    2525        cat <<EOF 
    26 Usage: $0 firmware.bin 
     26Usage: $0 firmware.bin [address] 
    2727 
    2828The following models are supported: 
     
    45452) be sure your link is up and has an address in the 
    4646   192.168.1.0/24 address range (other than 192.168.1.1) 
     47   or specify an IP address where to flash to 
    4748 
    4849EOF 
     
    5152 
    5253file=${1:-/nonexistant} 
     54ip=${2:-192.168.1.1} 
    5355 
    5456test -s "$file" || usage 
     
    5759*-asus-wl500g-*.bin) 
    5860        echo Confirming IP address setting... 
    59         echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1 
    60         echo Flashing 192.168.1.1 using "$file"... 
    61         echo -en "binary\nput $file ASUSSPACELINK\nquit\n" | tftp 192.168.1.1 
     61        echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp $ip 
     62        echo Flashing $ip using "$file"... 
     63        echo -en "binary\nput $file ASUSSPACELINK\nquit\n" | tftp $ip 
    6264        echo Please wait until leds stops flashing. Device will automatically reboot. 
    6365        ;; 
    6466*-asus-wl500g-deluxe-*.bin | *-asus-wl500g-premium-*.bin) 
    65         echo Flashing 192.168.1.1 using "$file"... 
    66         echo -en "rexmt 1\ntrace\nbinary\nput $file\nquit\n" | tftp 192.168.1.1 
     67        echo Flashing $ip using "$file"... 
     68        echo -en "rexmt 1\ntrace\nbinary\nput $file\nquit\n" | tftp $ip 
    6769        echo Please wait 5-7 minutes and then remove the power. 
    6870        echo This device does not reboot automatically after flashing. 
    6971        ;; 
    7072*-linksys-*.bin) 
    71         echo Flashing 192.168.1.1 using "$file"... 
    72         echo -en "rexmt 1\ntrace\nbinary\nput $file\nquit\n" | tftp 192.168.1.1 
     73        echo Flashing $ip using "$file"... 
     74        echo -en "rexmt 1\ntrace\nbinary\nput $file\nquit\n" | tftp $ip 
    7375        echo Unit will automatically reboot within 3-7 minutes.  Do not power off. 
    7476        ;; 
     
    7880        ;; 
    7981esac 
    80 echo After that you can login via: ssh admin@192.168.1.1 
     82echo After that you can login via: ssh admin@$ip 
    8183echo Default password, unless changed in menuconfig, is: FreeWRT