How to install additional software into your OE generated rootfs

There are few methods of adding software into rootfs. You can copy binaries but you can also go better way by using packages. I know that this can be strange experience for some people (which are used to systems which generates only binaries) but in OpenEmbedded world effect of software build is set of packages which can be used to generate final rootfs image.

First thing to check is which package contains needed binary. It is easier if package name has binary name (like ‘alsa-utils-aplay’ which contains ‘aplay’ command) but it is not always so easy. Hopefully OpenEmbedded generates ‘Packages.filelist’ file in ‘tmp/deploy/glibc/ipk/’ subdirectories. If they are empty (common situation) they need to be recreated.

To generate them user needs to remove ‘Packages*’ files from all directories and call bitbake package-index command. When command finishes ‘Packages.filelist’ files should contain all informations — for example ‘update-inetd’ command line looks like this

update-inetd netbase:armv6:./usr/sbin/update-inetd

The format is simple:

BINARY-NAME PACKAGE:ARCH:PATH-TO-BINARY

So when package name is known we need to transfer package into device. This part depends on device so I will not elaborate on it.

Installing package is simple: opkg install package.ipk. But copying single packages can result in frustration called ‘dependency hell’ (package require another package which require another etc). To check which packages will be required the easiest way is dpkg-deb -I package.ipk (as IPK packages are compatible with DEBs).

Better way is to use repositories of packages — command simplify to opkg update;opkg install package (users of desktop Linux distributions can compare it with apt-get or yum). If you built Ångström distribution then your rootfs already contains all informations needed to use packages from repositories. For other distros user needs to define them by hand.

Repository informations are stored in ‘/etc/opkg/*-feed.conf’ files. Format is simple:

src/gz NAME URL

Example:

src/gz base http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/base

Instead of ‘src/gz’ also ‘src’ can be used — it will fetch uncompressed ‘Packages’ file instead of gzipped one.

When repositories are defined installing software is easy: opkg update;opkg install package will fetch package and all it’s dependencies and then will install them into rootfs.

I hope that this will simplify that task for some people.

3 thoughts on “How to install additional software into your OE generated rootfs

  1. mck

    If on host side I do opkg-deb -I …alsa-utils-aplay_1.0.17-r0.1_armv5te.ipk I get only the first dependency which is Depends: libasound2 (>= 1.0.17), libc6 (>= 2.6.1), libgcc1 (>= 4.2.4) but does not show all the dependency tree, so I’m still at hell Do you have any hint to solve this pain?

    1. girish2k44

      Hi Marcin, i am working on mini2440 i got success in building x11-gpe-image with 7″ display now i want to add gnash in my filesystem how i can do that how to make image.bb file so it will compile all dependency and make rootfs

      Regards Girish

Comments are closed.

No Trackbacks.