Netgear WGT634U-based Network Stumbler

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 buildroot-ng svn tree. This description is based on the already obsolete r4902.

cd /src/openwrt
svn co https://svn.openwrt.org/openwrt/branches/buildroot-ng 
svn co https://svn.openwrt.org/openwrt/packages 
cd /src/openwrt/buildroot-ng/openwrt/package 
for i in $(find ../../../packages -type d | grep -v .svn | awk -F/ 'NF==6') ; do echo $i ; ln -s $i $(echo $i | awk -F/ '{ print $6 }') ; done
cd /src/openwrt/buildroot-ng/openwrt
make menuconfig
make

In the menuconfig, I set the Target System to (Broadcom BCM47xx/53xx [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 r4902 can be found [http://www.personaltelco.net/~russell/buildroot-ng/config-r4902 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/buildroot-ng/openwrt"

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/buildroot-ng/openwrt/bin/packages/ donk.personaltelco.net:public_html/buildroot-ng/r4902/

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.

REST OF INSTRUCTIONS, TO FOLLOW