After flashed DD-WRT or Tomato, the router normally has some space left over. Like RT-N16, there is 23~24MB left after flashed Tomato. We can use that space to install optware without adding additional USB drive.
What is optware?
Optware is a distribution of packages that are suitable for installation within small embedded systems, just like the routers on which TomatoUSB runs. It was originally created as a way to distribute additional software on the Linksys NSLU2 NAS system, but it now supports many different systems (including all the ones based on OpenWRT/DD-WRT, like TomatoUSB).
Optware uses the ipkg package manager. It is equivalent to the package manager tools usually available on desktop Linux systems such as apt, yum or yast. Optware packages are distributed as .ipk files (so standard .deb or .rpm files cannot be used).
First, we need to turn on jffs.
In Tomato, enter the web interface, go to "Administrator", then "jffs", check "Enable". Type in the code below into the "Execute When Mounted" box.
mount -o bind /jffs /opt
After reboot Tomato will mount jffs partion to opt.
DD-WRT's JFFS is just as easy as Tomato so we are not going to repeat the procedure.
Now we can install optware.
For DDWRT, connect the router through SSH and run the command below:
cd /tmp wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install-ddwrt.sh chmod 755 optware-install-ddwrt.sh sh optware-install-ddwrt.sh
For Tomato, run the command below:
cd /tmp wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh chmod 755 optware-install.sh sh optware-install.sh
After couple minute you will see the system return the message telling you the optware installation is completed.
Configuring ipkg-opt Successfully terminated.
After that you can do whatever you want using optware, eg: install busybox...