Patching IPv6 into DIR 615 builds [was: Unpacking LZMA fw]

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Goto page Previous  1, 2
Author Message
Valthos
DD-WRT Novice


Joined: 28 Jul 2010
Posts: 49

PostPosted: Wed Aug 18, 2010 0:29    Post subject: Reply with quote
remove the share wireless addons.

Hotspot.asp

i never use the waste of space Smile
Sponsor
st4ck
DD-WRT Novice


Joined: 16 Aug 2010
Posts: 21
Location: Italy

PostPosted: Thu Aug 19, 2010 20:50    Post subject: Reply with quote
Opened new topic here: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=475163 Smile
omencathay
DD-WRT Novice


Joined: 31 Mar 2010
Posts: 11

PostPosted: Wed Aug 25, 2010 10:41    Post subject: Reply with quote
st4ck wrote:
Yeah! I'm very happy :)

After several times and tries I've succeeded to repack a new filesystem of dir 300b1 and upload it in emergency room! All work perfectly!!

This is the method:
Requirements:
1- have squashfs-root directory in your current dir
2- have untrx
3- have mkshashfs-lzma (from the firmware-mod-kit-read-only in the dir squashfs-3.0-lzma-damn-small-varian)
4- have v2image from dir300b toolkit (downloadable from dlink website)

I use the original firmware, untrx it and replace in the segment1 the 2nd part (where is the squashfs)

1- untrx original_firmware_for_dir300b1.bin
2- mkshashfs-lzma squashfs-root/ squashfs_new.img -lc 1 -lp 2 -pb 2 -all-root -noappend
3- dd if=squashfs_new.img of=segment1 bs=16 seek=54272
4- v2image -v -i segment1 -o dir300b1-new-fw.bin -d /dev/mtdblock/2 -s wrgn23_dlwbr_dir300b

Now we can upgrade the firmware from the emergency room of dir 300b1 :)

PS: Valthos now I'm editing the latest firmware, when the release is good, i will share with you :)

PPS: Here there are all my scripts and tools that i've used Smile http://www.megaupload.com/?d=4KWZ5347 / mirror: http://www.megafileupload.com/en/file/260170/tools-st4ck-tgz.html


great job!!!

what's mean "-d /dev/mtdblock/2 -s wrgn23_dlwbr_dir300b
"?
st4ck
DD-WRT Novice


Joined: 16 Aug 2010
Posts: 21
Location: Italy

PostPosted: Wed Aug 25, 2010 11:18    Post subject: Reply with quote
The option "-d /dev/mtdblock/2 -s wrgn23_dlwbr_dir300b" come from DIR300B1 SDK (downloadable from dlink website -> ftp://ftp.dlink.com/GPL/DIR-300_revB/dir300b.v2.02.source.tar.gz) to sign the firware. Try to google "v2image /dev/mtdblock/2", you will see a lot of scripts & infos.

PS: your firmware for wps is ready :)

archimedes wrote:
Another important thing is signing: As you can see in the script, you need a signature to sign the image with. For DIR 615 Rev D this is "wrgn22_dlwbr_dir615", or if your not on DIR615, it is {$BOARD_NAME}_{$BRAND_NAME}_{$MODEL_NAME} - the variables can be found in configs/defconfig/{$BOARD_NAME}_{$BRAND_NAME}_{$MODEL_NAME}.config Very Happy
omencathay
DD-WRT Novice


Joined: 31 Mar 2010
Posts: 11

PostPosted: Thu Aug 26, 2010 9:49    Post subject: Reply with quote
st4ck wrote:
Yeah! I'm very happy :)

3- dd if=squashfs_new.img of=segment1 bs=16 seek=54272


how about the tow params (bs,seek) for dir600?
how could I find it?
I try to the same params for dir600,but it promoted 'bad head trx'
Thks
st4ck
DD-WRT Novice


Joined: 16 Aug 2010
Posts: 21
Location: Italy

PostPosted: Thu Aug 26, 2010 10:38    Post subject: Reply with quote
Simply use an hex editor (I use ghex on gentoo). Open segment1 and search the squashfs header: in hex 68 73 71 74 (string hsqt). In my case the start address of the header is 0xD4000 = 868352 in decimal.
For dd command the bs (block size) chose is 16. Now calc number of blocks we need to skip using seek.

seek = 868352 / 16 blocks = 54272

==> dd if=squashfs_new.img of=segment1 bs=16 seek=54272

Bye Wink
omencathay
DD-WRT Novice


Joined: 31 Mar 2010
Posts: 11

PostPosted: Thu Aug 26, 2010 11:06    Post subject: Reply with quote
st4ck wrote:
Simply use an hex editor (I use ghex on gentoo). Open segment1 and search the squashfs header: in hex 68 73 71 74 (string hsqt). In my case the start address of the header is 0xD4000 = 868352 in decimal.
For dd command the bs (block size) chose is 16. Now calc number of blocks we need to skip using seek.

seek = 868352 / 16 blocks = 54272

==> dd if=squashfs_new.img of=segment1 bs=16 seek=54272

Bye Wink


Thks a lot.
I found the same address from dir600b-revb-ddwrt-webflash.bin from DD-WRT router database.

dir600b-revb-ddwrt-webflash.bin can flash the router.
but I do it order by your step ,the new image could not flash ,I'd download the dir600 tools from dlink ftp site.
I'll try it tomorrow.
st4ck
DD-WRT Novice


Joined: 16 Aug 2010
Posts: 21
Location: Italy

PostPosted: Thu Aug 26, 2010 11:08    Post subject: Reply with quote
Ok, download the dir toolkit and use v2image to sign your firmware. After you can flash only from emergency room, bye
omencathay
DD-WRT Novice


Joined: 31 Mar 2010
Posts: 11

PostPosted: Fri Aug 27, 2010 2:22    Post subject: Reply with quote
st4ck wrote:
Ok, download the dir toolkit and use v2image to sign your firmware. After you can flash only from emergency room, bye


I made the new image order by the steps above.
but update failed by the web page. then I scp the image and run "write dir600.bin linux" in terminal ,that promoted "Bad trx header"
st4ck
DD-WRT Novice


Joined: 16 Aug 2010
Posts: 21
Location: Italy

PostPosted: Fri Aug 27, 2010 6:27    Post subject: Reply with quote
Code:
After you can flash only from emergency room, bye

You can upload only from emergency room! Go in the redboot mode and upload your image.

PS: If your router is dir600b the sign command is: v2image -v -i segment1 -o dir600b-new-fw.bin -s wrgn23_dlwbr_dir600b -d "/dev/mtdblock/2"
omencathay
DD-WRT Novice


Joined: 31 Mar 2010
Posts: 11

PostPosted: Fri Aug 27, 2010 6:34    Post subject: Reply with quote
st4ck wrote:
Code:
After you can flash only from emergency room, bye

You can upload only from emergency room! Go in the redboot mode and upload your image.

PS: If your router is dir600b the sign command is: v2image -v -i segment1 -o dir600b-new-fw.bin -s wrgn23_dlwbr_dir600b -d "/dev/mtdblock/2"


thanks ,I just compared the dlink-dir600-factory-webflash.bin and the new image made by myself in GHex.the two begin address are same.So I see how to flash it.

Thank you very much.
DevZone
DD-WRT Novice


Joined: 14 Sep 2012
Posts: 13

PostPosted: Sat Oct 13, 2012 18:05    Post subject: Reply with quote
need for DIR300b1
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink 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 cannot attach files in this forum
You cannot download files in this forum