5.13.5.3.2. Using IPK

The application for performing runtime package management of IPK packages on the target is called opkg.

In order to inform opkg of the package databases you want to use, simply create one or more *.conf files in the /etc/opkg directory on the target. The opkg application uses them to find its available package databases. As an example, suppose you configured your HTTP server on your machine named www.mysite.com to serve files from a BOARD-dir directory under its document-root. In this case, you might create a configuration file on the target called /etc/opkg/base-feeds.conf that contains:

     src/gz all http://www.mysite.com/BOARD-dir/all
     src/gz armv7a http://www.mysite.com/BOARD-dir/armv7a
     src/gz beaglebone http://www.mysite.com/BOARD-dir/beaglebone
                        

As a way of making it easier to generate and make these IPK configuration files available on your target, simply define FEED_DEPLOYDIR_BASE_URI to point to your server and the location within the document-root which contains the databases. For example: if you are serving your packages over HTTP, your server's IP address is 192.168.7.1, and your databases are located in a directory called BOARD-dir underneath your HTTP server's document-root, you need to set FEED_DEPLOYDIR_BASE_URI to http://192.168.7.1/BOARD-dir and a set of configuration files will be generated for you in your target to work with this feed.

On the target machine, fetch (or refresh) the repository information using this command:

     # opkg update
                        

You can now use the opkg list and opkg install commands to find and install packages from the repositories.