macsat.com OpenWrt and ASUS WL Forum
March 14, 2010, 09:55:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: 1 [2] 3   Go Down
  Print  
Author Topic: Reflash with JTAG  (Read 3360 times)
0 Members and 1 Guest are viewing this topic.
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #15 on: June 06, 2009, 19:08:45 PM »

@schufti,

Aha; our posts crossed  Cheesy

My brain must be on vacation. I do have a running OpenWRT autobootfs on a USB stick (for the case my autoexec on the HDD has some fault preventing a proper boot) and I now remember that getting that to work did involve some IP setting, enabling DHCP etc...

@schueler,

Hope the post from schufti now re-surrects your system.

Ernst
Logged
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #16 on: June 06, 2009, 20:58:43 PM »

4) this should give you enough info on using redboot (did you read the RB manual?)

Yes I did.
But most commands don't work as mentioned in the wiki.
So was not really useful to me.

Right now, I am trying to get Solar tftp server running.
When does the hurt stop....

Don't get me wrong but I have been R&D design engineer for a long time and I knowing about getting questions all the time.
It is clear to me what I have to do but the information on how to do it is scattered all over the wiki and other internet sites. So for tftp it's absolutely not clear how to use Solar's tftp server software. Where can I find the option PUT or send file???
I downloaded other tftp servers ( for windows ) with the same problem: how to upload files???
They all tell me that they are for cisco, 3com or what soever router  and you can upload config settings.
Some of them I have to tell them which port... I don't know, I just want to transfer a file to my device.

If you ask me, it's one big nightmare.


Ben
Logged

When does the hurt stop...
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #17 on: June 06, 2009, 21:42:11 PM »

Cool down  Grin

I never went this route either...

If you install Solarwinds TFT Server and click help, it will load a 349 page pdf. On page 71 it mentions the creation of a directory to store and hold files. Put your MTD.BIN file there.

It is a TFTP Server; so the client, in this case redboot will ask the server to send it the filé; you just have to run the TFTP server and have the file available in the specified directory.

At least that is what I guess from what I read.

If it doesn't work out at all, send me the PCB in a bubble envelope and some sturdy packaging and I will flash it for you and send it back.

Ernst
Logged
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #18 on: June 06, 2009, 21:53:40 PM »

HI,

tftp in windows is a CLIENT. so you can get/put a file to/from a server.
If you use it to upgrade fw to some devices, the device has to be a tftp SERVER (like recovery loader).
that is why the command line is tftp -i ipofdevice PUT FILENAME
hopefully? the device then checks the uploaded file for plausibility before it flashes it to memory.
(some devices even distinguish filenames to put them to different areas of flash)

RedBoot is a tftp CLIENT too, so you have to run a tftp SERVER on the PC side.
the filename you use in the RB commandline, is a request to the tftp SERVER
the SERVER then looks in it's set (default) location for this file.

The wiki is not the RB manual...

If you can't get tftp to work, there still is XMODEM transfer ...

schufti

p.s.: feel free to ammend the Wiki wherever you find appropriate !!!
« Last Edit: June 06, 2009, 22:01:46 PM by schufti » Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #19 on: June 06, 2009, 22:28:58 PM »

The wiki is not the RB manual...

I know Wink

Thanks to point out the directory.
I also found in the manual that you have to put your files in there.

So far so good.
Server is running ( started )
File in place ( C:\tftp-root )
port is open ( that's what xp is telling me, let's hope so )

device is ready to rock and roll
Type in load command and go!

I get a timeout on the device and no request at the server.
Beats me.

Do I have to open an additional port?

@schufti : did you use windows xp and SolarWinds tftp-server as well?

Ben

Logged

When does the hurt stop...
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #20 on: June 06, 2009, 22:40:22 PM »

If you can't get tftp to work, there still is XMODEM transfer ...

This is what I tried in the first place and where I got an error on.
The reason to get tftp working is the speed of uploading.
4MB by xmodem takes 30 minutes.

By comparing it to your dump, it is exactly the same as mine except for the xmodem part and the error I get from flashing.

Quote
Code:
RedBoot> ip_address -l 192.168.1.150
IP: 192.168.1.150, Default server: 0.0.0.0
RedBoot> load -r -v -m xmodem -b 0x400000 mtd.bin
CCCCCRaw file loaded 0x00400000-0x007fffff, assumed entry at 0x00400000
xyzModem - CRC mode, 32769(SOH)/0(STX)/0(CAN) packets, 7 retries
RedBoot> fl -s 0x400000 -d 0xffc00000 -l 0x400000
NOR Flash ID = 22a7

[First Sector=0h,Last Sector=46h]

