WRT610N

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 144, 145, 146  Next
Author Message
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Fri Jul 25, 2008 16:23    Post subject: Reply with quote
Yep, sounds like a micro type header, and 14 pin is standard for ARM boards.

14 PIN STD on ARM

Vcc 1 * * 2 GND
nTRST 3 * * 4 GND
TDI 5 * * 6 GND
TMS 7 * * 8 GND
TCK 9 * * 10 GND
TDO 11 * * 12 nRESET
Vcc 13 * * 14 nSRST

Look also at the wiggler diagram included in the tjtag zip file...it's probably very close to one of these... and some boards require power on pin 1

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Sponsor
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Fri Jul 25, 2008 19:00    Post subject: Reply with quote
Tornado wrote:
Can someone fill me in on the details of this, I didn't see it in the thread anywhere.

Jtag cable being used ?
Jtag software being used ?
What is the flash chip ?


I am using a JTAG adapter from usbjtag.com.
I am using the software for the adapter.
The flash chip on my particular router is EN29LV640B, and is located on the bottom of the PCB.

I don't have any micro headers either so I just took some 22AWG wire and stripped the ends, then poked them into the JTAG holes in order. They are just thick enough where they will hold just fine and provide you with a fairly reliable connection.

So far, I have found the settings I needed to correctly recognize the flash, but I screwed up and accidentally used the profile for the WRT54GS when doing the backup. The file that I have now as a result is indeed 8MB, but as far as I know it may contain just garbage.

I'm going to continue trying to debrick the router and reply back if I make any progress.
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Fri Jul 25, 2008 20:05    Post subject: 8MB of whatever... Reply with quote
So here's the only thing I was able to grab before I bricked the unit.

I don't know if it's actually useful in any capacity, but I figured something might be better than nothing...



wrt610n-garbage.rar
 Description:

Download
 Filename:  wrt610n-garbage.rar
 Filesize:  1.86 MB
 Downloaded:  785 Time(s)

Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Fri Jul 25, 2008 21:04    Post subject: Reply with quote
My apologies to everyone who reads my posts and thinks, "What a fscking n00b..."

This is my first foray into hacking a new and yet unsupported router and I really don't have a clear idea of what I'm doing in regards this router and I'm working with tools that are poorly documented at best.

At this point my difficulties stem from my inexperience with JTAG on Linksys devices, and also my inability to find the right settings to use with my USB JTAG.

I was able to finally find the right settings for the flash chip, but I do not know the addresses to use for the WRT610N profile, as it would be defined in the JTAG software. The configuration files used by USBJTAG are easy to edit, but there isn't much support documentation on what all of the values actually mean.

For reference, here is the profile for the WRT54GS:

Code:

Test:
Name=WRT54GS
Memory=Ram,0,0x80000000,0x800000
Memory=CFE,1,0x9fc00000,0x40000
Memory=KERNEL,1,0x9fc40000,0x1B0000
Memory=NVRAM,1,0x9fDF0000,0x10000
Programram=0x80200000
Endian=Little
IRLength=8
Protocol=EJTAG
DMA=Yes
ProbTrap=1


Here is the profile that I tried creating for the WRT610N:

Code:

Test:
Name=WRT610N
Memory=Ram,0,0x80000000,0x800000
Memory=CFE,1,0x9fc00000,0x40000
Memory=KERNEL,1,0x9fc40000,0x7B0000
Memory=NVRAM,1,0xA03F0000,0x10000
Programram=0x80200000
Endian=Little
IRLength=8
Protocol=EJTAG
DMA=Yes
ProbTrap=1


This profile, while it allows me to talk to the device in some capacity, does not appear to help me out much in getting a good backup. Furthermore, I have been only successful in reading data, and as far as I can tell any attempts to write to the device have stalled the JTAG software. I suspect this is related to my using incorrect settings.

If anyone has any ideas I can try, I'd be more than happy give it a shot.
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 5:17    Post subject: Reply with quote
Did I just kill this this thread? Is there anyone else working on this router? Sad
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Sat Jul 26, 2008 5:27    Post subject: Reply with quote
@Omikron
Not to many forum members would even attempt to do this, so my hats off to you. I have looked at the backup, and at least the CFE seems to be in good order Smile so we now have the embedded nvram defaults.

