D-Link DSL-G604T ADSL2/2+ Wireless Router
Works reliably for basic DSL, Ethernet operations. Wireless it still under development, cant vouch for how well that works currently.
|Architecture: MIPS (little endian)|
|System-On-Chip: TI AR7 TNETD7300|
|CPU Speed: 150 Mhz|
|Flash Size: 4 MiB|
|RAM Size: 16 MiB|
|Wireless: TI ACX111|
|ADSL: TI AR7, ADSL2/2+ (up to 24Mbit/s)|
For the sake of keeping up to date use trunk, these settings where verified as working at revision 22452. Changes from the defaults are marked Disable that generated a working cutdown image.
Why disable wireless? Maybe enable mac80211-based wireless instead?
Target System (TI AR7) Target Profile (Annex-A DSL firmware (default)) Target Images ---> JFFS2 **Disable** Base system ---> wireless-tools **Disable** Note: Need to disable kmod-acx to turn this off. Kernel modules ---> Network Devices ---> kmod-sangam-atm-annex-a ---> Configuration ---> Firmware ---> D7.05.01.00 Kernel modules ---> Wireless Drivers ---> kmod-acx **Disable**
NOTE: For some ISPs, you may need to select "Annex-B DSL firmware" and "kmod-sangam-atm-annex-b" instead of their annex-A equivalents.
For installs from OEM Firmware does the checksum from the tichsum utility need to be added for adam2 to boot it? Doesn't need once OpenWRT is on as ADAM2 gets patched. You can find some information about the tichsum utility here http://www.seattlewireless.net/DlinkDslG604t
Before flashing OpenWRT to the device the FTP server ADAM2 starts needs to be found, if the stock firmware is loaded on this model the steps are as such;
Connect to router with telnet, Username and password is admin (try root/admin if it does not work) Query the ADAM2 enviroment to discover the IP with;
# cat /proc/ticfg/env | grep my_ipaddress
If the IP is set it will be shown like this:
If it's not displayed, or to change it, it can be set with the command:
# echo "my_ipaddress 192.168.1.1" > /proc/sys/dev/adam2/environment
Set a static IP so a connection to the router can be established, and apply power to the router. There will be a few second window where a connection can established with FTP, Username and Password is adam2
The flash on the G604T device is divided into partitions. The offsets need to be changed to start OpenWrt on the device.
The original firmware uses these partitions (in physical order):
|mtd0||0x90091000||0x903f0000||3452 KiB||Root filesystem|
and another "virtual" partition" that covers both mtd1 and mtd0
|mtd4||0x90010000||0x903f0000||3968 KiB||Kernel + FS|
The mtd2 partition contains the bootloader. Never touch it. If the bootloader gets corrupted, the router won't boot anymore (in that case reprogramming the entire flash with the JTAG should bring it back to life). Just to be safe, during normal usage the kernel won't allow you to overwrite it even if explicitly requested.
The mtd3 partition contains both the bootloader configuration and the original firmware settings. OpenWrt will ignore anything written in here. Don't touch it as well, or ADAM2 might get confused and unable to boot anymore.
To run OpenWRT of this device the partition layout need to be modified as follows (changes are in bold), the offset from the image generation section is needed here.
Partitions: (in physical ordering):
|Bootloader name||Kernel name||Start||End||Use|
|mtd1||linux||0x90010000||0x903f0000||Linux kernel (only the start address is used)|
|mtd0||rootfs||0x90010000||0x903f0000||Read-only squashfs + jffs2 filesystem (only the end address is used)|
|mtd3||config||0x903f0000||0x90400000||Original firmware configuration|
the "virtual" partition remains unchanged as
|Bootloader name||Kernel name||Start||End||Use|
|mtd4||rootfs_data||0x90010000||0x903f0000||Kernel + FS|
To be more precise, the kernel, once booted, will map another "virtual" partiton as /dev/mtdblock4 that will point to the newly created jffs2 partition located inside mtd0. Just ignore it for this discussion.
Note that the end of mtd1 and the start of mtd0 are dummy addresses; OpenWrt auto-detects the boundary between the kernel and the file system. The extra addresses are only used by firmwares based on 2.4.x kernels.
The commands needed to make and check the above adjustments are;
quote "SETENV mtd1,0x90010000,0x903f0000" quote "GETENV mtd1"
Check each partition before continuing, error here will likely brick the device.
When this has been completed the image can be flashed to the Kernel+FS partition mtd4
quote "MEDIA FLSH" binary debug hash put "openwrt-ar7-squashfs.bin" "openwrt-ar7-squashfs.bin mtd4" quote REBOOT quit
The router will reboot and set itself up, do not remove power as this could break it. Leave it until the status light has a steady heartbeat, then it is safe to power down.
To bring the WAN up, add the settings to the /etc/config/network file
config interface wan option ifname ppp0 option unit 0 option proto pppoa option encaps vc option vpi 0 # get your actual VPI and VCI from your ISP option vci 38 option username (your username here) option password (your password here)
If your ISP uses pppoe instead, the setup will looks like this:
config atm-bridge option unit 0 option encaps llc option vpi 0 # get these from your ISP option vci 38 config interface wan option ifname nas0 option proto pppoe option username (your username here) option password (your password here)
As of r22728 the switch can be configured in this device, the drivers are included by default as is swconfig. The switch is a 5 port switch only 0-3 are available as ethernet ports and 4 is the CPU port. Documentation on configuring the switch can be found here
inbox/dsl-g604t.txt · Last modified: 2014/02/13 07:38 (external edit)