| The correct way to add packages to an OpenEmbedded Image |
|
Update 2007-10-14: use IMAGE_INSTALL in image recipe Update 2007-10-22: a few corrections, added full path for include and comments As more and more OpenMoko developers are coming on-line, it is becoming obvious that my previous post (http://bec-systems.com/web/content/view/59/9/) about adding packages to OpenEmbedded could use some improvements. This post suggested using the DISTRO_EXTRA_RDEPENDS variable, which was intended to only be used in distro.conf files. A better approach is to create a custom image recipe that includes the packages you want. This article covers how to create a custom image recipe. What are the problems with the DISTRO_EXTRA_RDEPENDS approach?As detailed by Marcin Juszkiewicz in his blog post "Why using of DISTRO/MACHINE variables in local.conf is wrong", and from discussions with OE developers, the following issues surfaced:
Creating a custom image fileCreating a custom image file is quite easy, and works much better than modifying DISTRO_EXTRA_RDEPENDS in your local.conf file. A custom image is created by simply copying or including an image file closest to what we want to use, and then adding additional packages to IMAGE_INSTALL variable. In the following example, we require angstrom-console-image.bb and extend it with a few lines: require packages/images/console-image.bb
Note the use of a full path specified in the require statement. This allows you to have your custom image recipe in a bbcollections overlay, and bitbake will still find the required recipe in the main OE tree. Thats it! With the many advantages to this method, there is no reason not to create your own image recipes -- it works better.
| |||||||
|
|||||||
| Last Updated ( Monday, 22 October 2007 ) | |||||||