Changeset 18722f7a in freewrt
- Timestamp:
- Sep 24, 2006, 3:01:06 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 8059647
- Parents:
- b2dd4e5c
- File:
-
- 1 edited
-
scripts/flash.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/flash.sh
rb2dd4e5c r18722f7a 1 #!/usr/bin/env bash 1 #!/bin/sh 2 # $Id$ 2 3 # 3 4 # tftp flash script for wireless routers 4 5 # 6 # Copyright (c) 2006 by Thorsten Glaser <tg@mirbsd.de> 7 # Copyright (C) 2006 by Waldemar Brodkorb <wbx@freewrt.org> 5 8 # Copyright (C) 2004 by Oleg I. Vdovikin <oleg@cs.msu.su> 6 # Copyright (C) 2006 by Waldemar Brodkorb <wbx@freewrt.org>7 9 # 8 10 # This program is free software; you can redistribute it and/or modify … … 18 20 # You should have received a copy of the GNU General Public License 19 21 # along with this program; if not, write to the Free Software 20 # Foundation, Inc., 5 9 Temple Place, Suite 330, Boston, MA 02111-1307USA22 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 23 22 if [ -z "$1" ] || [ ! -f $1 ] || [ -z $2 ]; then 23 echo Usage: $0 firmware model 24 cat << EOF 25 Following models are supported: 26 asus_wl500g - Asus WL500g 27 asus_wl500gd - Asus WL500g Deluxe 28 asus_wl500gp - Asus WL500g Premium 29 linksys - All Linksys models 24 usage() { 25 cat <<EOF 26 Usage: $0 firmware.bin 27 28 The following models are supported: 29 asus-wl500g - Asus WL500g 30 asus-wl500g-deluxe - Asus WL500g Deluxe 31 asus-wl500g-premium - Asus WL500g Premium 32 linksys - All Linksys models 30 33 31 34 IMPORTANT: … … 39 42 it again, then release button) 40 43 41 1) connect your pcto the LAN port44 1) connect your PC to the LAN port 42 45 2) be sure your link is up and has an address in the 43 192.168.1.0/24 address range ( and not the192.168.1.1)46 192.168.1.0/24 address range (other than 192.168.1.1) 44 47 45 48 EOF 46 exit 0 47 fi 48 if [ "$2" == "asus_wl500g" ]; then 49 echo Confirming IP address setting... 50 echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1 51 echo Flashing 192.168.1.1 using $1... 52 echo -en "binary\nput $1 ASUSSPACELINK\nquit\n" | tftp 192.168.1.1 53 echo Please wait until leds stops flashing. Device will automatically reboot. 54 elif [ "$2" == "asus_wl500gd" -o "$2" == "asus_wl500gp" ]; then 55 echo Flashing 192.168.1.1 using $1... 56 echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.1.1 57 echo Please wait 5-7 minutes and then remove the power. 58 echo This device does not reboot automatically after flashing. 59 else 60 echo Flashing 192.168.1.1 using $1... 61 echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.1.1 62 echo Unit will automatically reboot within 3-7 minutes. Do not power off. 63 fi 49 exit 1 50 } 51 52 file=${1:-/nonexistant} 53 54 test -s "$file" || usage 55 56 case $file in 57 *-asus-wl500g-*.bin) 58 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 62 echo Please wait until leds stops flashing. Device will automatically reboot. 63 ;; 64 *-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 Please wait 5-7 minutes and then remove the power. 68 echo This device does not reboot automatically after flashing. 69 ;; 70 *-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 Unit will automatically reboot within 3-7 minutes. Do not power off. 74 ;; 75 *) 76 echo Unsupported model "'$file'" 77 usage 78 ;; 79 esac 64 80 echo After that you can login via: ssh admin@192.168.1.1 65 81 echo Default password, unless changed in menuconfig, is: FreeWRT
Note:
See TracChangeset
for help on using the changeset viewer.
