Accidentally erased mtd0 (EA6400)

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
orlando
DD-WRT Novice


Joined: 13 Jul 2020
Posts: 3

PostPosted: Mon Jul 13, 2020 17:26    Post subject: Accidentally erased mtd0 (EA6400) Reply with quote
I purchased a used linksys EA6400 to install DDWRT and used an online instuructions for the process. Everything was going OK.
I flash the custom DDWRT using TFTP2 and boot to DDWRT.
Enable SSH and make a copy of cfe and nvram
Modified the custom cfe uwing CFEEdit.exe with the MAC Address, WPS info.
Copy the new file to router /tmp/root using WinSCP
An tried to flash the new cfe.

I used the command:
mtd unlock /dev/mtd0
and then
mtd –f write /tmp/root/new6400cfe.bin /dev/mtd0
and also tried.
mtd write –f /tmp/root/new6400cfe.bin /dev/mtd0


I was never able to write the new cfe and always got the following message:

Usage: mtd [ ...] [ ...]
The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
unlock unlock the device
erase erase all data on device
write |- write (use - for stdin) to device
Following options are available:
-q quiet mode (once: no [w] on writing,
twice: no status messages)
-r reboot after successful command
-f force write without trx checks
-e erase before executing the command
Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
mtd -r write linux.trx linux


For some reason I dont understand it never worked. Then after several tries I was not sure if I was getting access to mtd and did a
mtd erase mtd0 (I think this was a very bad choice)

Now the router does not boot up and aparently mtd was erased. Before rebooting the router I flash it with the latest DDWRT and it said flash successfull. But got no response after that. Now I realize that I might erase the IP and MacAddress and cannot talk to it via Ethernet port. Anything else that can be done to unbrick it?

Will a JTAG work to only flash mtd0 on this situation?

Please let me know.

Orlando
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 7213
Location: Texas, USA

PostPosted: Mon Jul 13, 2020 18:42    Post subject: Reply with quote


LOM wrote:
sergey1977 wrote:
which is jtag connector and please pinouts for jtag
thanks


1&2 is jtag for each wifi chip
3 is cpu jtag, both linksys 10-pin and std arm 20-pin


REF: "EA6300V1" (Q87-EA6400) BCM4360

JTAG: https://www.tiaowiki.com/w/Debrick_Routers_Using_JTAG_Cable

Not sure if somewhere in the linked forum thread if the actual pinouts were identified as to which hole is for which pin, but that's what I've found so far.

_________________
Official Forum Rules, Guidelines, and Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW - TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum.

---------------------------------------------------------

Linux User #377467 counter.li.org / linuxcounter.net
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 927
Location: Latin America

PostPosted: Mon Jul 13, 2020 21:49    Post subject: Reply with quote
kernel-panic69 wrote:
Not sure if somewhere in the linked forum thread if the actual pinouts were identified as to which hole is for which pin, but that's what I've found so far.

I haven't JTAG EA series, but from the picture, maybe is like the old Linksys pinout. @orlando: in case you don't find the actual pinout, and if you have a tester available, check for continuity of each port. If one column is grounded, perhaps the other is nTRST, TDI, TDO, TMS, TCK. But before trying to connect anything, make sure the JTAG cable has resistors for each line, should what you find or the above is not the right pinout.

_________________
Worked with: WR850Gv2, WHR-HP-G54, WRT54 G/GL/GS, f5d7231-4p, wl-520gU, WRT150N, DIR-400A1, DIR-600B1, WLI-TX4-G54HP, WHR-HP-GN, F7D3301/FD7301, F7D3302/F7D7302, WNR3500Lv2, e1000
orlando
DD-WRT Novice


Joined: 13 Jul 2020
Posts: 3

PostPosted: Tue Jul 14, 2020 18:20    Post subject: Reply with quote
I was loking for additional information on the TJTAG program online. Will the following commands works on EA Series using the TJTAG Program to flash CFE?

tjtagv2.exe -erase:cfe To erase your router's CFE?
tjtagv2.exe -flash:cfe To flash the CFE back to your router?

So basically find out the JTAG pinout for the EA series. Connect to the JTAG to router, run the JTAG program and make sure it talks to the router. Then use the commands above to erase and flash CFE?

I already heve the original CFE and the modified CFE that I need to flash.

Is flashing the CFE the same as flashing the mtd0?
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 927
Location: Latin America

PostPosted: Tue Jul 14, 2020 23:47    Post subject: Reply with quote
After you check the JTAG electrical connections, and before erasing anything, make a backup of whatever part the instructions you're following tell you to overwrite.

Also, note that sometimes a serial port connection is useful to understand what is the current status of the system. If you do, start by looking at the boot log. Even more, sometimes you're lucky and the serial port gives you some suggestion on what to do to recover.

_________________
Worked with: WR850Gv2, WHR-HP-G54, WRT54 G/GL/GS, f5d7231-4p, wl-520gU, WRT150N, DIR-400A1, DIR-600B1, WLI-TX4-G54HP, WHR-HP-GN, F7D3301/FD7301, F7D3302/F7D7302, WNR3500Lv2, e1000
orlando
DD-WRT Novice


Joined: 13 Jul 2020
Posts: 3

PostPosted: Wed Jul 15, 2020 15:45    Post subject: Reply with quote
feliciano wrote:
After you check the JTAG electrical connections, and before erasing anything, make a backup of whatever part the instructions you're following tell you to overwrite.

Also, note that sometimes a serial port connection is useful to understand what is the current status of the system. If you do, start by looking at the boot log. Even more, sometimes you're lucky and the serial port gives you some suggestion on what to do to recover.


The problem is that I erased the mtd0 which has the IP Address and MAC Address. Therefore it is my understanding that I cannot use serial connection if I do not have an IP Address. Is that correct? Or is there a way to connect though serial if the bootloader partition has been erased? If there is a way please let me know. My PC does not have a parallel port for the JTAG. I will have to fish an older PC with a parallel connection somewhere.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 7213
Location: Texas, USA

PostPosted: Wed Jul 15, 2020 16:31    Post subject: Reply with quote
TUMPA. Uses USB. There's probably also something that might work with Arduino.
_________________
Official Forum Rules, Guidelines, and Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW - TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum.

---------------------------------------------------------

Linux User #377467 counter.li.org / linuxcounter.net
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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