OpenWrt Forum Archive

Topic: Upgrade WRT54G from 16MB to 32MB (or more)?

The content of this topic has been archived on 23 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everybody

I was wondering if it was possible to upgrade the RAM of a WRT54G from 16MB to 32MB?
My unit (v3.1) has a Hynix HY5DU281622ET-J ram chip which according to specs is DDR333 8Mx16 in a TSOP package.
I've seen that some v2.0 (XH) units featuring the HY5DU561622DT-J can use of the full 32MB provided by this chip. As the v2.0 and the v3.1 share the same CPU (BRCM 4712), shouldn't it be possible to upgrade the ram of every WRT54G >=v2.0 to 32MB by replacing the ram chip and setting the appropriate nvram variables? what's the limit imposed by the cpu/pcb design? and how could i recognize compatible ram chips?

I'm quite willing to try out this hardware mod as it would substantially increase the capabilities of this otherwise already great Linux device!
(the flash memory can already be extended easily by the well documented sd/mmc card mod)

nvram show |grep sdram on my WRT54G v3.1 shows:
According to this means DDR, 16bit interface, 9bit column, which corresponds with the HY5DU281622ET-J

It seems that those people who were able to unlook the full 32MB on XH units had to change the value for sdram_init from 0x0000 to 0x0008 to enable the 9th "address line". But the XH units have a different RAM setup (e.g. they have SD RAM whereas v3.x units have DD RAM).

On the other hand I've seen on pictures that WRT54G v2.x, v3.x and WRT54GS v2.x have identical PCB layouts(?). As the GS units have 32MB (HY5DU561622DT-J), it should still simply be possible to simply replace the RAM chip?!

Could someone with a WRT54GS v2.x (and 32MB of RAM) please post the contents of their sdram_init and sdram_config NVRAM variables?


Please see post #3.

Please stop such worthless threads. Thanks.

(Last edited by olli on 2 Jan 2006, 17:19)

I agree that my posts could maybe have been added to another thread (e.g. this one).
I don't agree with your argument to get a router with more ram, as they are [1] sometimes not easily available [2] more expensive. As for replacing the router with a PC, I just want to do the opposite, replace my dust-blowing, power-hungry, noise-making linux box with something with a better woman-acceptance factor wink
I don't need the full functionality of a real linux box on the WRT, but it would at least be nice to be able to run e.g. nmap -O which is not possible at the moment due to limited ram!
Another point is the pure fun of replacing a 66pin TSOP memory module manually with a solder iron smile
I'm quite sure this MOD can be done and I'm willing to do it, even if I break my hardware (after which I may indeed consider buying a WRT54GS or something similar). But for the moment I need some information and hopefully somebody here can help me...

Back to matter: it seems that apart from the different ram modules (vide supra), WRT54Gv2/3 and WRT54GSv2.x seem to be very similar with respect to PCB layout and NVRAM setup. In fact, I was not able to spot any obvious differences on the PCB around the CPU and RAM region judged from pictures on and my own board... also the NVRAM sdram variables are very similar:

G v3.1 (nvram show |grep sdram)

GS v2.0 (thanks to Xnaron for providing these)

Apart from sdram_ncdl (which seems to be quite unimportant as it can be reset by the boot-loader), they are completely identical.

The only ("morphological") difference between HYDU28... and HYDU56... is pin42 (NC and A12, respectively), which i could trace to RA7 (next to the right end of the writing "DIP66-400"). RA7 is a 0ohm "resistor" which is also present on the GS and leads to the BCM4712. From there, obviously, I can not trace it anymore and Broadcom does not seem to like to disclose any specs sad .

The tts/0 output of the bootloader/kernel does not give any details about RAM configuration.

Either it's really as simple as replacing the RAM chip or I miss something... anyway, further progress will be reported in due course (I'm waiting for my RAM modules to arrive)

(Last edited by synthrax on 13 Jan 2006, 23:10)

synthrax, I completely agree with your decision and your motivation, as i have nearly the same problem (the thread olli linked was mine, ram-upgrade on siemens). atm i'm looking for an appropriate ram-chip, but i'm pretty sure i'll find one that fits my siemens!

