D-Link DIR-632
Supported Versions
This is a work in progress, check the forum page https://forum.openwrt.org/viewtopic.php?pid=198927 "D-LINK DIR-632, wireless router with 8 ports switch!" for updates.
An 'alpha' image built from trunk is now available, you may try this AT YOU OWN RISK! It may brick your device, so only try this if you have an understanding of how to recover again.
Build Instructions
See interim instructions at DIR-321-A1 build instructions
Hardware Highlights
| HW Rev | CPU | Ram | Flash | Network | Gigabit | USB | Serial | JTag |
|---|---|---|---|---|---|---|---|---|
| A1 | Atheros AR7241/AR7242@400MHz (MIPS32 24Kc) | 32MB | 8MB | No | Yes | Yes | Yes | Yes |
The following chips were present on my board:
25L6445 M2I-10G 3H417200 256B page 4kb sector 32/64k block NOR flash with 4k OTP bits and BP0-BP3 write protect MP1482DS B5827929 MPSB29 (switching power supply) RTL8309G (Ethernet Switch)
I didnt desolder the shields on mine, so I assume theym are the same as what the forum photos and kernel dmesg suggests: AR7242-AH1A SOC AR9287 wireless LAN PSC A3S56D40ETP 256Mbit DDR
This device incorporates an RTL8309G 8Port Switch:
Enviroment
bootargs= console=ttyS0,115200 root=31:03 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(nvram),1984k(linux),5568k(rootfs),64k(MAC),192k(LP),64k(ART) mem=32M
bootcmd=bootm 0x9f050000
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.0.1
serverip=192.168.0.2
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
Environment size: 369/65532 bytes
Serial Port
MTD
Bootloader version (printenv in serial console):
256k - u-boot
64k - nvram
1984k - linux
5568k - rootfs
64k - MAC
192k - LP
64k - ART
Original firmware version:
Creating 9 MTD partitions on "ar7240-nor0":
| Address | MTD part. |
|---|---|
| 0x00000000-0x00040000 | "u-boot" |
| 0x00040000-0x00050000 | "nvram" |
| 0x00050000-0x00240000 | "linux" |
| 0x00240000-0x007b0000 | "rootfs" |
| 0x007b0000-0x007c0000 | "MAC" |
| 0x007c0000-0x007f0000 | "LP" |
| 0x007f0000-0x00800000 | "ART" |
| 0x00050000-0x007b0000 | "Linux" |
| 0x00000000-0x00800000 | "ALL" |
# cat /proc/mtd
| dev: | size | erasesize | name |
|---|---|---|---|
| mtd0: | 00040000 | 00010000 | "u-boot" |
| mtd1: | 00010000 | 00010000 | "nvram" |
| mtd2: | 001f0000 | 00010000 | "linux" |
| mtd3: | 00570000 | 00010000 | "rootfs" |
| mtd4: | 00010000 | 00010000 | "MAC" |
| mtd5: | 00030000 | 00010000 | "LP" |
| mtd6: | 00010000 | 00010000 | "ART" |
| mtd7: | 00760000 | 00010000 | "Linux" |
| mtd8: | 00800000 | 00010000 | "ALL" |
DD-wrt version:
| Address | MTD part. |
|---|---|
| 0x0 - 0x50000 | RedBoot |
| 0x50000 - 0x7e0000 | linux |
| 0x156000 - 0x720000 | rootfs |
| 0x720000 - 0x7e0000 | dd-wrt |
| 0x7e0000 - 0x7f0000 | nvram |
| 0x7f0000 - 0x800000 | board_config |
| 0x0 - 0x800000 | full_flash |
| 0x0 - 0x50000 | full_boot |
cat /proc/mtd
| MTD part. | Size | EraseSize | Name |
|---|---|---|---|
| mtd0 | 0x50000 | 0x10000 | RedBoot |
| mtd1 | 0x790000 | 0x10000 | linux |
| mtd2 | 0x5ca000 | 0x10000 | rootfs |
| mtd3 | 0xc0000 | 0x10000 | dd-wrt |
| mtd4 | 0x10000 | 0x10000 | nvram |
| mtd5 | 0x10000 | 0x10000 | board_config |
| mtd6 | 0x800000 | 0x10000 | full_flash |
| mtd7 | 0x50000 | 0x10000 | full_boot |
Stock firmware bootlog
U-Boot 1.1.4 (Sep 21 2010 - 12:20:01)
AP101 (ar7242 - Virian) U-boot
DRAM:
sri
ar7240_ddr_initial_config(133): virian ddr1 init
#### TAP VALUE 1 = 0x2, 2 = 0x2 [0xffffffff: 0xffffffff]
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 235k for U-Boot at: 81fc4000
Reserving 192k for malloc() at: 81f94000
Reserving 44 Bytes for Board Info at: 81f93fd4
Reserving 36 Bytes for Global Data at: 81f93fb0
Reserving 128k for boot params() at: 81f73fb0
Stack Pointer at: 81f73f98
Now running in RAM - U-Boot at: 81fc4000
id read 0x100000ff
sector count = 128
Flash: 8 MB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: ag7240_enet_initialize...
Fetching MAC Address from 0x81fecb90
Fetching MAC Address from 0x81fecb90
: cfg1 0xf cfg2 0x7114
eth0: b8:a3:86:4e:7c:f2
eth0 up
: cfg1 0xf cfg2 0x7114
eth1: b8:a3:86:4e:7c:f2
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Hit any key to stop autoboot: 1 0
## Booting image at 9f050000 ...
Image Name: Linux Kernel Image
Created: 2011-04-19 12:18:21 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1047598 Bytes = 1023 kB
Load Address: 80002000
Entry Point: 802e8000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 802e8000) ...
## Giving linux memsize in bytes, 33554432
Starting kernel ...
Booting AR7240(Python)...
Linux version 2.6.15--LSDK-7.3.0.260 (root@localhost.localdomain) (gcc version 3.4.4) #1 Tue Apr 19 20:12:10 CST 2011
flash_size passed from bootloader = 8
arg 1: console=ttyS0,115200
arg 2: root=31:03
arg 3: rootfstype=squashfs
arg 4: init=/sbin/init
arg 5: mtdparts=ar7240-nor0:256k(u-boot),64k(nvram),1984k(linux),5568k(rootfs),64k(MAC),192k(LP),64k(ART)
arg 6: mem=32M
CPU revision is: 00019374
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=31:03 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(nvram),1984k(linux),5568k(rootfs),64k(MAC),192k(LP),64k(ART) mem=32M
Primary instruction cache 64kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
PID hash table entries: 256 (order: 8, 4096 bytes)
Using 200.000 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 28896k/32768k available (2442k kernel code, 3856k reserved, 521k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction... available.
NET: Registered protocol family 16
PCI init:ar7240_pcibios_init
SCSI subsystem initialized
Returning IRQ 48
TC classifier action (bugs to netdev@vger.kernel.org cc hadi@cyberus.ca)
AR7240 GPIOC major 0
squashfs: version 3.1 (2006/08/19) Phillip Lougher
Initializing Cryptographic API
io scheduler noop registered
io scheduler deadline registered
HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096
N_HDLC line discipline registered.
Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x0 (irq = 19) is a 16550A
RAMDISK driver initialized: 1 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.7.12
7 cmdlinepart partitions found on MTD device ar7240-nor0
Creating 7 MTD partitions on "ar7240-nor0":
0x00000000-0x00040000 : "u-boot"
0x00040000-0x00050000 : "nvram"
0x00050000-0x00240000 : "linux"
0x00240000-0x007b0000 : "rootfs"
0x007b0000-0x007c0000 : "MAC"
0x007c0000-0x007f0000 : "LP"
0x007f0000-0x00800000 : "ART"
GACT probability on
Mirror/redirect action on
Simple TC action Loaded
netem: version 1.1
u32 classifier
Perfomance counters on
input device check on
Actions configured
Netfilter messages via NETLINK v0.30.
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
ip_conntrack version 2.4 (256 buckets, 2048 max) - 232 bytes per conntrack
ip_ct_h323: init success
ip_conntrack_rtsp v0.6.21 loading
ip_nat_rtsp v0.6.21 loading
ip_conntrack_pptp version 3.1 loaded
ip_nat_pptp version 3.0 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
ipt_recent v0.3.1: Stephen Frost
Unbricking Procedure
This procedure is similar to the DIR-620 and other related devices.
Unbricking Procedure for DIR632 - web browser
- Connect to LAN1 and set your PCs IP address to 192.168.0.2
- Hold down the reset button and power cycle the device
- Keep holding the button until the Power/Status LED flashes yellow
- Browse to http://192.168.0.1
- Choose and Upload the firmware - either factory firmware, or another suitable uboot image such as DD-WRT, or soon, OpenWRT (trunk)
- When this is working you will get a "Device is upgrading the firmware" page which cycles through from 0 to 100%
I had some troubles getting to this point: Firefox 15.0.1 on Linux amd64, hung at the 'Upload' screen. Chrome 21 on Linux amd64 actually uploaded, (as verified by wireshark) and then hung. I could only succesfully complete this procedure using Windows XP with IE8 (!) My experience contradicts what is documented on the DD-WRT website, which states that Firefox only works.
Unbricking Procedure for DIR632 - u-boot
This should be possible using TFTP, as desribed elsewhere: http://wiki.openwrt.org/doc/howto/generic.flashing.tftp However, I could not get it to work at all, the device would not properly respond to ARP and may have other issues - see post on the forum.
It is possible to load and run an INITRD kernel over the serial port using kermit, so with a bit more work this procedure can probably be extended to writing an image into the flash.
(Note: using Debian Linux, use `apt-get install ckermit` and run `kermit` )
- Connect a TTL serial device (e.g. 3v3 TTL-USB adaptor, etc) to the pins shown in the above images
- Power cycle the router
- Using kermit, press enter to get to the u-boot menu when prompted. If needed configure to connect using 115200-8n1
- At the prompt, type the following, this will wait for a file to be loaded to memory address 0x81000000 (16mb through the RAM)
loadb
- At this point, hit CTRL+/ (Control and Forward Slash) then hit C this will cause kermit to drop to a prompt
- At the kermit prompt, type the following, where send «some-image-file» is the filename of the u-boot image. This works best if you run kermit from the same directory as the image.
send «some-image-file»
- This will cause kermit to upload the file. This will take several minutes.
- When kermit returns to the prompt, hit C
- At the uboot prompt, type
bootm
- This will run the uimage from the default load address of 0x81000000
GPIOs
| GPIO | AR7242 Pin | Default Purpose | |
|---|---|---|---|
| 0 | 14 | LED WPS (blue) | |
| 1 | 12? | LED STATUS (bicolour: orange) | |
| 6 | 81 | LED STATUS (bicolour: green) | JTAG |
| 7 | 82 | LED WAN (bicolour: orange) | JTAG |
| 8 | 85 | BUTTON Reset | |
| 9 | 86 | UART 3v3Rx from PC | |
| 10 | 87 | UART 3v3Tx to PC | |
| 11 | 88 | LED USB (green) | |
| 12 | 89 | BUTTON WPS | |
| 13 | 90 | Test point TP3 | |
| 14 | 91 | Test point TP4 | |
| 15 | 92 | Test point TP5 | |
| 17 | ?? | LED WAN (bicolour: green) |
Other Info
- D-Link website: D-Link DIR-632
- Stock firmware: ftp://files.dlink.com.au/products/dir-632/REV_A/Firmware
- GPL sources: ftp://gpl.dlink.com/DIR-632
- DD-WRT debricking instructions: http://www.dd-wrt.com/wiki/index.php/D-Link_DIR-632#Out-of-the-box_factory_firmware_upgrade
toh/d-link/dir-632.txt · Last modified: 2013/04/30 13:11 by oldcomputerjunk


