OpenWrt Forum Archive

Topic: More JTAG - wrt54g EJTAG utility hangs on setup_memory()

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

I've built a JTAG adapter to try and revive my WRT54G v2.2

All seems to be working, although the utility hangs almost immediately:

----
./wrt54g -erase:nvram

====================================
WRT54G EJTAG DeBrick Utility v3.0
====================================

Probing bus...
CHIP ID: 00010100011100010010000101111111 (1471217F)
*** Found a Broadcom BCM4712 Rev 1 chip ***

Enabling Memory Writes... Done
----

During the setup_memory function it just hangs on the first ejtag_dma_write call.

My only assumption so far is that I may have damaged my flash chip. Does anyone have any ideas?

Thanks again. And thanks for the help so far (esp. mdb, inh)

What did you change that you now need to jtag? Im assuming its a bad clkfrew setting.. If it is, then you have a very VERY small window to get the jtag to work.. Your best bet is to unplug the router, then get the command to erase what you want ready (ie: already typed in) and then plug in the router, wait a split second, and hit enter. If it spitsout an error, quickly hit the up arrow and then enter. You basically need to get the jtag to start working before the bad settings get loaded, and you have a tiny window to do this in. If it still hangs after the router being on for 3 seconds, unplug and do it again. Ive sat there for hours trying to hit the window, other times i can hit it on the second try. It's all timing.

Check out this: http://openwrt.org/OpenWrtDocs/Customiz … 8e53b1b0cb
for  overclocking info, and then go to http://openwrt.org/OpenWrtDocs/Customiz … 5b24de5967 to learn how to keep this from happening again. By setting the reset_gpio nvram value in the cfe, when you reboot holding the reset button, it loads the nvram values int he cfe. For whatever reason linksys didnt do this by default. I use gpio 6, yours is probably the same.

if the links dont work, first one is to the overclocking seciton on the customization wiki page, second link is to the changing default  cfe values on the same page

Yep, it was a stupid clkfreq (220 to be precise).

I just wrote a simple loop, ala:
$- LIMIT=1000
$- for ((a=1; a <= LIMIT ; a++)); do ./wrt54g -erase:nvram; done

Hit enter, it failed a few times, unplugged, plugged back in, then it worked - now it boots!

Thanks for your help again, much appreciated. I was about to give up [Not having a parallel port on my home machine didn't help much either smile]

(Last edited by nextdayflight on 7 Jun 2005, 05:16)

no problem. just ask [mbm] how many times i was totally convinced it was fried tongue

be sure to read the customization pages on the cfe values and the overclocking. and what version wrt do you have? i may be able to build you a cfe image with the reset trick, and boot_wait enabled tongue

I've got a v2.2 (Bought in AU).

Ok, well, if you can backup your cfe and email it to inh@burnmail.com. I'll make some changes (enable reset trick and boot_wait), and upload it to http://downloads.openwrt.org/inh/cfe/

inh: I just tried, but your e-mail address bounced.

oops sorry. inh@burntmail.com

typo :x

Hi,
i've the same problem.
jtag cable with my wrt54g rev 2.2 seems not to work
found the broadcom chip and "Enabling Memory Writes... Done"
but that is all - have waited some hours.

with google i find this topic.

nextdayflight wrote:

Yep, it was a stupid clkfreq (220 to be precise).

I just wrote a simple loop, ala:
$- LIMIT=1000
$- for ((a=1; a <= LIMIT ; a++)); do ./wrt54g -erase:nvram; done

Hit enter, it failed a few times, unplugged, plugged back in, then it worked - now it boots!

Thanks for your help again, much appreciated. I was about to give up [Not having a parallel port on my home machine didn't help much either smile]

What kind of script is this - bash?

how do i find the right point of time after power on to start the command?

thx for held

merry x-mas wink

Yeah this is bash.

I fire it up BEFORE I turn on my router.

hmmm, dont works on my debian,
but my knowledge of bash scripting is not very well yikes

you need at least bash 3.0 for C-style 'for' to work with bash

ah, k will check this later, thx anyway smile

(and this bash > 3.0 the script above will work?)

The discussion might have continued from here.