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!
/../Seriously, people happy with optware should consider donate to nslu2-linux. That's how we can pull resource together./../
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.
There are now two types of MyBook with different hardware and thus requiring different feeds.
For original MyBook (with front lights arranged into circle) the 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.
We now have 'mbwe-bluering' feed. If you already have optware installed and use the 'gumstix1151' feed, look here for instructions on "moving" to the new feed. Also consider installing ldso-runpath-enabled-firmware.
For new MyBook (with front lights arranged in line) the feed is 'cs05q1armel'.
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.
Installation of optware package manager on original MyBook:
If you're logged in as another user than root, 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/mbwe-bluering/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 -
echo 'src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/unstable' >> /opt/etc/ipkg.conf
There're additional steps required for configuring Optware on MyBook, due to uclibc configuration peculiarities (lack of LDSO_RUNPATH option).
(1) Create a ld.so.conf file in /etc/ with one line of code (/opt/lib)
echo "/opt/lib" >>/etc/ld.so.conf
(2) Run ldconfig
ldconfig
This works for any library path except /lib. It's good if you happen to have libraries scattered in different locations.
If you have allreay created /etc/ld.so.conf before, then you can edit it with vi or any other editor on your system and add the /opt/lib to the path. 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.
(3) configure the .bashrc file
In some cases steps 2 and 3 are not enough and you need add this to your /root/.bashrc file
export LD_LIBRARY_PATH=/opt/lib
You will probaly need to use the vi editor to do this1. And vi is a bit non-intuative. I would recommend googling for a vi tutorial.
vi /root/.bashrc
No need to do any of these additonal steps with the ldso-runpath-enabled-firmware
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/profile2 and add the following line to the bottom of each (you can also simply type this in the shell, if you don't want to permanently add /opt/bin to your path). In any case, if you don't ensure that /opt/bin is in your path before using ipkg to install packages, update-alternatives will not work for sym-linking newly installed executables in /opt/bin:
export PATH=$PATH:/opt/bin
You should also probably add . (ie current directory) to the path - this prevents you from having to prefix shell scripts with ./ before running them.
If you choose to do this then make the line you add to /root/.bashrc and /etc/profile
export PATH=$PATH:/opt/bin:.
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
A good first thing to instal would be an alternative text editor like Nano. So follow the instructions here to install nano and test that you have the optware feed up and running properly.
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>
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.
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




















