Hardware Modifications


See also: http://www.sunspot.co.uk/Projects/sweexproject.htm

Cross Compile Environment

I’m using gentoo here. First we need to install crossdev:

emerge -av crossdev

If you want to use uclibc change your USE in /etc/make.conf:

USE="-nls -iconv -pregen -userlocales"

Now install the cross compile Environment with:

crossdev -C mipsel-gentoo-linux-uclibc
crossdev --target mipsel-gentoo-linux-uclibc

If an error happens execute the following:

source /etc/profile
crossdev mipsel-gentoo-linux-uclibc

Installed Prerequisites

Get packages for gentoo:

emerge -n \
  psyco \
  ccache \
  patch \
  make \
  sed \
  dev-lang/python \
  m4 \
  bison \
  cvs \
  openjade \
  quilt \
  sgmltools-lite \
  docbook-xml-dtd \
  docbook-dsssl-stylesheets \
  xmlto \
  docbook-sgml-utils \
  libpcre \
  boost \
  subversion \
  texi2html \

Prepare the Buildsystem

Install bitbake

Edit your .profiles:

export BBPATH=~/stuff/build:~/stuff/openembedded
export PATH=~/stuff/bitbake/bin:$PATH

Now prepare build system:

mkdir -p ~/stuff/build/conf
cd stuff

Download bitbake eg. bitbake-1.8.12.tar.gz . Or get it via svn:

svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake


Get it:

git clone git://git.openembedded.net/openembedded

To update it use:

cd ~/stuff/openembedded
git pull


cd ~/stuff
cp openembedded/conf/local.conf.sample build/conf/local.conf
vi build/conf/local.conf

Install Optware

svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
cd optware


Default Settings

To login to default WRT54GL software use no user and as password admin.

Set Boot Wait

To set boot_wait, login to the router and execute:

nvram set boot_wait=on
nvram commit

Upload Original Firmware

To switch back to the original firmware enable the boot_wait at first. The timing here is the critical step. Open one window and insert there as command:

ping -w 5 -t

When in boot_wait the IP is always

Now start a tftp program and insert:

Port: 69

When you get a ping reply use put to upload the firmware to the router. Now it takes some time to complete the flash operation, after it you can access the router via

Build the eibd Package

We use openwrt to do this, download it with:

svn co svn://svn.openwrt.org/openwrt/branches/backfire
cd backfire
./scripts/feeds update
./scripts/feeds install uclibcxx
./scripts/feeds install libxml2
./scripts/feeds install libusb
./scripts/feeds install argp-standalone

Now we setup the package:

mkdir -p package/bcusdk/patches
cd package/bcusdk

Copy here the Makefile.

Configure everthing we need:

cd -
make menuconfig

Go into menu Libraries and select the following packages by using the m key:


Go into the menu Network and select the package:


Exit and save

Now we compile everything:

make V=99

To compile later only a certain package use:

make package/bcusdk/{clean,compile} V=99