Questions about Jtag troubles with broadcom and atheros mods

Post new topic   Reply to topic    DD-WRT Forum Index -> Hardware DIY / Hardware Mods
Author Message
voip2014
DD-WRT Novice


Joined: 20 Feb 2021
Posts: 38

PostPosted: Fri Mar 19, 2021 2:20    Post subject: Questions about Jtag troubles with broadcom and atheros mods Reply with quote
So I have an (1) old D link DIR 615 e3 and (1) wrt54gs v1 and (1) wrt54gs v2 ( jtag pins are different on this one) routers, they all work and boot up and run fine all routers have headers soldered in.

I would like to be able to jtag in since I plan on changing the mac address on all of them the trouble I am having is I have a bus pirate Jtag board and jtag cable neither give me a cpu response on windows do I need to use linux to get this working tried on windows 7

I know the routers are fine I also know the pins are soldered fine because I have a jtagulator and all the pins register TDI TDO TMS TCK and the ground pin


Am I just needing to use windows XP, or linux for this work, I am leaning on an issue with ECP and the parallel port which is selected atm any idea would be great.

The other option would be to desolder the flash and edit the flash using a SPI programmer but I would like to avoid this option unless I get a test socket like this one where I would be able to pop up the flash and do whatever with it. Would nice just to get the jtags working now on 3 routers.

wrt54g -probeonly

====================================
WRT54G/GS EJTAG Debrick Utility v4.8
====================================

Probing bus ... Done

Instruction Length set to 5

CPU Chip ID: 11111111111111111111111111111111 (FFFFFFFF)
*** Unknown or NO CPU Chip ID Detected ***

*** Possible Causes:
1) WRT54G/GS is not Connected.
2) WRT54G/GS is not Powered On.
3) Improper JTAG Cable.
4) Unrecognized CPU Chip ID.

=====END=====

I have also used a multimeter to check the pins they seem to beep ok anyone else had this issue?
Sponsor
voip2014
DD-WRT Novice


Joined: 20 Feb 2021
Posts: 38

PostPosted: Sat Mar 20, 2021 5:45    Post subject: Reply with quote
So I figured out the issue its got nothing to do with my soldering or the pins it was the jtag software!!!

make sure to use either tjtag or the original wrt54g.exe ONLy!!!!!!! do not use zjtag or any other version with parallel port you will have issues!

I used ECP and windows 7 it works fine on port 378 with make sure to select " USE interrupt when availble for the ltp port" for windows. This was 1 week of scratching my head trying to figure out whats busted which was nothing at all turns out just software, the unbuffered works better than buffered using bus pirate or bus blaster.


you will see something like this and can move on to whatever you want. getting the detection is the hard part.



C:\wrt54g>wrt54g.exe -probeonly

====================================
WRT54G/GS EJTAG Debrick Utility v4.8
====================================

Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00010100011100010010000101111111 (1471217F)
*** Found a Broadcom BCM4712 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 ... Done
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Clearing Watchdog ... Done

Probing Flash at (Flash Window: 0x1fc00000) ... Done

Flash Vendor ID: 00000000000000000000000010001001 (00000089)
Flash Device ID: 00000000000000000000000000010111 (00000017)
*** Found a Intel 28F640J3 4Mx16 (8MB) Flash Chip ***

- Flash Chip Window Start .... : 1c000000
- Flash Chip Window Length ... : 00800000
- Selected Area Start ........ : 00000000
- Selected Area Length ....... : 00000000



*** REQUESTED OPERATION IS COMPLETE ***


TO swap the mac address issue:

wrt54g.exe -backup:cfe
rename saved CFE.SAVED blah blah to CFE.bin
wrt54g.exe -erase:kernel
wrt54g.exe -erase:nvram
final step:
wrt54g.exe -flash:cfe

make sure to edit prior to final step: CFE.bin the mac location using HxD hex editor at offset 000010C1

and your done, reflash your firmware using tftp or whatever method, if that didnt work then you might have a case where the mac is coming from another location you can search the forum for a solution.

[ 99% Flashed] 1c03feb0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03fec0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03fed0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03fee0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03fef0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff00: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff10: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff20: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff30: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff40: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff50: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff60: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff70: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff80: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ff90: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ffa0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ffb0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ffc0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ffd0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03ffe0: ffffffff ffffffff ffffffff ffffffff
[ 99% Flashed] 1c03fff0: ffffffff ffffffff ffffffff ffffffff
Done (CFE.BIN loaded into Flash Memory OK)

=========================
Flashing Routine Complete
=========================
elapsed time: 2060 seconds


*** REQUESTED OPERATION IS COMPLETE ***


Few more notes,
=================
In some cases your flash will not work even thou it says it worked, in these cases you can try

wrt54g.exe -erase:wholeflash
then
wrt54g.exe -erase:cfe

pay careful attention to the entering debug mode part.


BAD CFE
=======
In some cases your CFE is bad, in this case you will need to hook up BOTH!! serial and jtag and watch the serial port while the router boots to see if your CFE worked.


Some of the CFEs need to edit: 1E00 - 1E01 address space the initial imacaddr unfortunately this was figured out by trial and error. For my wrt54Gs v1 the macaddr worked but for the wrt54gs 2, needed to edit 1e00.


I had a lot of trouble with CFEs both dumping and using CFEs from collection both gave a lot of troubles. You might need to try a few.

Basic CFE organization is as follows:

et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)

Total memory used by CFE: 0x80300000 - 0x8043EB40 (1305408)
Initialized Data: 0x80338DB0 - 0x8033B160 (9136)
BSS Area: 0x8033B160 - 0x8033CB40 (6624)
Local Heap: 0x8033CB40 - 0x8043CB40 (1048576)
Stack Area: 0x8043CB40 - 0x8043EB40 (8192)
Text (code) segment: 0x80300000 - 0x80338DB0 (232880)
Boot area (physical): 0x0043F000 - 0x0047F000
Relocation Factor: I:00000000 - D:00000000

If you see : Reading :: CODE Pattern is INCORRECT! (W54S)
Failed.: Error
CFE>

When trying to load firmware you will need to edit the header from the bin you are putting on to match W54S.


Good luck, I have attached a ddwrt firmware with an edited header 54S header so this should work fine if you see the error.
voip2014
DD-WRT Novice


Joined: 20 Feb 2021
Posts: 38

PostPosted: Mon Mar 22, 2021 19:13    Post subject: Reply with quote
this issue was resolved!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Hardware DIY / Hardware Mods 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 cannot attach files in this forum
You cannot download files in this forum