New project: Non-JTAG CFE replacement on the WRT54G v5

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4 ... 27, 28, 29  Next
Author Message
ro-maniak
DD-WRT User


Joined: 07 Jun 2006
Posts: 367

PostPosted: Wed Jun 21, 2006 8:56    Post subject: Re: checksum algorithm documented... Reply with quote
db90h wrote:

... If anything happens and I'm not able to complete this task, I hope someone can pick up where I left off since I've done much of the grub work.
Jeremy


Yeah man, watch out, they are out there looking for you! All your routers are belong to the them!!! ...and they are not going to like this...

Laughing

But seriously, great job.

_________________
If you use DD-WRT, you HAVE to make a donation! See this topic too: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=228
Sponsor




Joined: 01 Jan 1970
Posts:

PostPosted: Wed Jun 21, 2006 10:01    Post subject: Re: checksum algorithm documented... Reply with quote
ro-maniak wrote:
db90h wrote:

... If anything happens and I'm not able to complete this task, I hope someone can pick up where I left off since I've done much of the grub work.
Jeremy


Yeah man, watch out, they are out there looking for you! All your routers are belong to the them!!! ...and they are not going to like this...


LOL. Seriously, unrelated to this, someone has tracked me down for reasons unknown. That's why I fear something will happen... as crazy as this sounds. It's a very whack story.

Anyway, yea, I about had a heart attack when my test code emitted the right checksum ;p. I am very happy to have this done.

Although I should probably now begin doing some 'real' work, in case something does happen to me, I might not be able to leave this project alone and go ahead and finish it up...

Assuming I make it at least a week though, I will definitely have this accomplished...barring any more big hurdles Wink.

.....

The next step is to write a firmware image creator. It's a bit more involved than the TRX tool, but not that much work. I dunno if I'll go to the trouble of making it really nice, or just hack it out as quickly as possible.. depends on my mood. It'll probably never be used again, but who knows...
BG
DD-WRT User


Joined: 07 Jun 2006
Posts: 69
Location: AL/GA

PostPosted: Wed Jun 21, 2006 11:59    Post subject: Reply with quote
Fuckin' superb work!

What was said and by whom? Come on. Let us know!

_________________
WRT54G 3.1
DD-WRT v23 SP1 Final (05/16/06) std

ScrapeTorrent.com -- My Bittorrent Search Site
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Wed Jun 21, 2006 12:13    Post subject: Re: checksum algorithm documented... Reply with quote
db90h wrote:
ro-maniak wrote:
db90h wrote:

... If anything happens and I'm not able to complete this task, I hope someone can pick up where I left off since I've done much of the grub work.
Jeremy


Yeah man, watch out, they are out there looking for you! All your routers are belong to the them!!! ...and they are not going to like this...


LOL. Seriously, unrelated to this, someone has tracked me down for reasons unknown. That's why I fear something will happen... as crazy as this sounds. It's a very whack story.

Anyway, yea, I about had a heart attack when my test code emitted the right checksum ;p. I am very happy to have this done.

Although I should probably now begin doing some 'real' work, in case something does happen to me, I might not be able to leave this project alone and go ahead and finish it up...

Assuming I make it at least a week though, I will definitely have this accomplished...barring any more big hurdles Wink.

.....

The next step is to write a firmware image creator. It's a bit more involved than the TRX tool, but not that much work. I dunno if I'll go to the trouble of making it really nice, or just hack it out as quickly as possible.. depends on my mood. It'll probably never be used again, but who knows...



if you get the linux kernel booting i could do the rest

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
ro-maniak
DD-WRT User


Joined: 07 Jun 2006
Posts: 367

PostPosted: Wed Jun 21, 2006 13:05    Post subject: Reply with quote
Woot. Guys. Just imagine, DDWRT being the first (and maybe only) firmware that all those poor users with a v5 can JUST flash onto their device, as if nothing was easier!!!!!!!!! Cool Laughing Twisted Evil Very Happy

Man, will this be a stunt. And also, it opens up a world of possibilities... anything that runs on a chip that can run DDWRT is now in danger of getting flashed!!!! Twisted Evil

_________________
If you use DD-WRT, you HAVE to make a donation! See this topic too: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=228
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Wed Jun 21, 2006 15:42    Post subject: Reply with quote
Awesome Very Happy
malawi
Guest





PostPosted: Wed Jun 21, 2006 15:51    Post subject: Reply with quote
ro-maniak wrote:
Woot. Guys. Just imagine, DDWRT being the first (and maybe only) firmware that all those poor users with a v5 can JUST flash onto their device, as if nothing was easier!!!!!!!!! Cool Laughing Twisted Evil Very Happy

LOL. And what about the v6 and the v7?

