As some of you may know, the Linux image you create after following the BSP Build Guide is not the only result of the process.
It also builds a lot of additional software packages, only some of which are making it into the image. You can install those additional ones using Yocto's package management feature (which is being added by default) and the respective tool called opkg.
The idea is pretty much the same as with those customary package managers you may be using today, like yum, zypper, apt-get and so on. You need to have a package manager tool, repository of packages and a way to access it over the network using e.g. HTTP protocol.
The repository is created by Yocto during BSP build, the package manager is in your Linux image by default and here's the instruction on how to enable the HTTP sharing of the repo and what settings you need on the Galileo.
This is for Apache, you'll need to adjust accordingly for your favorite HTTP server. I also assume you have network connectivity on your board and can access the console either via serial port or SSH. For instructions on enabling those please see other threads - search is your friend, we have excellent guides in this community already.
1) Create a VirtualHost for your package web site, use the below config excerpt as a template. There may be a lot of details, depending on your distro and preferences, but this should give you an idea (if it doesn't - please ask).
NameVirtualHost *:80
<Directory "/srv/www/htdocs">
Options FollowSymLinks
AllowOverride None
</Directory>
<VirtualHost *:80>
DocumentRoot "/srv/www/htdocs/pkgrepo.my.local"
ServerName pkgrepo.my.local
UseCanonicalName off
<Directory "/srv/www/htdocs/pkgrepo.my.local">
Options +Indexes
AllowOverride none
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Here /srv/www/htdocs/pkgrepo.my.local is a symlink to the directory where Yocto puts the packages and package indexes. On my machine the full path to it is: /home/dev/yocto/meta-clanton_v0.8.0/yocto_build/tmp/deploy/ipk/
That is, I've unpacked the BSP into /home/dev/yocto/meta-clanton_v0.8.0 and yocto_build is the build directory created by default.
Make sure Apache user, typically www, has read access to that ipk directory. Generally you can just run
chmod -R o+rx /home/dev/yocto/meta-clanton_v0.8.0
to get that.
2) Reload Apache to have it pick up the config (/etc/init.d/apache2 reload, or whatever your distro's equivalent is)
3) In the output of the below command you should see the newly created VirtualHost and you should be able to access it using the browser and see the listing of the directories beneath that ipk one. Here I have only one VirtualHost:
lnx:~ # apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server pkgrepo.my.local (/etc/apache2/vhosts.d/pkgrepo.my.local.conf:11)
port 80 namevhost pkgrepo.my.local (/etc/apache2/vhosts.d/pkgrepo.my.local.conf:11)
Syntax OK
3) On Galileo (and you should be running off of the SD card, not from the SPI "read-only" image) add the address and the name of the package repo server into /etc/hosts, so that we can use a name instead of the plain IP address (the line in bold is what you need to add):
root@clanton:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.10.100 pkgrepo.my.local pkgrepo
4) Add the repository information into /etc/opkg/base-feeds.conf. By default you get three directories under ipk, each needs a separate line:
root@clanton:~# cat /etc/opkg/base-feeds.conf
src/gz all http://pkgrepo.my.local/all
src/gz clanton http://pkgrepo.my.local/clanton
src/gz i586 http://pkgrepo.my.local/i586
5) Refresh the package index on the Galileo and you're good to go. Here's the expected output:
root@clanton:~# opkg update
Downloading http://pkgrepo.my.local/all/Packages.gz.
Inflating http://pkgrepo.my.local/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/all.
Downloading http://pkgrepo.my.local/clanton/Packages.gz.
Inflating http://pkgrepo.my.local/clanton/Packages.gz.
Updated list of available packages in /var/lib/opkg/clanton.
Downloading http://pkgrepo.my.local/i586/Packages.gz.
Inflating http://pkgrepo.my.local/i586/Packages.gz.
Updated list of available packages in /var/lib/opkg/i586.
On the basic level opkg is pretty similar to apt-get, you can search, list installed and remote repo packages, etc. Here's a nice guide to opkg: http://wiki.openwrt.org/doc/techref/opkg
The above is based on the Yocto's manual, you can find some additional details here: http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#using-runtime-package-management
If you have any questions to the above - feel free to ask in this thread and your feedback is more than welcome.