DD-WRT:Optware-ByHand

Preparing /jffs for /opt
First step is to prepare /opt mount point for Optware and create ipkg.conf file for packages download ~ # mkdir /jffs/opt ~ # mkdir /jffs/tmp ~ # mkdir /jffs/tmp/ipkg ~ # mount -o bind /jffs/opt /opt ~ # mkdir /opt/etc ~ # vi /opt/etc/ipkg.conf Edit and insert the following content src optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable dest root /jffs Now we will point /bin/ipkg script to this config with setting environment variable ~ # export IPKG_CONF_DIR=/opt/etc This is enough to retrieve list of available packages with ~ # ipkg update Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages ... Connecting to ipkg.nslu2-linux.org[140.211.166.82]:80 Packages            100% |**********************************************|   259 KB 00:00:00 ETA Done. Updated list of available packages in //jffs/usr/lib/ipkg/lists/optware

If nothing is reported after /bin/ipkg update then probably /etc/resolv.conf does not contain proper name server address like: search local.lan nameserver 192.168.1.1

Manual installing package ipkg-opt will automatically install also uclibc-opt package. ~ # /bin/ipkg -d root install ipkg-opt For some reason, uclibc-opt was installed, but it kept saying it was a dependent package. The following worked for me: ~ # /bin/ipkg -force-depends install ipkg-opt

Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk ... Connecting to ipkg.nslu2-linux.org[140.211.166.82]:80 uclibc-opt_0.9.28-12 100% |******************************************|  832 kb 00:00:00 ETA Done. Unpacking uclibc-opt...Done. Configuring uclibc-opt...Updating /opt/etc/ld.so.cache Done. Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-9_ mipsel.ipk ... Connecting to ipkg.nslu2-linux.org[140.211.166.82]:80 ipkg-opt_0.99.163-9_ 100% |******************************************| 75896   00:00:00 ETA Done. Unpacking ipkg-opt...Done. Configuring ipkg-opt...Configuration file `/opt/etc/ipkg.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D    : show the differences between the versions (if diff is installed) The default action is to keep your current version. *** ipkg.conf (Y/I/N/O/D) [default=N] ? y Done.

Note that we answered 'y' to install maintainer /opt/etc/ipkg.conf with the following contents: src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable dest /opt/ /
 * 1) Uncomment the following line for native packages feed (if any)
 * 2) src/gz native http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/native/stable

If anything goes wrong when installing ipkg-opt then I recommend erasing /jffs/jffs and /jffs/usr directories with rm -rf /jffs/jffs rm -rf /jffs/usr and repeat /bin/ipkg update and /bin/ipkg install ipkg-opt

Installing ipkg-opt package will maintain all packages installed in /opt directory along with its /opt/lib/ipkg directory where /opt/bin/ipkg maintains its status files. There is also /opt/bin/ipkg-opt to save us from confusion. To update list of available packages issue ~ # /opt/bin/ipkg-opt update Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz  Updated list of available packages in /opt/lib/ipkg/lists/optware Successfully terminated.

List of available packages is provided with ~ # /opt/bin/ipkg-opt list

List of installed packages ~ # /opt/bin/ipkg-opt list_installed Successfully terminated. will not show ipkg-opt and uclibc-opt as status file is now located in /opt/lib/ipkg/status and not /jffs/jffs/usr/lib/ipkg/status. To correct this issue we will reinstall the package itself with ~ # /opt/bin/ipkg-opt install ipkg-opt Installing ipkg-opt (0.99.163-9) to /opt/... Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk package uclibc-opt suggests installing ipkg-opt Installing uclibc-opt (0.9.28-12) to /opt/... Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk Configuring ipkg-opt Configuring uclibc-opt Updating /opt/etc/ld.so.cache Successfully terminated.

With clean Optware install two packages should be listed ~ # /opt/bin/ipkg list_installed ipkg-opt - 0.99.163-9 - The Itsy Package Manager uclibc-opt - 0.9.28-12 - micro C library for embedded Linux systems Successfully terminated.

From now on no files outside /opt tree will be required for maintaining Optware packages. I even recommend erasing spurious files with Exporting IPKG_CONF_DIR is not neeeded any more.
 * 1) rm -rf /jffs/jffs /jffs/usr