Installing - OpenWrt
Installing - OpenWrt
action=print
OpenWrtDocs/Installing
OpenWrtDocs
We recommend using the daily snapshots, these are compiled versions of the latest openwrt
firmware. You'll find the snapshots here. These snapshots will not work with G v2.2+ or
GS v1.1 hardware.
Experimental binaries
If you own an WRT G v2.2+ or GS v1.1+ hardware, you will need to use the current
experimental binary. These can be found here. We recommend to use the squashfs
versions for the WRT54G and WRT54GS. More information on the experimental
releases can be found on the forum.
Stable Source
1 of 6 07/04/2005 16:35
OpenWrtDocs/Installing - OpenWrt http://openwrt.org/OpenWrtDocs/Installing?action=print
Experimental Source
If you have hardware that is not supported by the above verion of OpenWRT, you can use
the experimental version of the code. You will need to compile this from scratch, and this
is not recommended for beginners. The experimental code includes support for GS v1.1 and
G v2.2 hardware. It may also work with G v3.0 hardware, however this has not yet been
confirmed. More information on the experimental releases can be found on the forum.
3. Installing OpenWrt
LOADING AN UNOFFICIAL FIRMWARE WILL VOID YOUR WARRANTY
The router does not boot directly into the firmware, instead it boots into a program known as
a bootloader which is responsible for initializing the hardware and loading the firmware. If the
boot_wait variable is set, the bootup process is delayed by few seconds allowing a new
firmware to be installed through the bootloader using tftp. Setting of the boot_wait variable is
done through a bug in the Ping.asp administration page by pinging the certain "addresses"
listed below
First, for this to work the internet port must have a valid ip address, either from dhcp or
manually configured from the main page - the port itself doesn't need to be connected unless
using dhcp. Next, navigate to the Ping.asp page and enter exactly each line listed below, one
line at a time into the "IP Address" field, pressing the Ping button after each entry.
;cp${IFS}*/*/nvram${IFS}/tmp/n
;*/n${IFS}set${IFS}boot_wait=on
2 of 6 07/04/2005 16:35
OpenWrtDocs/Installing - OpenWrt http://openwrt.org/OpenWrtDocs/Installing?action=print
;*/n${IFS}commit
;*/n${IFS}show>tmp/ping.log
When you get to the last command the ping window should be filled with a long list of
variables including boot_wait=on somewhere in that list.
This ping exploit definitely works with WRT54G v2.0/GS v1.0 and there are documented
cases of it working for the latest hardware release WRT54G v2.2/GS v1.1. You must have
an address on the WAN port. In the Setup/Basic Setup/Internet Setup section you may wish
to select Static IP and set IP=10.0.0.1, Mask=255.0.0.0, Gateway=10.0.0.2. Those values
are meaningless; you'll be overwriting them soon with new firmware.
You can also use the take-over script to make ping hack in a single command (need a
shell command line interpreter).
Although the firmware can be installed through more traditional means, we recommend that
you use boot_wait for your first install. This will confirm boot_wait is correctly enabled and
provide a firmware recovery experience without the stress of a broken router.
While in the bootloader the linksys wrt54g(s) will be forced to a lan ip of 192.168.1.1. To
use the bootloader's tftp server you need to use a standard tftp client -- the tftp clients
provided by linksys will not work for this. The file to be uploaded depends on the model;
non linksys models take a TRX file while linksys models take a BIN file.
Model Firmware
WRT54G openwrt-g-code.bin
WRT54GS openwrt-gs-code.bin
(other) openwrt-linux.trx
The BIN file is simply a TRX with some extra information at the start to indicate the model.
The only difference between openwrt-g-code.bin and openwrt-gs-code.bin is the first 4
bytes which determine the model.
3 of 6 07/04/2005 16:35
OpenWrtDocs/Installing - OpenWrt http://openwrt.org/OpenWrtDocs/Installing?action=print
The tftp commands might vary across different implementations. Here are two examples,
netkid's tftp client and Advanced TFTP (available from:
ftp://ftp.mamalinux.com/pub/atftp/)
tftp 192.168.1.1
tftp> binary
tftp> rexmt 1
tftp> trace
Packet tracing on.
tftp> put openwrt-g-code.bin
Setting "rexmt 1" will cause the tftp client to constantly retry to sent the file to the given
address. As advised above, plug your box after typing the commands, and as soon as
WRT54G's bootloader start to listen, your client will successfully connect and send the
firmware. You can try to run # ping -f 192.168.1.1 (as root) in a seperate window and fire
the line put openwrt-g-code.bin as the colons stop running over your terminal when you
power-recycle your linksys.
atftp
tftp> connect 192.168.1.1
tftp> mode octet
tftp> trace
tftp> put openwrt-g-code.bin
You don't have to tell atftp to retry file sending, that's default.
Please note, netkit tftp has failed to work for some people. Try to use Advanced TFTP.
Don't forget about your firewall settings, if you have one.
4 of 6 07/04/2005 16:35
OpenWrtDocs/Installing - OpenWrt http://openwrt.org/OpenWrtDocs/Installing?action=print
If your computer is directly connected to the router and you are consistently getting "Invalid
Password" failures, try connecting your computer and the router to a hub or switch. Doing so
will keep the link up and prevent the computer from disabling its interface while the router is
off.
Windows 2000 has a TFTP server, and it can be used to flash with OpenWrt firmware.
Note that the Windows PC needs to be configured with a static IP address in the
192.168.1.0/24 subnet, and cannot use a DHCP IP address when flashing the firmware.
If you managed to get a serial connection to your router and can stop CFE from booting the
firmware with strg-c, you can update your router via network. You need to configure a
TFTP-server on one of your systems and connect it to the same network as your lan port of
your router. Put the correct trx file for your router and task to your tftpboot/tftp directory. If
you see the command line of your Bootloader like this:
CFE>
This is useful for unsupported models, because you can skip the header check. Otherwise
some WRT54GS are very picky about the 2 second timeout, so you can definitely flash it
without any timing problems.
The installation procedure there is slightly different from the Linksys routers: Pull the plug,
press and hold the reset button, plug the device and wait until the PWR LED starts flashing
slowly (almost immediately). Now release the reset button and upload the firmware by TFTP
using the following commands:
TFTP commands:
tftp 192.168.1.1
tftp> binary
5 of 6 07/04/2005 16:35
OpenWrtDocs/Installing - OpenWrt http://openwrt.org/OpenWrtDocs/Installing?action=print
tftp> trace
tftp> get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null
tftp> put openwrt-linux.trx ASUSSPACELINK
After this, wait until the PWR LED stops flashing and the device to reboot and you should be
set. There's also nice shell script doing this work for you to be at
http://openwrt.openbsd-geek.de/flash.sh.
As an alternative (or if this installation routine doesn't do the trick for you) you can always
use the ASUS Recovery tool from your utilities CD to upload your openwrt firmware.
Another thing is that the ASUS WL500G doesn't seem to revert to the 192.168.1.1 address
when starting the boot manager but seems to use the LAN IP address set in NVRAM, so try
this address or use the recovery tool if you've got problems flashing your firmware. On the
other hand, boot_wait seems to be enabled by default on these devices.
The installation procedure is essentially the same as the generic one described above. The
only differences are that the bootloader listens on 192.168.2.1 and the IP of the machine
sending the new firmware has to be 192.168.2.100 or the router will only accept the first
packet.
4. Using OpenWrt
Please see OpenWrtDocs/Using
5. Troubleshooting
If you have any trouble flashing to OpenWrt please refer to OpenWrtDocs/Troubleshooting
6 of 6 07/04/2005 16:35