TipsAndTricks/UnconventionalImages

From Yocto Project
Revision as of 16:20, 27 April 2018 by RossBurton (talk | contribs) (Created page with "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 publish...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.