Flash your WRT54G or WRT54GS v5 series (v5, v5.1, v6)

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:35, 12 August 2006 (edit)
Boneco69 (Talk | contribs)

← Previous diff
Revision as of 14:42, 15 August 2006 (edit) (undo)
Jcollake (Talk | contribs)

Next diff →
Line 5: Line 5:
See here [[Vxworkskiller]] for instructions on flashing your WRT54G G/GS v5-v6 without hardware modifications. See here [[Vxworkskiller]] for instructions on flashing your WRT54G G/GS v5-v6 without hardware modifications.
-= JTAG based flashing procedure (old, deprecated) = 
-There is no need to use this procedure now. It's quite pointless to do it this way unless you need to for some reason. 
-As of April 3, 2006, there is a "Micro" version of DD-WRT that fits onto a version 5 of the WRT54G or WRT54GS. The process to get the firmware onto the version 5 is complicated, however. Mainly, it involves using a [http://en.wikipedia.org/wiki/JTAG JTAG cable]. This [http://forums.hardwarezone.com/showthread.php?p=18118180#post18118180 link] may provide some other helpful guidance on performing the procedure below. 
-The Micro version also works on routers with more than 2MB of flash space. It lacks some functionality of the Mini version (which also lacks some functionality of the full version.). Specifically it leaves out the following: chillispot, nocat, rflow, kaid, samba client, SNMP, IPv6, MMC/SD Card Support, SSH, PPTP/PPTP Client, UPnP and ? (please edit!) 
-'''Note: WRT54 v5 routers are officially supported by DD-WRT since v23 SP1 final. Flashing them is still not for the faint of heart, it is recommended that you get a router with more memory.''' 
-(Expanded directions based on instructions from Piotr Gozdur) 
-<li>If you '''don't''' have both a JTAG cable and the most recent version (4.5) of the [http://downloads.openwrt.org/utils/ HairyDairyMaid's debricker tool] or [http://www.dd-wrt.com/dd-wrtv2/downloads/index.php?path=wrt54gv5+flashing/ HairyDairMaid debricker tool on DD-WRT],([http://froogle.google.com/froogle?q=jtag+cable&hl=en&hs=mw&lr=&client=firefox-a&rls=org.mozilla:en-US:official&pwst=1&sa=X&oi=froogle&ct=title Buying a JTAG Cable]) -- ([http://wiki.openwrt.org/OpenWrtDocs/Customizing/Hardware/JTAG_Cable Howto create JTAG Cable]).'' 
-<li>Download the generic micro version of DD-WRT firmware (dd-wrt.v23_micro_generic.bin) from [http://www.dd-wrt.com/dd-wrtv2/downloads/index.php?path=dd-wrt.v23%20SP1%2Fmicro%2F&download=dd-wrt.v23_micro_generic.bin DD-WRT SP1 Micro]. 
-<li>Download the cfe.bin file from this [http://www.dd-wrt.com/dd-wrtv2/downloads/index.php?path=wrt54gv5+flashing/ directory]. If you are on linux, rename CFE.bin to CFE.BIN. 
-<li>Prepare your JTAG flashing environment.  
-<br>'''Best practices:'''  
-<ol type=a> 
-<li>unplug router between commands. (Power off). 
-<li>If you're using Linux, you'll probably need to be root to have rights to the parallel port.  
-<li>Version 4.5 of HDM's debricker tool will auto-sense the flashchip. Explicit chip parameters like '/fc:01' are usually not necessary. If it does not auto-sense, '''triple-check''' the jtag connections before trying to force it! 
-<li>If the debricker freezes at any point then exit the executable (ctrl-C), power cycle your router, and try again. If the debricker refuses to go past the "Enabling Memory Writes" then you may need to use the /noemw option. 
-<li>Make a backup of your flash via JTAG with command 'wrt54g -backup:wholeflash'. This will take about 10 minutes. 
-<li>Erase the flash (you did backup your :wholeflash, right?) with 'wrt54g -erase:wholeflash'. This will only take a minute. 
-<li>Now your canvas is blank. From here on, you will need to append '/noreset' to your commands. It's time to flash the CFE.BIN you downloaded earlier (It's originally from a wap54g v3). Use the command 'wrt54g -flash:cfe /noreset'. This will also take about 10 minutes. Note that it is possible to flash the entire firmware to the flash using the debricker tool, but this will take '''a very long time''' (like 90 minutes). For this reason it is recommended to use the CFE.BIN then just tftp the whole image over after. 
-<li>Ping to make sure it's responding. If you have troubles you may need to force 10mb/half duplex connection. Either remember the location of the firmware, or copy it to 'c:\code.bin' for ease of use. 
-<li>Upload example micro version of DD-WRT firmware via tftp using command. For example, under Windows use:<br><tt>tftp -i PUT {path to firmware file; example: c:\code.bin}</tt> 
-<li>After uploading via TFTP, just WAIT! Keep waiting. After a few minutes it'll come around on its own if you've done it right. The lights will stop blinking and it'll respond to pings on 
-<li>If your newly flashed v5 router is working properly, you may want to correctly set your MAC addresses. Using a command line, enter 'nvram set et0macaddr=xx:xx:xx:xx:xx:xx' where xx is the MAC address printed on the bottom of your router. Follow that with the commands 'nvram commit' and 'reboot'. 
= Enable 16 MB RAM = = Enable 16 MB RAM =

Revision as of 14:42, 15 August 2006


RECENT UPDATE: Flashing without hardware modification is now possible!

Normal flash procedure (JTAG-less)

See here Vxworkskiller for instructions on flashing your WRT54G G/GS v5-v6 without hardware modifications.

Enable 16 MB RAM

See Enable_16MB_RAM_on_WRT54G_v5

jtag unbricker to detect new Samsung K8D3216UBC flash

  • I've stuck my WRT54GL because windows stopped the network interface and the flash process was killed - so my router is being trashed with corrupt flash image... seek some information on the internet a found the wrt54g unbricker from lightbulb and ... the error came out : Unknown flash ID... hopefully the autor put the code GPL, so a can path it. It needed only to add two lines at flash-definitions tables, so they are: ( insert at line 326 from v4.5 )
    // - Jorge Ferreira - Add samsung on early models.
    { 0x00EC, 0x22A0, size4MB, CMD_TYPE_AMD, "K8D3216UTC  2Mx16 TopB     (4MB)"   ,63,size64K,    8,size8K,     0,0,        0,0        },
    { 0x00EC, 0x22A2, size4MB, CMD_TYPE_AMD, "K8D3216UBC  2Mx16 BotB     (4MB)"   ,8,size8K,      63,size64K,   0,0,        0,0        },
  • Now the program is working...
     D:\linksys_jtag_win>wrt54g.exe -backup:wholeflash /noemw /silent
     WRT54G/GS EJTAG Debrick Utility v4.5
     Probing bus Done
     Instruction Length set to 8
     CPU Chip ID: 00000101001101010010000101111111 (0535217F)
     Found a Broadcom BCM5352 Rev 1 CPU chip 
        - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
        - EJTAG Version ....... : 1 or 2.0
        - EJTAG DMA Support ... : Yes
     Issuing Processor / Peripheral Reset ... Done
     Enabling Memory Writes ... Skipped
     Halting Processor ... <Processor Entered Debug Mode!> ... Done
     Clearing Watchdog ... Done
     Probing Flash at (Flash Window: 0x1fc00000) ... Done
     Flash Vendor ID: 00000000000000000000000011101100 (000000EC)
     Flash Device ID: 00000000000000000010001010100010 (000022A2)
     Found a K8D3216UBC  2Mx16 BotB     (4MB) Flash Chip 
        - Flash Chip Window Start .... : 1fc00000
        - Flash Chip Window Length ... : 00400000
        - Selected Area Start ........ : 1fc00000
        - Selected Area Length ....... : 00400000
     You Selected to Backup the WHOLEFLASH.BIN
     Backup Routine Started
     Saving WHOLEFLASH.BIN.SAVED_20060812_115052 to Disk
      82%   bytes = 3445612
     and continues - and at last:
     Saving WHOLEFLASH.BIN.SAVED_20060812_115052 to Disk...
     Done  (WHOLEFLASH.BIN.SAVED_20060812_115052 saved to Disk OK)
     bytes written: 4194304
     Backup Routine Complete
     elapsed time: 1464 seconds

    To all : best regards ! --Boneco69 13:35, 12 Aug 2006 (CEST)