Yocto: Difference between revisions
m →Images |
|||
Line 8: | Line 8: | ||
== Images == | == Images == | ||
Images are recipes that ultimately inherit from '''meta/classes/image.bbclass''' and | Images are recipes that ultimately inherit from '''meta/classes/image.bbclass''' and set the global variable '''IMAGE_INSTALL''', which defines the set of packages (from the package feed area) that will go into the filesystem image. Most images will inherit from ''meta/classes/core-image.bbclass'' which inherits directly from ''image.bbclass'', adding to IMAGE_INSTALL packages from the package groups ''packagegroup-core-boot'' and ''packagegroup-base-extended''. | ||
Images are defined in recipe files with the file extension 'bb'. In order to separate them from package recipes, there is a convention to put image recipes into a folder named ''images''. Making use of this, we can list all images defined by all layers via | Images are defined in recipe files with the file extension 'bb'. In order to separate them from package recipes, there is a convention to put image recipes into a folder named ''images''. Making use of this, we can list all images defined by all layers via |
Revision as of 2022-11-06T14:22:04
Prerequisites
sudo apt install gcc g++ \ python3-distutils python-is-python3
Images
Images are recipes that ultimately inherit from meta/classes/image.bbclass and set the global variable IMAGE_INSTALL, which defines the set of packages (from the package feed area) that will go into the filesystem image. Most images will inherit from meta/classes/core-image.bbclass which inherits directly from image.bbclass, adding to IMAGE_INSTALL packages from the package groups packagegroup-core-boot and packagegroup-base-extended.
Images are defined in recipe files with the file extension 'bb'. In order to separate them from package recipes, there is a convention to put image recipes into a folder named images. Making use of this, we can list all images defined by all layers via
cd poky ls meta*/recipes*/images/*.bb
Reference images
The following reference images are defined in the meta layer:
core-image-minimal | small image that just boots the target device | |
core-image-minimal-dev | core-image-minimal with headers and libraries allowing development work | |
core-image-minimal-initramfs | core-image-minimal with kernel support for in-RAM filesystem | |
core-image-base | console-only system fully supporting the target hardware | |
core-image-full-cmdline | console-only image that includes many system tools | |
core-image-x11 | image with basic X11 and a terminal |
These image definitions are provided as a starting point for creating project-specific, custom image definitions.
Package Groups
Package groups are recipes that inherit from meta/classes/packagegroup.bbclass and set the content of the global variable PACKAGES. Package groups are defined in recipe files with the file extension 'bb'.
Note that the packagegroup must be inherited before PACKAGES is defined.
inherit packagegroup PACKAGES = '...'
Using devtool
Use devtool to make changes to an existing recipe and automatically generate an append recipe from those changes.