Erase sector................................................................<Fai
l erase 3f,Retry ..>.<Fail erase 3f,Retry ..>.<Fail erase 3f,Retry ..>.<Fail era
se 3f,Retry ..>.<Fail erase 3f,Retry ..><Fail erase 3f>
Upgrading fail,please try again
RedBoot>

But.... I going to try with xmodem again to see if my device has changed its thought... Wink


Ben
Logged

When does the hurt stop...
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #21 on: June 06, 2009, 23:06:25 PM »

 Cry

Code:
RedBoot> load -r -v -m xmodem -b 0x400000
CRaw file loaded 0x00400000-0x007fffff, assumed entry at 0x00400000
xyzModem - CRC mode, 32769(SOH)/0(STX)/0(CAN) packets, 3 retries
RedBoot> fl -s 0x400000 -d 0xFFC00000 -l 0x400000
NOR Flash ID = 22a7

[First Sector=0h,Last Sector=46h]

Erase sector................................................................<Fai
l erase 3f,Retry ..>.
Logged

When does the hurt stop...
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #22 on: June 06, 2009, 23:13:04 PM »

For RedBoot I used the file MGB100rb.bin.
Somehow I get erase errors with the rbmgb.bin file.


Ben
Logged

When does the hurt stop...
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #23 on: June 06, 2009, 23:55:32 PM »

small party  Smiley

tftp is working now ( saves me 30 minutes every time Wink )
reason: some port is blocked by windows firewall. I just disabled the firewall to test.

reason for a small party: flash the device with MTD.BIN still doesn't work.  Huh

I noticed that in my version ( MGB100RD.BIN ) the erase part is much longer then the one of schufti's.
The ID of the flash is the seem ( 22a7 ).

So, how come schufti is able to program and I am not?


Ben
Logged

When does the hurt stop...
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #24 on: June 07, 2009, 01:13:26 AM »

Hi,

looks like your flash is faulty ....

there are two options left:

1) try to cut the first 64k from mtd.bin and flash them via redboot. Then cut the top 64k from mtd.bin and flash them via jtag. This should be enough to invoke recovery loader ....

2) try different redboot from laxan, see this post
 http://www.macsat.com/macsat/component/option,com_smf/Itemid,50/topic,683.msg3716/#msg3716
it has also telnet on port 9000 if buttons are pressed on start

schufti

p.s.: erase was same length i asume, its old hardcopy and points were cut .....
« Last Edit: June 07, 2009, 01:17:17 AM by schufti » Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #25 on: June 07, 2009, 12:00:54 PM »

Perhaps a xilinx programmer problem? Cables to long? ECP/EPP port problems?

Buffered/unbuffered cable?

Ernst
Logged
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #26 on: June 07, 2009, 12:35:55 PM »

Perhaps a xilinx programmer problem? Cables to long? ECP/EPP port problems?

Buffered/unbuffered cable?

Ernst

Silly me; ofcourse not. The file already resides in RAM when redboot tries to flasht it, so it can't be jtag. I will spend most of this Sunday trying to locate my brain. Must have lost it somewhere, probably in the garden. 3200 square meters so finding it will take a while....
Logged
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #27 on: June 07, 2009, 12:44:16 PM »

Just one extra thought.

In his first post Ben shows us the redboot boot messages:

Code:
+Ethernet eth0: MAC address 00:00:01:02:03:04
IP: 192.168.123.254, Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 17:35:13, Aug  7 2007

Platform: PC (I386)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x000f0000, 0x00072390-0x000a0000 available
MGB100-RB by Schufti 07/08/07
<press Ctrl+C to enter prompt mode>

RedBoot>

Doesn't this shows us in the third line that redboot here runs from ROM? Shouldn't that be ROMRAM? If redboot runs from ROM it cannot flash over itself... or am I missing something here?

E.
Logged
Schueler
Newbie
*
Offline Offline

Posts: 21



View Profile
« Reply #28 on: June 07, 2009, 14:06:23 PM »

Doesn't this shows us in the third line that redboot here runs from ROM? Shouldn't that be ROMRAM? If redboot runs from ROM it cannot flash over itself... or am I missing something here?

That is what I noticed too so I had tried to read RAM ( Memeory ) with the RDC tool.
In Memory there was a copy ( shadow ? ) of the MGB100RG.BIN file.

At least, thats my feeling.
Does t show RAM or ROM?
RDC Loader -> Window -> Memory
 or
CTRL <M>


Ben
Logged

When does the hurt stop...
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #29 on: June 07, 2009, 14:11:22 PM »

Hi ernst,

good thinking, but RB is set to copy itself to RAM before executing.
And the same version worked for me (see snippet)

but this doesn't matter with the method #1, which is exactly the method I used to resurrect my bricked MGB100.

let's wait for some feedback from schueler ...

rgds,
schufti

ahhh, posts coincided again
Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.051 seconds with 24 queries.