WRT54G - LinkSys - GNU/Linux

Well as all you know by now the WRT54G runs on GNU/Linux,
This makes it a very powerful device for setting up Wireless
Network, because you have the modifying power of GNU/Linux
on this Wireless Router.

WRT54G HW Specs::

	RAM:	2 x IC42S16400?, 64Mbit (4M X 16) RAM chips (16MB)
	Flash:	AMD AM29LV320DB-90EI, a 32Mbit chip (4MB)
	CPU:	Broadcom BCM4702KPB, with a 125MHz MIPS 
	Eth:    Two 10/100 Ethernet controllers 


The first thing you need to do is setup a cross-compiling
environment, so you can compile your appz to run on the WRT54G CPU. 
You well need to build this tool's in this order:

1)	binutils:
		./configure --target=mipsel-unknown-linux-gnu --prefix=/cross

		make all && make install

2)	glibc:
		./configure --target=mipsel-unknown-linux-gnu --prefix=/cross \
		--without-cvs --disable-sanity-checks --enable-hacker-mode

		make cross-compiling=yes install_root=/cross/mipsel prefix="" install-headers

3)	gcc-core:
		./configure --target=mipsel-unknown-linux-gnu --prefix=/cross \
		--with-local-prefix=/cross/mipsel --disable-multilib --with-newlib \
		--without-headers --disable-nls --enable-threads=no --enable-symvers=gnu \
		--enable-__cxa_atexit --enable-languages=c --disable-shared

		make all-gcc install-gcc

Now you have a gcc tool that compiles appz for mipsel, all you need to do
in just use the new gcc tool to compile the appz that you need to use on
the WRT54G, you can verify that the file was compiled for mipsel with the 
`file app` cmd and you well see:

app:  ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), for GNU/Linux 2.4.5, \
statically linked, not stripped


Well if all this is to HardCore for you, you can all ways use a very nice
tool that out the on the iNet called 
   'crosstool' = http://www.kegel.com/crosstool 
it make all this cross-compiling steps Automatic.


Once you have all the appz compiled, We need to get a Shell yes a SHELL on
the WRT54G. This can be done with the 
  'wrt54g_tools' = http://cj.colliertech.org/swn using the ./get_shell
now that your in you can verify that it's running GNU/Linux by your self, 
exec your favorite *NIX cmd's ;-)


Now just UpLoad your appz to the WRT54G with the 'wrt54g_tools' ./put_file app
All the stuff you UpLoad well be in the dir /tmp/incoming now go to your shell
and exec the app `cd /tmp/incoming; ./app &`



Note:: FS Mounted status:
	/	RO
	/tmp	RW
So appz that need RW access need you write on the /tmp dir..


Useful Links::
	http://www.seattlewireless.net/index.cgi/LinksysWrt54g
	http://www.seattlewireless.net/index.cgi/Wrt54gTools
	http://cj.colliertech.org/swn
	http://www.batbox.org/wrt54g-linux.html
	http://www.mysteryvortex.com/wrt54g
	http://www.village.org/villagers/imp/build.html
	http://www.kegel.com/crosstool


