OpenWrt Forum Archive

Topic: D-Link G604T

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi smile

For some reason using nbds package version 2536 for the ar7, When flashing to mtd4 I can't get the unit to boot up, I am assuming at the moment it is because the packages we build lack the 8 byte (16 Hex) checksum.

I have managed to get nbds ar7 firmware onto the unit by ftp to adam2 and by not using the "quote MEDIA FLSH" (therefore writing to SDRAM?) (do not quote REBOOT just exit and unit will boot)

I am then able to telnet into the unit

=== IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.01 (2005.11.19-17:52+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M

         bleeding edge, r2536 wink
root@OpenWrt:/#


=== IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
------------------------------------------

Connecting to 192.168.1.5[192.168.1.5]:6621
kernel.bin           100% |*****************************|   466 KB    00:00 ETA
root@OpenWrt:/# mtd write kernel.bin mtd0
Unlocking mtd0 ...
Writing from kernel.bin to mtd0 ...  [e]Erasing mtd failed: mtd0
root@OpenWrt:/# mtd write kernel.bin mtd1
Unlocking mtd1 ...
Writing from kernel.bin to mtd1 ...  [w]

Ok so writing to mtd0 fails (why? bug in mtd? or problem with dlink?)
Writing to mtd1 works but is actually useless since we don't boot from it

Writing to mtd4 .... oh dear oh dear why did I do that smile
It erases the entire mtd first (why? is this really necessary, why not just erase up to our filesize or use the map that system detects to find mtd2/adam2 and protect it and mtd3/config?)

Anyways, unit doesn't boot mtd2/3 destroyed smile

FYI DLINK G604T REV B3 map

setenv mtd0 0x90091000,0x903f0000
setenv mtd1 0x90010090,0x90090000
setenv mtd2 0x90000000,0x90010000
setenv mtd3 0x903f0000,0x90400000
setenv mtd4 0x90010000,0x903f0000

put DLinkAU_DSL-G604T_singleimage_kernel_fs_V2.00B02.AU_20050914 mtd4
put config.DLinkAU_DSL-G604T.img mtd3

My suggestion is that if we are unable to write mtd0 (but mtd4 seems fine? bug?) maybe we can make a dlink firmware with adam2/config in the correct position so when (idiots like me) flash it we don't destroy our router? smile

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

p.s. if anyone has a jtag and wants to post me it please email me

or if you know where I can get one in australia please post

Thanks smile

(Last edited by Z3r0 on 22 Mar 2006, 12:23)

lo Z3r0

Are you sure that partition sets are good?

As far as i've understand, mtd2 contains ADAM2 (so, mtd2 0x90000000,0x90010000 is fine), but your mtd4 uses wrong setting. Why it should go from 0x90010000 to 0x903f0000 when mtd1 begins at 0x90010090?
isn't mtd4 a partition for kernel+fs toghether? so shouldn't it go from 0x90010090 to 0x903f000?

btw, here's my experience: http://forum.openwrt.org/viewtopic.php?id=5141

To my opinion your mtd's are screwed up.

Try this

mtd0                  0x900d0000,0x903f0000
mtd1                  0x90010000,0x900d0000
mtd2                  0x90000000,0x90010000
mtd3                  0x903f0000,0x90400000
mtd4                  0x90010000,0x903f0000

As long as you have access to adam2...you can recover your dlink.

Anyway....the kernel always goes into mt1 and the filesystem in mtd0.

Don't touch mtd2=adam2.

Other mtd's are unit specific, but most of the time.

Mtd3 = config.xml + some unit specific information.

For openwrt you need to put the firmware in mtd4

put "openwrtXXX.bin" "openwrt.bin mtd4"

right....partition are model specific...
mtd2 (64k) contains ADAM2, the bootloader...so don't touch that!
mtd3 (64k) contains "config.xml + some unit specific information"
mtd0 (variable) contains the fs
mtd1 (variable) contains kernel

ADAM2 after its timeout (usually 5 seconds) call a "go mtd1_address", so the kernel is executed.
Many devices doesn't has a mtd4 (kernel+fs) partition so you have to create it (as described in InstallingAR7 wiki page).

btw, i've installed a self-compiled AR7 openwrt...the problem is that this device has a single eth port and i can't ping anything. from serial console the eth0 device is up with an address...maybe i'm doing something wrong in compilation or configuration. I've also noted that there's no /etc/init.d/S40network....maybe that's the problem.

working on it

mrmr

(Last edited by mrmr on 16 Apr 2006, 20:08)

Hi, about the eth0 problem take a look at this thread:

http://forum.openwrt.org/viewtopic.php?id=5206&p=2

As Poldy pointed out what's the problem and a first fix for it..

I patched the kernel but had no time (yet) to test it..

Regards
Luca

ohoh Luca
Cleaning/Compiling right now...
Later i'll post something here, saying if the "hack" works with my 502t.
Right now, interface just goes up with an ip, but no arp...

mrmr

OLE'....before...

Using the MAC with external PHY
Cpmac driver is allocating buffer memory at init time.
Using the MAC with external PHY
Cpmac driver Disable TX complete interrupt setting threshold to 20.

...after...

Using the MAC with internal PHY
Cpmac driver is allocating buffer memory at init time.
Using the MAC with internal PHY
Cpmac driver Disable TX complete interrupt setting threshold to 20.

and now...

root@OpenWrt:/# ping 192.168.10.35
PING 192.168.10.35 (192.168.10.35): 56 data bytes
84 bytes from 192.168.10.35: icmp_seq=0 ttl=128 time=2.1 ms

I've to say thanks to spallered for its links to the other forum posts and to poldy for its "patch/hack"
...now i can test the DSL chip smile

thank you again

mrmr

(Last edited by mrmr on 19 Apr 2006, 01:11)

The discussion might have continued from here.