| Adding packages to OpenEmbedded bootstrap-image images |
|
|
|
NOTICE: the information in this article is obsolete and is no longer correct -- see http://bec-systems.com/web/content/view/79/9/ instead. When using OpenEmbedded to build a Linux distribution for a new machine, there is often a need to add a few packages to images created. In this article, we look at how OpenEmbedded generates images, how to add packages to a standard image, and a few tips to make this work well. When bringing up a Linux distribution on an embedded device using OpenEmbedded, you typically start by building a standard distribution and image. The generic distribution and the bootstrap-image bitbake target are commonly used. The following assumes you are using a machine and distro configuration that uses the new task-base task provider. When you type "bitbake bootstrap-image", the following steps occur:
Package: task-base There are several variables that can be defined in the conf files to force additional packages to be built and included in a rootfs image: MACHINE_EXTRA_RDEPENDS, and DISTRO_EXTRA_RDEPENDS. We will now go through an example of adding gkt+ to a bootstrap-image build. The first step is to add the following line to your local.conf file: DISTRO_EXTRA_RDEPENDS = "gtk+" At this point you must manually regenerate the task-base ipk file as the system has no way of knowing the contents for task-base have changed as the task-base bb file did not actually change. The best way to do this is to run "bitbake task-base -crebuild". Do not run "bitbake task-base -cclean" as this seems to start cleaning packages that are already built. At this point, if you look at the control file in the task-base ipk file, it will look like: Package: task-base Note the Depends line in the control file now includes "gtk+". The images build now include gtk+ and a number of gtk dependencies like libcairo2, pango, glib, etc. As with many development tasks, it always helps to understand how things work. Adding packages to an existing build is easy provided you understand a few the nuances such as rebuilding the task-base package when modifying the MACHINE_EXTRA_RDEPENDS or DISTRO_EXTRA_RDEPENDS variables. | ||||||||||
|
||||||||||
| Last Updated ( Friday, 14 September 2007 ) | ||||||||||
| < Prev | Next > |
|---|




