Wide Angle Edimax Camera

A 2006 summer project

Home Project Overview Controlling the Edimax IC-1000 Custom Firmware on the BR6104K Cross compilation Software Conclusions Links Contact

Creating a cross-compilation toolchain from Cygwin (a.k.a. i686-pc-cygwin) to a mipsel-linux platform such as the BR6104K/KP is fairly time consuming. Three separate methods were tried--making the toolchain from scratch with gcc/binutils/gdb, using crosstool, and using buildroot--and it turns out the easiest is using buildroot. A great instruction set for building the toolchain is available here. To the steps listed there, add the following recommendations:

Once compilation is done the complete toolchain to work with is available at $PREFIX/buildroot/build_mipsel/staging_dir/bin, as is a set of mipsel libraries to link to at $PREFIX/buildroot/build_mipsel/staging_dir/lib. Those libraries come in handy when building software for the router, as you can just transfer them to /lib and make an appropriate link (i.e. /lib/libpthread.so.0 -> /lib/libpthread-0.9.28.so).

With this working toolchain, it's fairly easy to compile and run custom applications on the router. The easiest way found to move files to the router and test them was with a fairly simple set of scripts that took advantage of wget. This required an HTTP server (FTP would work just as well), and an FTP client which supports file input (as lftp does). On the host side, one line like

lftp -f ftp_commands
should be added to the Makefile, where ftp_commands is a file containing all the commands necessary to upload your newly compiled program to your FTP/HTTP server. It probably looks something like this:
open server.com
user username password
cd remote_directory_to_put_file_in
put name_of_compiled_program
quit
On the router, meanwhile, it's trivial to create a script to get files from the server using wget, change their permissions, and execute them. For example:
#!/bin/sh
wget http://1.2.3.45/edimax_software/$1
chmod a+x $1
./$1
Then, compiling and running stuff on the router takes only two commands instead of twenty. Just 'make' on the host, and on the router run
$ ./retrieval-script newly-compiled-program
and everything should work fine.