i'm very sorry that i can't help you any further, but wanted you to know that i also don't think this question/thread is worthless!


mauritzius: thanks for your sympathy smile . your siemens also has a BCM4712 and the last four bits of your sdram_init are the same as mine. The only explicit documentation i found about this variable is the one from oleg on the memory is initialized by the bootloader. the corresponding code can be found mainly in the file sbsdram.S (here is a copy), and is freely available in the official GPL firmware distribution of linksys. this file may deliver further clues but i will need some time to "decipher" the MIPS assembly language (any help highly appreciated wink ).
it seems that the bootloader either takes the memory configuration from nvram (i.e. sdram_*) or it may also be "hardcoded" into regions of the bootloader itself! therefore i also have to compare my bootloader image (obtained by "dd if=/dev/mtdblock/0 of=/tmp/cfe.bin") to the image of a GSv2.0 (obtained here).

btw: the most probable place of finding 16Mx16 memory chips is on a 128MB SO DIMM with 4 chips. the memory bus is 64bit wide, divided by 4 this gives 16bit. (or a 256mb module with 8 chips and two banks).

maybe you can draw some conclusions on your own problem. i wish you good luck, as your ram is even more limited than mine smile
you have 2 solder places on the siemens of which only one is populated, as far as i understand it? in any case you should install two equal modules.

olli wrote:

Please see post #3.

Please stop such worthless threads. Thanks.

When it comes right own to it, doing the absurd/nonsensical and then finding a use for it is fun.  wink Why would anyone want to put a SD card in their router instead of buy an Asus with hard drive ability?  Because it is fun; a learning experience, and hacking around with stuff is what Linux is all about.  Just because a project doesn't make sense to you doesn't mean that you have to shutdown the persons aspirations.


Hi guys

Doing the "absurd" this time has been fruitful (and not worthless wink )
I can now happily report that upgrading the RAM of WRT54G v3.1 from 16MB to 32MB is simply a matter of replacing the memory chip!! that is, no change in software is required, the bootloader will automatically detect the full amount of ram!
I just finished doing this mod with the help of a guy from the electronics workshop at the department where i work. the steps involved were:
1. find a suitable replacement memory chip (16MBx16)
2. remove the standard memory chip
3. solder the new memory chip to the pcb
as the memory chip is packaged as TSOP (1/4 pitch) and has 66pins, this should only be carried out by people with (very) good solder skills and appropriate equipment!!! we used a Weller hot-air soldering station for removal and SMD solder iron for placing. a good magnifying glass (or binocular) is advantageous smile
after the mod, the WRT booted on first try and the bootloader reported 32768KBytes total memory. this was confirmed by "free".
Detailed instructions will follow... (I will setup a webpage)
Happy Modding wink

(Last edited by synthrax on 13 Jan 2006, 18:46)

I put a short description of what I did with a few pictures on
jvnn has pointed out the use of ChipQuik to facilitate the desoldering work. Once I receive my free sample, I will post more pictures, especially of the process itself, not only the results.

thats probably one of the most useful mods big_smile

it wont be long before 32mb wrt's are totally gone, so this is a good backup option.

I've put 32 mB ram in my asus wl500g. the router is normal working but the memory amount stays the same hmm

