In the development environment you will need to build an image whenever you change hardware support, add or change system libraries, or add or change services that have dependencies.
Building an Image
The first thing you need to do is set up the OpenEmbedded build
environment by sourcing an environment setup script
(i.e.
oe-init-build-env
or
oe-init-build-env-memres
).
Here is an example:
$ source oe-init-build-env [build_dir
]
The build_dir
argument is optional and specifies the directory the
OpenEmbedded build system uses for the build -
the Build Directory.
If you do not specify a Build Directory, it defaults to a directory
named build
in your current working directory.
A common practice is to use a different Build Directory for different targets.
For example, ~/build/x86
for a qemux86
target, and ~/build/arm
for a qemuarm
target.
Once the build environment is set up, you can build a target using:
$ bitbake target
If you experience a build error due to resources
temporarily being unavailable and it appears you
should not be having this issue, it might be due
to the combination of a 4.3+ Linux kernel and
systemd
version 228+
(i.e. see this
link
for information).
To work around this issue, you can try either of the following:
Try the build again.
Modify the "DefaultTasksMax"
systemd
parameter
by uncommenting it and setting it to
"infinity".
You can find this parameter in the
system.conf
file
located in
/etc/systemd
on most systems.
The target
is the name of the recipe you want to build.
Common targets are the images in meta/recipes-core/images
,
meta/recipes-sato/images
, etc. all found in the
Source Directory.
Or, the target can be the name of a recipe for a specific piece of software such as
BusyBox.
For more details about the images the OpenEmbedded build system supports, see the
"Images" chapter.