Page tags

Add a new page

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!

/../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, as well as the newest MyBookLive.

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 best optware experience.

For new MyBook (with front lights arranged in line) the feed is 'cs05q1armel'.

For the newest MyBookLive the feed is 'ds101g'.

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.

Unless you use ldso-runpath-enabled-firmware, 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 allredy 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.

User binaries will be installed to /opt/bin and admin binaries in /opt/sbin. To run applications in /opt/bin and /opt/sbin without having to type # /opt/bin/<whatever> or # /opt/sbin/<whatever> every time, either execute this command every time you login:

# export PATH=$PATH:/opt/bin:/opt/sbin

or add the above command to the bottom of /root/.bashrc and /etc/profile. An easy way to do that is by issuing these commands:

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

You may also add . (i.e. current directory) to the path - this prevents you from having to prefix shell scripts in the current directory with "./" to run them.
If you choose to do this then make the line you add to /root/.bashrc and /etc/profile

export PATH=$PATH:/opt/bin::/opt/sbin:.

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 install 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, Bluerings owners, unless they use ldso-runpath-enabled-firmware, may need to run # ldconfig after package installation, if it complains that it can't find shared libraries, and possibly update /etc/ld.so.conf to add required libs (e.g., add line '/opt/lib/sasl2' for packages relying on libgsasl to work):

Also note that without LDSO_RUNPATH support, some packages (like dialog) won't work even after doing so, because of conflicting stock and optware shared libraries (like ncurses).

Launching Optware programs on startup

If you install something that uses initialization and termination scripts (/opt/etc/init.d/*), you should also do this to run them on startup and terminate on halt:
1. Download the script that will do all the work:

2. If you upgrade your firmware, all data stored on the root filesystem will be lost, so it is a good idea to move optware to the data partition. Also, you probably should back up the optware init script: