Changeset 1f1c1d8 in freewrt for scripts


Ignore:
Timestamp:
Sep 24, 2006, 4:27:06 AM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
1cf739c
Parents:
644c736
Message:

we need to flash to different addresses too

git-svn-id: svn://www.freewrt.org/trunk/freewrt@692 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/flash.sh

    r644c736 r1f1c1d8  
    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
Note: See TracChangeset for help on using the changeset viewer.