Netgear WGT634U-based Network Stumbler

The Jason McArthur Version

As early as the summer or early autumn of 2005, JasonMcArthur began working on a Netgear WGT634U-based stumbler device, based on OpenWgt and a 2.4.20 kernel.

The Russell Senior Version

In early March of 2006, RussellSenior began sponging off of JasonMcArthur's work and assistance. Eventually, because he didn't have access to JasonMcArthur's build environment, and because he was seeing some problems that he didn't understand and needed to fiddle with, he began diverging from JasonMcArthur's image, and began playing with an OpenWrt-derived stumbler instead, principally because he understood how to build packages using its buildroot environment.

This is a description of how RussellSenior goes about building a stumbler device based on the NetgearWgt643u and OpenWrt. This is experimental software. Follow these instructions at your own risk.

Hardware

Building OpenWrt Software

Currently, I am using the kamikaze svn tree. This description is based on the already obsolete r5952.

cd /src/openwrt
svn co https://svn.openwrt.org/openwrt/trunk
svn co https://svn.openwrt.org/openwrt/packages 
cd /src/openwrt/trunk
ln -s /src_archive/openwrt/dl .  # an existing archive of downloaded packages
cd /src/openwrt/trunk/package 
for i in $(find ../../packages -type d | grep -v .svn | awk -F/ 'NF==5') ; do echo $i ; ln -s $i $(echo $i | awk -F/ '{ print $5 }') ; done

# add package infrastructure for an older version of gpsd (v2.9)
mkdir /src/openwrt/trunk/package/gpsd-old
cd /src/openwrt/trunk/package/gpsd-old
wget http://www.personaltelco.net/~russell/gpsd-old-makefile
mv gpsd-old-makefile Makefile

cd /src/openwrt/trunk
make menuconfig
make

In the menuconfig, I set the Target System to (Broadcom BCM947xx/953xx [2.6]), and for kicks I also "Select all packages by default" and enable a few things (which I am currently forgetting) that don't automatically get configured in. Often, you will find packages that won't build for some reason or another. In those cases, open a ticket, deconfigure the package in menuconfig and try again. Run make alone to see abbreviated messages, or make V=99 to get lots of information. The configuration I used for r5952 can be found [http://www.personaltelco.net/~russell/kamikaze/config-r5952 here].

When the build is complete, the resulting files will be found thusly:

Additionally, as of my recent attempts, the Packages file that is needed for the ipkg utility to function properly later on is apparently not constructed (maybe I missed it), but I developed a script that does it for me:

TOPDIR="/src/openwrt/trunk"

CTRLDIR="${TOPDIR}/build_mipsel"
PKGSDIR="${TOPDIR}/bin/packages"
PKGSFIL="${PKGSDIR}/Packages"

rm -f ${PKGSFIL}

for i in $(find ${CTRLDIR} -name 'control' | grep CONTROL) ; 
  do echo $i ; 
  PACKAGE=$(grep ^Package: $i | cut -d' ' -f2) ; 
  VERSION=$(grep ^Version: $i | cut -d' ' -f2) ; 
  ARCH=$(grep ^Architecture: $i | cut -d' ' -f2) ; 
  FILENAME="${PACKAGE}_${VERSION}_${ARCH}.ipk" ;
  IPKG="${PKGSDIR}/${FILENAME}"
  if [ -f ${IPKG} ] ; then
      SIZE=$(wc -c ${IPKG} | cut -d' ' -f1) ; 
      MD5=$(md5sum ${IPKG} | cut -d' ' -f1) ; 
      cat $i >> ${PKGSFIL} ; 
      echo "Filename: ${FILENAME}" >> ${PKGSFIL} ; 
      echo "Size: ${SIZE}" >> ${PKGSFIL} ; 
      echo "MD5Sum: ${MD5}" >> ${PKGSFIL} ; 
      echo "" >> ${PKGSFIL} ; 
  else
      echo "${FILENAME} NOT FOUND!"
  fi
done

Now, you can copy the ipkg repository somewhere wget'able, e.g.:

rsync -v -a -H /src/openwrt/trunk/bin/packages/ donk.personaltelco.net:public_html/buildroot-ng/r5952/

Checking out the WGT634U

If this is a new device, it is probably a good idea to check it out on the stock firmware first to make sure it functions.

The Flash Environment

There is more than one way to flash the newly-built image onto the WGT634U.

CFE TFTP Flash-From-Console Method

This is the method I tend to use. For this, you will need a TFTP server and a serial console cable. On my debian/unstable box, I use the tftpd-hpa package.

Configuration

Adding Sound

For this, you need a usb-audio device and some additional software: