From: http://mybookworld.wikidot.com/optware
Optware is software package repositories (aka feeds) maintained by NSLU2 project. They offer access to hundreds of precompiled packages with the latest and greatest software, all at your fingertips, just a command and few seconds away!
Using feeds is the recommended way to install and maintain software on your device - this way, you can easily get security and bugfixes, uninstall, and query software database - in other words, get all the service which is core feature of any Linux distribution. Note: it's highly recommended to use only feeds to install the software, and not mix feeds and manual installs from the source. This is the same rule of thumb as for any other Linux distribution. Note2: This may be impractical, as not all software is available in feeds; but at least try to stick to library packages from feeds, if you don't want to create shlib hell for yourself.
NSLU2 project is not responsible for any damage that optware causes.
Setup
To start using feed, you need first to install package manager. Optware uses ipkg, which is standard package manager for many embedded distributions. Following commands manually bootstrap ipkg from the feed. They must be run as root.
The feeds available are:
- cs05q1armel glibc 2.3.4, gcc 3.4.3, libstdc++ 6.0.3
- cs05q3armel glibc 2.3.6, gcc 3.4.4, libstdc++ 6.0.3
- cs06q3armel glibc 2.3.6, gcc 4.1.2, libstdc++ 6.0.8 (not a full feed)
- cs08q1armel glibc 2.5, gcc 4.2.3, libstdc++ 6.0.9
but our firmware has:
glibc 2.7, gcc 4.3.2, libstdc++ 6.0.10
It does'nt exist a matching feed, the best match is cs08q1armel, but never run ldconfig or you will mess up the system.
feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
ipk_name=$(wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}')
wget $feed/$ipk_name
tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable" > /opt/etc/ipkg/armel-feed.conf
Update local feed lists - you need to issue this from time to time to get package updates:
/opt/bin/ipkg update
See what's available, short descriptions included:
/opt/bin/ipkg list
See what's already installed:
/opt/bin/ipkg list_installed
Install or upgrade packages:
/opt/bin/ipkg install <foo> <bar>
This will download packages from the net with all the required dependencies. Note: there's the same command for installing and upgrading to a new version of package.
Deinstall packages:
/opt/bin/ipkg remove <foo> <bar>
To automatically run the scripts in /opt/etc/init.d directory create a file in /opt/etc/init.d named start_init_scripts.sh and containing the following:
#!/bin/sh
rm /opt/var/log/boot
if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
#[ -x $f ] && $f start
$f start | tee -a /opt/var/log/boot
done
fi
#this will start the original thumbnails
/usr/local/thumbnails/thumbnails &
Make it executable
chmod +x /opt/etc/init.d/start_init_scripts.sh
modify the file /mnt/apps/usr/local/cfg/sohoProcs.xml, the files is in a read only partition, to access it run these commands:
mknod -m0660 /dev/loop3 b 7 3
chown root.disk /dev/loop3
mkdir /tmp/apps
mount -o loop /boot/images/apps /tmp/apps
make a backup copy
cp /tmp/apps/usr/local/cfg/sohoProcs.xml /tmp/apps/usr/local/cfg/sohoProcs.xml.bk
modify the thumbnails part to point to our script script
...
<Program Name="thumbnails" Path="/opt/etc/init.d/start_init_scripts.sh">
</Program>
...
unmount it
umount /tmp/apps
rm /dev/loop3