Posted: Wed Jul 26, 2006 0:13 Post subject: Optware (aditional installable packages for DD-WRT)
With latest DD-WRT v23 SP2 it is possible to install Optware packages from NSLU2-Linux project. This port of Optware is tailored for DD-WRT and extends router to full feature linux if enough storrage is provided for packages (jffs, mmc, USB?).
The main feature of this packages is that it installs all required files under /opt with 400+ ported applications. With buildroot toolchain is added also system library indenpendence. This means that packages now depends od /opt/lib/uClibc.so and dynamic loader also in /opt/lib with separate /opt/etc/ld-opt.so.conf for custom .so cache. Applications are built with wchar and locale support which makes uClibc library somewhat greater than other uClibc packages, but still far smaller than glibc based aplications.
After many rip & build cycles, buildroot uClibc toolchain is finished and ready for testing on mipsel arch for NSLU2 Optware build.
It provides:
1. uclibc-0.9.28 target for base instalation into /opt/lib
2. target toolchain 3.4.6 for packages cross compilation w/ ccache
3. native toolchain for compilation on embeded system w/ ccache
4. uClibc++ 0.2.0 for C++ packages
I have prepared uClibc buildroot toolchain to compile within optware. It creates both host and target toolchain along with uClibc 0.9.28. Target uClibc is installed into /opt/lib along with loader ld-uClibc.so
Quick checkout:
Code:
svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
cd optware/trunk
export OPTWARE_TARGET=dd-wrt
make buildroot-unpack
make buildroot
make buildroot-ipk
make uclibc-ipk
PATH for the host toolchain is optware/trunk/toolchain/buildroot/build_mipsel/staging_dir/bin
I have tested many packages on stock WRT54GS with /jffs,/opt and confirmed that they works as expected. Native compilation verified. It works on DD-WRT v.23 SP2 dated from 24/7/2006
buildroot.mk also works with libuclibc++.mk with minor modifications for proper toolchain patch. All 800 packages are available for testing at
I'm giving this a go atm and am having a bit of trouble. Firstly I needed to fiddle around with the wiki instructions because it didn't like the mount or something that are there so i needed to make a file with "vi /jffs/opt/ect/ipkg.conf" and then name the enviromental varible accordingly. Then while installing uClibc lib I got a few random errors about files that couldn't be installed. then I went on and installed nylon + its dependancies. But nylon isn't working at all no matter what I do i can't get it to run.
Note that the Firmware Modification Kit will be very useful here for those who want to embed built packages into firmwares without rebuilding DD-WRT. You'll be able to install more this way since squashfs-lzma compression is superior to JFFS2.
Perhaps we can even develop a way to install .pkg's directly to the extracted filesystem (or maybe this is already doable one way or another) so that they don't have to be manually imported to the extracted filesystem. <<<--- UPDATE: I'm going to start researching this immediately.
Thanks oleo, this is very useful, and perfectly timed!
Another option if you have a mass storage and some ram, is to install a mipsel debian image and run chrooted inside.
I did it in my asus wl500dg+openwrt (32mb ram+usb hard drive).
You have a full real debian! compatible with all packages repositories already compiled and working!
What I did was to compile mldonkey inside my router. Don't even need cross compilation. Cross compilation was not possible with mldonkey because it is written in ocaml.
All compilation process went just fine!
mldonkey worked great inside my router! (a little bit slow, but functionnal)
I'm giving this a go atm and am having a bit of trouble. Firstly I needed to fiddle around with the wiki instructions because it didn't like the mount or something that are there so i needed to make a file with "vi /jffs/opt/ect/ipkg.conf" and then name the enviromental varible accordingly. Then while installing uClibc lib I got a few random errors about files that couldn't be installed. then I went on and installed nylon + its dependancies. But nylon isn't working at all no matter what I do i can't get it to run.
You should hane writable /opt partition. Forget about editing /jffs/opt/etc. Use /opt/etc/ instead. (although is the same).
The main feature of this /opt Ware is that it runs in /opt only! All applications have /opt/lib for dynamic loader set up. Aditionaly there is /opt/etc/ld-opt.so.conf and /opt/etc/ld-opt.so.cache
uClibc should be installed into /opt/lib and not elsewhere. Please note that uClibc is not binary compatible and that you cannot mix applications built with different uClibcs.
Follow the wiki and bind jffs/opt to /opt or remount jffs to /opt.
There is also full feature ipkg_xxx.ipk package available for installation into /opt/bin.
If using this /opt/bin/ipkg then setting environment variable is no longer needed as /bin/ipk is obsoleted for optware.
Just upgrade from V23 SP1 to SP2 (standard) in my WRT54GS and want to try Optware. By following the instructions in Wiki but still failed, see below. Any idea?
=============
~ # cat /opt/etc/ipkg.conf
src unslung http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
dest root /
~ # set | grep -i IPKG_CONF_DIR
IPKG_CONF_DIR='/opt/etc'
~ # ipkg update
~ # ipkg list
ERROR: File not found: ///usr/lib/ipkg/lists/unslung
You probably want to run `ipkg update'
~ #
=============
From log it looks like there is a problem with storing packages list. Note that you are using dd-wrt provided ipkg.sh which stores list of available packages in different location and not under /opt. If you have enough space I suggest that you install http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg_0.99-163-2_mipsel.ipk after installng uClibc package and use it as full feature package maintainer.
I've revised commands in the wiki page and I don't see any errors. Can you output all commands you've done from beginning? Please erase /jffs and follow the instructions.
If not, please provide output of the mount and df commands.
PS. You can use http://pastebin.ca/ for pasting your output and provide it here as a link!