TipsAndTricks/UnconventionalImages

From Yocto Project
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Images don't have to contain a full root file system and kernel, as they're constructed from packages they can contain anything in a package.

For example, if you were publishing the API documentation for your SDK online somewhere then generating a tarball of all the API docs would be a good start. This would be an image which just contained the -doc packages, and nothing else:

# Use PACKAGE_INSTALL directly to bypass the convenience layers and specify exactly what packages should be installed
PACKAGE_INSTALL = "gtk+3-doc glib-2.0-doc"
# Don't want any image features such as a package manager
IMAGE_FEATURES = ""
# Don't want any locales to be installed
IMAGE_LINGUAS = ""
# Just generate a tarball
IMAGE_FSTYPES = "tar.gz"
# Don't generate the ldconfig cache
LDCONFIGDEPEND = ""
# This is an image
inherit image

This will create an image which just contains the packages listed in PACKAGE_INSTALL (and their dependencies), and nothing else.