Broadcom typically uses two windows for flash on this type of processor, 1C000000 for greater than 4MB and 1FC00000 for 4MB and less, but your software could be changing that, you could try it anyway if your software allows it.

Does the software allow you to edit flash chip definitions ? do you have the setting you are using now ?

Can you provide the pinout you used ? it seems to be correct..

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 6:24    Post subject: Reply with quote
Tornado wrote:
@Omikron
Not to many forum members would even attempt to do this, so my hats off to you. I have looked at the backup, and at least the CFE seems to be in good order Smile so we now have the embedded nvram defaults.

Broadcom typically uses two windows for flash on this type of processor, 1C000000 for greater than 4MB and 1FC00000 for 4MB and less, but your software could be changing that, you could try it anyway if your software allows it.

Does the software allow you to edit flash chip definitions ? do you have the setting you are using now ?

Can you provide the pinout you used ? it seems to be correct..


I don't know the pinout off the top of my head, but I'm just connecting the wires 1:1 to the 14 pin header on the adapter.

The software for the adapter I am using has two files that define its operation.

The first one is flash.def, which has the following information at the top:

Code:
// ============================================================================
//  Flash definition file
//  type of the definition
//  Format Id1,Id2, Name of flash, size(Hex), Protocol (0,AMD, 1 INTEL),
//       Number of secttors, sector size,(hex).... (optional buffer size in)
// ============================================================================


Per the datasheet for the Eon part, I extrapolated the following defintion:

Code:
0x007f,0x22CB,EN29LV640B,0x800000,0,8,0x2000,127,0x10000



The second file is usbjtag.def. The configuration of this file is not very well documented, and reverse engineering it is somewhat cumbersome.

As an example, here a few profiles it has:

Code:
Test:
Name=DP301-013.1
IRLength=5
Memory=sys,0,0x2000,0x2000
Memory=ram,0,0x80000000,0x800000
Memory=firm,1,0x7FC00000,0x400000
Memory=Eeprom,2,0,0x2000
Programram=0x80000200
DCUReg=0x3000
Protocol=DCU
Eepromprot=4
Endian=Little
Init=0x2000,0xB291
Init=0x2010,0xB6D1
Init=0x2020,0xB291
Init=0x2030,0xB6D1

Test:
Name=WRT54GS
Memory=Ram,0,0x80000000,0x800000
Memory=CFE,1,0x9fc00000,0x40000
Memory=KERNEL,1,0x9fc40000,0x1B0000
Memory=NVRAM,1,0x9fDF0000,0x10000
Programram=0x80200000
Endian=Little
IRLength=8
Protocol=EJTAG
DMA=Yes
ProbTrap=1


Now I have been able to figure out a little bit about how SOME of these values work.

I don't know how the first "Memory" line works but I do know that everything after that simply defines the address ranges of different areas of flash. I believe it follows the following layout:

Code:
Memory=Name,Type,StartAddress,Size


I don't know what anything else means. Also, so far I have been unsuccessful in actually getting it to WRITE anything. I can only read.
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 6:38    Post subject: Reply with quote
Here's the latest "garbage" that I pulled from the bricked device.

For reference, here are the stupid steps I did, in order.

1. Try to find a way to interact with JTAG port.
2. Found way, but did not research the proper settings very well.
3. Tried to find a way to pull a complete backup of the flash.
4. Couldn't figure out proper settings. Guessed the settings and dumped a partial flash. (previous garbage file)
5. Got impatient and tried flashing v24_tng via web interface for WRT600N to see what would happen.
6. I found out that it bricks the router (no surprise)
7. Figured out proper settings to use in flash.def.
8. Tried to write back "garbage" dump in a vain attempt to ressurect the unit.
9. Failed.
10. Possibly figured out correct settings to use to dump entire 8MB flash.
11. Dumped the attachment below.

