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.
For MyBook, the closest feed is 'gumstix1151' (this feed was originally designed for the gumstix devices - if there is enough interest in optware from this community it will be renamed to match the compilation configuration rather than the single target device, or a new feed perfectly tuned for the MBWE will be created).
The main page for the feed is here: http://www.nslu2-linux.org/wiki/Optware/Gumstix . This page does not try to duplicate it, but provide the quick instructions on setting up the feed on MyBook. Please read the original page for more info.
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. If you're logged in as another user, use:
su -
Then, run following commands:
wget http://mybookworld.wikidot.com/local--files/optware/setup-optware.sh
sh setup-optware.sh
Alternatively, run following commands one by one:
feed=http://ipkg.nslu2-linux.org/feeds/optware/gumstix1151/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 -
sed -i -e 's|/stable|/unstable|' /opt/etc/ipkg.conf
There're additional steps required for MyBook, due to uclibc configuration peculiarities (lack of LDSO_RUNPATH option):
echo "/opt/lib" >>/etc/ld.so.conf
ldconfig
This works for any library path except /lib. It's good if you happen to have libraries scattered in different locations. If you created /etc/ld.so.conf before, you can edit it with vi or any other editor on your system. The file consists of 1 line, a colon deliminated list of locations to search for libraries on the computer. (The same format as the line for LD_LIBRARY_PATH, without the .:.) After editing ld.so.conf you simply need to run ldconfig again. If you want to see what libraries are available from your settings, run ldconfig -v and it will output every library it locates.
In some cases this does not work and you can add this to your .bashrc file
export LD_LIBRARY_PATH=/opt/lib
Then it's all fun:
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, sort 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>
Again, due to uclibc configuration peculiarities, you may need to run ldconfig after package installation, if it complains that it can't find shared libraries.
Applications will be installed to /opt/bin. To run applications in /opt/bin/ without having to type "/opt/bin/<whatever>" every time, edit your /root/.bashrc and /etc/profile and add the following line to the bottom of each:
export PATH=$PATH:/opt/bin
If you install something that uses initialization and termination scripts (/opt/etc/init.d/*), you should add the file to /etc/init.d to run them on startup. Name the file S90optware
#!/bin/sh
if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
[ -x $f ] && $f start
done
fi
Then make it executable:
chmod +x /etc/init.d/S90optware

