Its no wonder Linux/Opensource has gone nowhere. You folks will spend half your lives reinventing the f*cking wheel.
rovel
DD-WRT Novice


Joined: 07 Jun 2006
Posts: 21

PostPosted: Wed Jun 21, 2006 16:57    Post subject: Reply with quote
it's almost unbelievable, guys ! Good luck with your work. Could this be any trouble for Linksys?
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Wed Jun 21, 2006 17:06    Post subject: Reply with quote
malawi wrote:
ro-maniak wrote:
Woot. Guys. Just imagine, DDWRT being the first (and maybe only) firmware that all those poor users with a v5 can JUST flash onto their device, as if nothing was easier!!!!!!!!! Cool Laughing Twisted Evil Very Happy

LOL. And what about the v6 and the v7?

Its no wonder Linux/Opensource has gone nowhere. You folks will spend half your lives reinventing the f*cking wheel.


v6 is no problem. its still almost identical to the v5. v7 will never be supported so far i see.

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s




Joined: 01 Jan 1970
Posts:

PostPosted: Wed Jun 21, 2006 17:12    Post subject: Reply with quote
First, due to my excitement, I made a slight mistake in my description of the checksum algorithm. It begins at the start of the header, not at +4 (after code pattern).

I've also made some fixes to the header definition. There were some typos I found when I actually put it to use. I've updated my wiki, so, as always, the latest information will be there.

I have an early alpha version of my tool to view, extract, and build firmware images for the WRT54G v5 and v6. http://www.bitsum.com/files/wrt54gv5_img_001.zip. Currently only view and extract are supported. I might have the building part done in just a while, if I keep at it.

Keep in mind this is very early build. I probably shouldn't even be posting it since it might have bugs, and I'll probably have numerous new builds in the next while. That said, I'm not one for prudent behavior..

A binary for Win32 is included, along with C++ source code. I'll make sure it'll build under linux sooner or later.

@Brainslayer: Ok, cool.. thanks Wink. I'll be at that point as soon as I get this firmware image builder done. Hopefully I won't have much trouble with getting vmlinux to boot, thanks to those who have come before on other VxWorks based platforms.

@Supporters: Its very rewarding to know that this will be used, thanks Wink.

Here's a sample output of the tool (which i've named so poorly, i prefer just calling 'the tool' ;p):

Code:


 wrt54gv5_imgbuild - v0.01 alpha - Jun 21 2006
 by Jeremy Collake (jeremy at bitsum.com)
 Tool background: http://www.bitsum.com/openwiking/owbase/ow.asp?WRT54G5FE

 + Infile parameter wrt54gv5_v6_fw_1.00.9_US_code.bin
 + Extracting firmware

 Extracting firmware wrt54gv5_v6_fw_1.00.9_US_code.bin
 Firmare file size is 1551880 bytes

 Code pattern: 5VGW
 Build date: 05-12-06
 Vendor name: LINKSYS
 Device name: WRT54G
 Checksum: 0x611697AE (given)
 Checksum: 0x611697AE (calculated)
 Checksum CORRECT
   -
   File descriptor 0
   Type Id: 2
   Name: vxworks.bin
   Size: 1120664
   Writing file vxworks.bin
   -
   File descriptor 1
   Type Id: 3
   Name: igwhtm.dat
   Size: 183064
   Writing file igwhtm.dat
   -
   File descriptor 2
   Type Id: 6
   Name: langpak_en.dat
   Size: 29432
   Writing file langpak_en.dat
   -
   File descriptor 3
   Type Id: 11
   Name:
   Size: 28972
   -
   File descriptor 4
   Type Id: 12
   Name:
   Size: 31280
   -
   File descriptor 5
   Type Id: 13
   Name:
   Size: 33152
   -
   File descriptor 6
   Type Id: 14
   Name:
   Size: 31644
   -
   File descriptor 7
   Type Id: 15
   Name:
   Size: 30244

 __trailing__ data is 62916 bytes in length
   Writing file __trailing__

 Done!

wygamail
DD-WRT User


Joined: 06 Jun 2006
Posts: 132

PostPosted: Wed Jun 21, 2006 17:42    Post subject: Reply with quote
db90h wrote:
@Supporters: Its very rewarding to know that this will be used, thanks Wink.

I think there are many of us watching history be made! You're adding another generation of routers to the DD-WRT family. Twisted Evil

_________________
DD-WRT<--Have you contributed to DD-WRT yet?
Skywave
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 44

PostPosted: Wed Jun 21, 2006 18:07    Post subject: Reply with quote
This is so awesome!




Joined: 01 Jan 1970
Posts:

PostPosted: Wed Jun 21, 2006 19:40    Post subject: first flash of fresh built firmware ... Reply with quote
Sorry to keep posting updates, but I'm making progress rapidly.

