OpenWRT on Linksys WRT54G / WRT54GL

This is my private collection of useful stuff for OpenWRT (in my case running
on a Linksys WRT54GL) so I don't have to ask google or search the various wikis
everytime I need these things. I hope somebody else will find it useful, too.

Firmware update with TFTP

tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
Packet tracing on.

plug the Linksys in
as soon as the DMZ LED is blinking, run
put openwrt-xxx-x.x-xxx.bin

Don't plug it off then, it will reboot as soon as the firmware update is
finished.
telnet to the linksys to set a password (if you have changed the IP-address
before it is possible that this setting survived the firmware update, so use
this IP-address instead)
telnet -l root 192.168.1.1
passwd
logout

as soon as a passwort is set (only) the ssh-server can be used to login
ssh 192.168.1.1

You can listen for messages from the OpenWRT for entering failsafe-mode on port
4919 UDP:nc -l -p 4919 -u
The IP-Address of the computer should be in the 192.168.1.* subnet.

Firmware upgrade from the command line on the linksys itself:
copy the .trx-file to /tmp/ with scp or wget
then run e.g.mtd -r write openwrt-brcm-2.4-sqashfs.trx linux