Edimax

Hardware Modifications

JP2pins

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 \
  pysqlite

Prepare the Buildsystem

Install bitbake

Edit your .profiles:

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

Now prepare build system:

cd
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

OpenEmbedded

Get it:

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

To update it use:

cd ~/stuff/openembedded
git pull

Configuration

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
make

WRT54gl

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
reboot

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 192.168.1.1

When in boot_wait the IP is always 192.168.1.1.

Now start a tftp program and insert:

Host: 192.168.1.1
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 http://192.168.1.1

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:

argp-standalone
libusb
libxml2
pthsem
uclibcxx

Go into the menu Network and select the package:

eibd

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