I've got the firmware image build code done Wink. The tool, now v0.02 alpha, is available at the same URL I posted earlier.

I've been able to successfully flash and boot a firmware created with this version! I excluded unused files in the firmware image, along with the trailer, and all still went great. I'm still not sure why all those unnamed, undefined files are there, nor the web UI filesystem trailer..but they are quite unused and optional.

I also updated the extraction so that it does emit the unused files as well as the 3 primary ones.

I haven't even gotten to try anything else yet (like booting a tweaked vmlinux), this is 'hot off the presses'..

Ok, let me not be lazy, here's the URL again.

http://www.bitsum.com/files/wrt54gv5_img_001.zip

For the curious....

Code:

 wrt54gv5_imgbuild - v0.02 alpha - Jun 21 2006
 by Jeremy Collake (jeremy at bitsum.com)
 Tool background: http://www.bitsum.com/openwiking/owbase/ow.asp?WRT54G5FE

 + Outfile parameter -o
 + Infile parameter c:\linksys\out\igwhtm.dat
 + Infile parameter c:\linksys\out\langpak_en.dat
 + Infile parameter c:\linksys\out\vxworks.bin

 Building firmware image c:\linksys\my109.bin
 + Size of c:\linksys\out\igwhtm.dat is 183064 bytes.
 + Size of c:\linksys\out\langpak_en.dat is 29432 bytes.
 + Size of c:\linksys\out\vxworks.bin is 1120664 bytes.
 + Building header
 + Storing c:\linksys\out\igwhtm.dat
 + Stored with file type 3 (igwhtm.dat)
 + Storing c:\linksys\out\langpak_en.dat
 + Stored with file type 6 (langpak_en.dat)
 + Storing c:\linksys\out\vxworks.bin
 + Stored with file type 2 (vxworks.bin)
 + Checksum is AC98892F

 Done!


Flash serial output:
Code:

addr of pMPart.ucBuf 0x803839fe
++addr of pBuf 0x803839fe pCur 0x804c9529
++ulLen: 1334059 ContentLen 1334059
pReq->ucFileName index.tri
MATCHED..
GetMPartBoundary: pTemp 0x80584023
ucExt = bin
pBuf 792[0x80383af1]: 0x35 0x56 0x47 0x57
Code Pattern=5VGW
code pattern success
GetMPartBoundary: pTemp 0x80584023
FILENAME = /fl/igwhtm.dat uiLen[0] = 183064
File /fl/igwhtm.dat opened
pDatabuf[0x80383cf1]: 0x54 0x52 0x4f 0x43
lWriteCount = 102400  lRemain = 183064, lOffset =0
lWriteCount = 80664  lRemain = 80664, lOffset =102400
FILENAME = /fl/langpak_en uiLen[1] = 29432
File /fl/langpak_en opened
pDatabuf[0x803b0809]: 0x54 0x52 0x4f 0x43
lWriteCount = 29432  lRemain = 29432, lOffset =0
FILENAME = /fl/vxWorks.bin uiLen[2] = 1120664
File /fl/vxWorks.bin opened
pDatabuf[0x803b7b01]: 0x7f 0x45 0x4c 0x46
lWriteCount = 102400  lRemain = 1120664, lOffset =0
lWriteCount = 102400  lRemain = 1018264, lOffset =102400
lWriteCount = 102400  lRemain = 915864, lOffset =204800
lWriteCount = 102400  lRemain = 813464, lOffset =307200
lWriteCount = 102400  lRemain = 711064, lOffset =409600
lWriteCount = 102400  lRemain = 608664, lOffset =512000
lWriteCount = 102400  lRemain = 506264, lOffset =614400
lWriteCount = 102400  lRemain = 403864, lOffset =716800
lWriteCount = 102400  lRemain = 301464, lOffset =819200
lWriteCount = 102400  lRemain = 199064, lOffset =921600
lWriteCount = 96664  lRemain = 96664, lOffset =1024000
usBytesWritten = 145b2b, pReq->lInContentLen = 145b2b
 Up Load completed
strlen 40


Reboot.. and it boots Wink.
ro-maniak
DD-WRT User


Joined: 07 Jun 2006
Posts: 367

PostPosted: Wed Jun 21, 2006 19:56    Post subject: Reply with quote
Shocked
_________________
If you use DD-WRT, you HAVE to make a donation! See this topic too: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=228
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Wed Jun 21, 2006 20:51    Post subject: Reply with quote
okay lets start to write a overtaking image. mmh could someone provide a vxworks flash dump here? my one is already flashed and i lost the backup
_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Goto page Previous  1, 2, 3, 4 ... 27, 28, 29  Next Display posts from previous:    Page 3 of 29
Post new topic   Reply to topic    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