I think I might head to the store and pick up another WRT610N tomorrow and hopefully be more careful with this one. Namely, I'm not going to attempt any writes or upgrades until I am 100% sure I have the correct backup. Wink



moregarbage.rar
 Description:

Download
 Filename:  moregarbage.rar
 Filesize:  3.47 MB
 Downloaded:  665 Time(s)

Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Sat Jul 26, 2008 7:03    Post subject: Reply with quote
@Omikron
The flash definitions are correct for a BotB flash. The second dump is garbage, I guess from trying to flash it previously :)

On your pinout, on the board, you pins are not labeled TDO,TCK, etc ? Thats what I was talking about...

I do not think anything is wrong with the 610n that you have. Just settings for your cable, if you had a standard or wiggler cable, I think it would be short work now...as you have figured out almost everything...and like I said, Im pretty sure we have a good CFE, and most likely a good wholeflash backup.

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 7:10    Post subject: Reply with quote
Tornado wrote:
@Omikron
The flash definitions are correct for a BotB flash. The second dump is garbage, I guess from trying to flash it previously :)

On your pinout, on the board, you pins are not labeled TDO,TCK, etc ? Thats what I was talking about...

I do not think anything is wrong with the 610n that you have. Just settings for your cable, if you had a standard or wiggler cable, I think it would be short work now...as you have figured out almost everything...and like I said, Im pretty sure we have a good CFE, and most likely a good wholeflash backup.


That's the thing...there's no labels on either the router or the JTAG adapter I'm using. It's the one from http://usbjtag.com/

I'm sure the router I have is fine, but by now I've completely trashed the flash I think. :-D

If I can get this cable working I'll be very happy since it is ridiculously fast compared to a parallel wiggler device. I'm actually borrowing this one from a friend but I may end up purchasing one of these if this works out.
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Sat Jul 26, 2008 7:12    Post subject: Reply with quote
I don't think anything is wrong with the flash. Why don't you build a std cable, just to try it, you would learn something in the process.

I will look at the link you provided.

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 8:26    Post subject: Reply with quote
Tornado wrote:
I don't think anything is wrong with the flash. Why don't you build a std cable, just to try it, you would learn something in the process.

I will look at the link you provided.


Unfortunately, I do not have access to any machines that have a parallel port. This is why I must be able to find a USB based solution. I can't imagine that I'm the only one in this situation.
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Sat Jul 26, 2008 8:46    Post subject: Reply with quote
Ok, I understand now, to bad we don't have USB Jtag support in Tjtag yet. But with the work you have done so far, Im confident we have no problems with a standard or wiggler cable on this box.

You will have to write the author of your jtag cable and ask for the pinouts...and why you might be haveing problems writing to that flash chip.

_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Omikron
DD-WRT Novice


Joined: 25 Jul 2008
Posts: 27

PostPosted: Sat Jul 26, 2008 9:19    Post subject: Reply with quote
Tornado wrote:
Ok, I understand now, to bad we don't have USB Jtag support in Tjtag yet. But with the work you have done so far, Im confident we have no problems with a standard or wiggler cable on this box.

You will have to write the author of your jtag cable and ask for the pinouts...and why you might be haveing problems writing to that flash chip.


From what I can find, the USB JTAG device that I use uses the standard 14-pin EJTAG pinout. Does this help you at all?

Edit: I believe this is the standard, yes? http://www.linux-mips.org/wiki/JTAG
Tornado
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 2087
Location: Odessa, Ukraine

PostPosted: Sat Jul 26, 2008 9:24    Post subject: Reply with quote
I kinda already knew that Smile I still don't think it will be a problem for the other two cables..and now we have a CFE thanks to you.
_________________
Want JTAG support - Donate a router
or Donate with PayPal !

My preferred parallel jtag adapter:
TIAO Parallel adapter

Tjtag website - http://tjtag.com

Compiling DD-WRT on:
AMD Phenom II X6 1090T @ 3926.667 Mhz

Aptosid X64 - Debian SID X64
Ubuntu 10.10 X64 - Arch X64
Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 144, 145, 146  Next Display posts from previous:    Page 6 of 146
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum