User:Chadlester

From Gumstix User Wiki
Revision as of 23:13, 25 January 2010 by Chadlester (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to build a custom image

After you have successfully built a root file system by following the "Setting up a Build Environment Tutorial", you may be interested in building a custom image with just the packages that you need.

Perhaps you do not want to download and compile new images directly on your Overo board because you have not installed the developer tools to save space, or your board is not connected to the internet or does not have the ipkg package manager installed. This How-to explains an alternative - creating an open-embeded recipe for creating a custom image.

After you have already built omap3-console-image (this process took many hours and about 26 GB of disk space), you are ready to create your own bitbake image recipe.

From your overo-oe directory:

mkdir -p user.collection/recipes/images

Then, create a file such as omap3-your-name-console.bb file in user.collection/recipes/images<. You should start by including a base image and then adding package names to the IMAGE_INSTALL variable. Here is an example:

# Custom Omap3 Image with Python and the BlueZ library

require recipes/images/omap3-console-image.bb

IMAGE_INSTALL += " \
  python-modules \
  python-pybluez \
  "

export IMAGE_BASENAME = "omap3-mycustom-image"

NOTE: You can search through available packages at The Ångström Distribution. Packages do not necessarily have a 1:1 relationship with .bb files. If a BB files sets a PROVIDES variable, it defines a package of that name and multiple .bb files may both PROVIDES the same package name.

<p/> Now you are ready to build your image:

bitbake omap3-<i>your-name</i>-console

When the build finished, you should have your image available in the tmp/deploy/glibc/images/overo directory.