Netgear WGT634U & Debian Linux
It's a cheap Wi-Fi router off ebay that has an atherors mini-PCI card and USB 2.0 support built-in. Can't complain for 20 quid. My plan is to re-engineer it into a HDSPA to WLAN router, using a USB HDSPA modem.
↑Hardware
Serial Ports (J6/7)
The device has 2 3.3v serial ports available, one with a header soldered one without. The one with the header is configured as the console by default. Many ways to attach these to a PC, I got a FTDI TTL-232R-3V3 USB and a PC 3-pin fan extension cable, and re-arranged the pins of the connectors thus:- Netgear (Pin 1 closest to network ports) Fan Extension FTDI Cable 1 (VCC) (n/c) (n/c) 2 (TXD) Yellow Yellow (RXD) 3 (RXD) Red Orange (TXD) 4 (GND) Black Black (GND) To remove a pin, gently lift the sprung lug behind the exposed metal section and pull it out.
GPIO Pins
There are GPIO pins on TP1,TP2,TP3,TP4,TP5, as well as the reset button and yellow of power LED. More info here.
Other Connectors
2 connectors remain; an incomplete JTAG header & a USB 1.1 (possibly host, possibly switchable---see openwrt tree).
↑Bootloader setup
The CFE bootloader is a pretty full-featured environment that allows you to boot from either a TFTP server or a flash partition (for this device at least). Hold down Ctrl-C to break the default startup, and you should get dropped to the "CFE>" prompt. There is full help for all commands, so easy to find your way around.
Note the router only has one network card, and a 6 port switch. At this point the switch is in it's initial configuration, and only packets on the VLAN port will get through to "eth0"---more on this later. Here's some example commands:
# Show available devices (i.e. flash partitions, network card, serial ports) show devices # Configure the network card via DHCP ifconfig eth0 -auto # Boot elf image the OS flash partition boot -elf flash0.os: # Boot gzipped elf image via. TFTP boot -z -elf -tftp (server):netgear.elf.gz
There are also some environment options that are handy for us, STARTUP and LINUX_CMDLINE (nb: netgear's firmware uses kernel_args, mainline kernels will ignore this).
↑Kernel configuration
Cross-compilation under Debian
To install a cross-compiler, see instructions here. Once you have one for MIPS, the following will create a kernel and bung modules onto an NFS root:
alias cross-make='make ARCH=mips CROSS_COMPILE=mipsel-linux-gnu-' cross-make menuconfig cross-make -j5 gzip -9c vmlinux > /srv/tftp/kernel.elf.gz INSTALL_MOD_PATH=/srv/netgear_nfsroot cross-make modules_install
NFS Root Filesystem
If you have a host serving an NFS root filesystem as per instructions here, you can netboot from this to speed tinkering. Set the kernel commandline in the prom thus:
setenv -p LINUX_CMDLINE "console=ttyS1,115200 root=/dev/nfs rw ip=dhcp"
↑Network configuration
↑Link-o-rama
- Debian on the WGT634U
- OpenWRT page on the WGT634U
- Another howto
- Adding a SD/MMC port with GPIO pins
- OpenWRT's patches for a brcm47xx
- 1-wire temperature sensor via. serial port
- Hacks to original firmware
Get at the logfile on your devicePut SSH on device without changing firmwareA CRC generator that works with the above