This is a hardware mod for your WRT54G to double the RAM from 16MB to 32MB. This was tested on a v3.1 unit but should also work on v3.0 and v4.0 (which is just the same as the WRT54GL).

If you intend to use your WRT54G just as a wireless access point and router, you are probably not interested in this mod. If, however, you unleashed the full potential of this sub 100$ “mini-computer” by installing one of the many Linux distros (e.g. OpenWRT), you may sooner or later realize, that the standard 16MB may not be enough for your purposes. For example “nmap -sS” will terminate with an error message “Killed” which is due to limited memory!

Get ready for some serious solder work to experience the full potential of your WRT!
I became interested in those WRT’s because I needed a firewall for my laptop computer at the university (“what the hell does the best corporate firewall help you, when there’s hundreds of people behind which are completely unaware of computer security and will happily let spread the desease from within?”). So I bought a WRT54G v3.1 for CHF 99.- (~€65.-) at a local hardware store and as an old Linux aficionado, logically I installed OpenWRT.

The WRT became sort of a hobby and soon its capabilities expanded from being “just” a firewall to improved storage (SD/MMC card mod) and connective capabilities (Dual Serial Mod), intrusion detection system (snort), wireless network sniffer (kismet) and network probing tool (tcpdump). I also installed RRDtools to monitor all the crucial parameters of the device. One thing that struck me when checking the RRD statistics was that the RAM of the device was almost constantly at limit. Certain applications (e.g. nmap) would also simply refuse to work.

In search to alleviate this problem, I found out on linksysinfo.org that the PCB layout of my G v3.1 was exactly the same as the the one of the WRT54GS v2.0, a version with double the flash and RAM memory, which was unfortunately not available when I went shopping my G (and I think they don’t produce them anymore). Some more research revealed that the firmware and the bootloader (which determines the available RAM at bootup) were almost identical. The similarity in hard- and software led me to believe that apart from the memory chips, these were in fact exactly the same units! It should therefore be possible to upgrade the G to the configuration of a GS, thereby doubling its RAM capacity!

This indeed turned out to be true :)
All you have to do is to replace the RAM chip. The exact steps which are involved, are:
1. find a suitable RAM replacement chip
What we are looking for is a 16Mx16 chip, which means it has 16 million addresses each with a 16bit word, i.e. a capacity of 256Mbit or 32MByte. You will find these most probably on DDR SO-DIMMS, as they have normally 4 chips per rank/side (the memory data bus of a PC is 64bit wide, divided by 4 chips, this gives 16bit per chip). You have to exactly identify the chips and check their specifications. Important parameters: TSOP-II 66pin package, 16Mx16bit (4 banks). I found my replacement, a Hynix HY5DU561622CT-H from a 128MB SO-DIMM which contained 4 of those chips:
WRT54RAM_Hynix

2. isolate the RAM chip from the SO DIMM
You have to be very careful not to destroy it. Use a temperature controlled SMD solder iron, “Soder-Wick” and an SMD shim blade (a very thin steel-band) to desolder the individual pins of the TSOP. A hot-air solder station is ideal, but not required. After you have detached the chip, carefully control the leads and if necessary bend them into proper alignment.
3. remove the old (16MB) RAM chip from the WRT
As we have no use for this anymore, you could cut the leads which makes removal much more easy. Be careful not to detach the solder pads from the PCB! The result will look something like .

4. install the new (32MB) RAM chip
You will need a very thin SMD solder tip, desoldering braid and a magnifying glass to check the result. Every lead has to be attached clearly to the solder pad without any interconnections between the leads, like ! Double and triple check the result!
5. boot your router and see if it works
IF it works, chances are good that you now have 32MB of RAM at your disposal, which is plenty for further projects ;)

Disclaimer: I cannot be held responsible for damages which result from carrying out this procedure. It worked for me, but you are completely on your own if you decide to do it. Needless to say that this will void your product warranty.