matchless: can you describe how exactly you "put the 32 mB ram" in your asus wl500g? the wl500g deluxe has 32mb ram, and if I remember well, you have to 'unlock' them by setting nvram or bootloader variables (maybe someone can comment on this, didn't find anything on first try in the forums)?

I desoldered the original RAm chips and took from a 128mB 4 chips sdram PC memory 2 chips.

These 2 chips are now in my asus WL500G (not the deluxe version).I did nothing with the firmware because my soldering skills are good but I'm a learning beginner with linux.

When I use the commando "free"  then the router see the memory amount still as 16 mB. In you're reply I read I have to unlock the chips.

Can you tell me what variables has to be changed and how I can do this? can I change it with VI ?

unfortunately i'm very limited in helping you with the asus, as i don't own one myself. in my case, the added ram was automatically detected. it is the bootloader which determines the available ram and also the linux kernel has to be told the right amount of ram. to get the bootloader detect your ram upgrade might be as simple as setting a nvram variable or it might be as hard as modifying the bootloader source code (which is largely in MIPS assembly language), cross-compiling it and installing it using JTAG.

for a start, check out this link: and post the contents of your sdram_* nvram variables, which you can view with this command:
nvram show |grep sdram

this id the output:


seems that the sdram_init has to be changed. 16mB has 0x000a and has to be changed to 0x000b.
only problem is how to do that  hmm

easy thing smile
2 commands:
sdram set sdram_init=0x000b (this sets the variable)
nvram commit (this writes the change to flash memory, making it permanent)

Warning: changing nvram variables may have unpredictable results and may even brick your router!
...but you will nevertheless have to try it wink

no pain no gain tongue

but before I try this i've one question..

the show command gives : sdram_init=0x0419

On the original box I see on the website that the sdram_init for 16mB is 0x000a.

but the show gives 0x0419?? This is not the same? or? do I've to calculate something?
can i just add the one bit to 0x0419? so it would be 0x041A ?is this correct?

(Last edited by matchless on 21 Jan 2006, 01:26)

sorry, obviously i didn't read your post properly, stupid me smile

0x0419 = 00000100 00010011 (binary)
hm, that's quite strange as according to it would mean:
DDRAM, 16bit interface, 8bit column; but i thought the asus had SDRAM?!

my only guess is to try and change the column width to 9bit, so:

I've changed the sdram-init to 3 diferent values (yes, i know , i'm a daredevil tongue ) 0x041a ,0x041b and 0x000a

the last one was a bit scary because the router got back in the basic settings and I had to find the routers IP.

When I'm doing a nvram show|grep sdram I get this output:


but stil no memory upgrade:

$ free
              total         used         free       shared      buffers
  Mem:        13932        11028         2904            0         1364
Swap:            0            0            0
Total:        13932        11028         2904

synthrax wrote:

hm, that's quite strange as according to it would mean:
DDRAM, 16bit interface, 8bit column; but i thought the asus had SDRAM?!

Then maybe this isn't the right information for bcm47xx based boards.
Try 0x0c29.
EDIT: See sbsdram.h for further information.

(Last edited by wtzm on 21 Jan 2006, 16:30)

Just wanted to report that also the RAM of the WRT54GL can be upgraded from 16MB to 32MB smile ...

I'm stupid sad

The chips I used were the same amount that are in de asus. that was this problem. 25 year experience and this is the first time that something like this happend to me. Next time earlyer to bed wink

but I soldered this time the good chips in the box but then the box doesn't boot anymore sad

I've looked to the datasheets again and came to the conclusion that some pins need to be re-directed. The chips bigger than 16mB has a adress-pin more. The BA0 and BA1 is controlled by the (upper) adresbus so I think that the pin-out with the bigger chips are messed up then.

Can some-one tell me what the wright  pinning is between the 16 and 32 mB chips? Wich pin needs to be redirected? Or is this unpossible to do? It has to be possible because there is a company who upgrade ipaq's with 128 mB (and higher) and the original mem for an (older) ipaq is 32 mB .

synthrax wrote:

Just wanted to report that also the RAM of the WRT54GL can be upgraded from 16MB to 32MB smile ...

Can you give us more details? Did you have to modify anything?

Now are you brave enough to find a 8mb flash chip to change?

Hi matchless

I'm not sure you need any 'redirection'. BA0, BA1 select the bank. A0 - A11 are address lines and indeed to address 32MB you need one more address line (A12). However, this line (pin 42 on a DDR TSOP-66 ram chip) should already be connected (to the CPU).
anyway, when you install a bigger ram chip, your router should in any case still boot. when it doesn't boot, there's almost certainly a problem with the soldering.
on the first trial of upgrading the ram on my WRT54GL, the unit didn't boot either. there must have been a short when i first powered the unit. even after carefully checking and soldering again each solder point i couldn't revive the unit, so i guess the ram chip was dead. i then replaced it with a fresh one and checked each solder point BEFORE plugging power... and then it booted with 32MB smile

The discussion might have continued from here.