?

Log in

No account? Create an account
Building Programs for the DLink DSL-300T - Nick [entries|archive|friends|userinfo]
Nick

[ website | gagravarr.org ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Building Programs for the DLink DSL-300T [Oct. 23rd, 2005|03:54 pm]
Nick
My current ADSL router is a nifty little box from DLink, the DSL-300T. One of the nice things about it is that it's Linux powered.

I've done some reading up on it in the past, with a view to getting it to support IPv6. Armed with this page (on the DSL-302T), I was able to telnet in and have a play with it. Then, armed with this page (on the DSL-604T), I felt I might have a chance at recompiling some stuff.

As it turns out, the router runs on a MIPS cpu, and is little endian (LSB). I guessed it would be big endian (MSB), so spent quite some time pissing about failing to get stuff to work :(

Because it's little endian, you generally want the mipsel, rather than the mips packages. I got a uclibc cross compiler from here, having found lots of handy links on the MIPS Linux site.

Armed with the mipsel crosstool, I've been able to build a hello-world application, and run it successfully on the router. (I've been using the built in wget, rather than the built in tftp client, because I find the busybox tftp syntax a bit wierd. Use this doc as a guide to it.).

A good way to check if your application is compiled right is to use file on it. You should get "ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), dynamically linked (uses shared libs), stripped" (though static is fine).

Now, I just have to get a full toolchain installed, and try to recompile the kernel for IPv6 support. Maybe that'll have to wait for next week though!
linkReply

Comments:
From: (Anonymous)
2005-10-26 05:36 pm (UTC)

OpenWRT

http://wiki.openwrt.org/AR7Port is worth a look; I'd be using it for my Netgear if the Netgear firmware didn't checksum the entire flash. :( -- Noodles
(Reply) (Thread)
From: gagravarr
2005-10-26 06:10 pm (UTC)

Re: OpenWRT

Looks very promising, I'll have to have a play at some point.

DLink ship a utility for doing the checksum on firmware images as part of their GPL source package. Don't netgear?
(Reply) (Parent) (Thread)
From: (Anonymous)
2005-10-27 08:57 am (UTC)

Re: OpenWRT

I understand it's a checksum of the entire flash on *every* boot, so you can boot once but as soon as you modify the filesystem it no longer checksums properly. I've got an OpenEmbedded image half working now, so am going down that route instead. -- Noodles
(Reply) (Parent) (Thread)