This script is one of two scripts that set up the OpenEmbedded build
environment.
For information on the other script, see the
"oe-init-build-env-memres
"
section.
Running this script with the source
command in
a shell makes changes to PATH
and sets other
core BitBake variables based on the current working directory.
You need to run an environment setup script before running BitBake
commands.
The script uses other scripts within the
scripts
directory to do the bulk of the work.
When you run this script, your Yocto Project environment is set up, a Build Directory is created, your working directory becomes the Build Directory, and you are presented with a list of common BitBake targets. Here is an example:
$ source oe-init-build-env ### Shell environment set up for builds. ### You can now run 'bitbake <target>' Common targets are: core-image-minimal core-image-sato meta-toolchain adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86'
The script gets its default list of common targets from the
conf-notes.txt
file, which is found in the
meta-yocto
directory within the
Source Directory.
Should you have custom distributions, it is very easy to modify
this configuration file to include your targets for your
distribution.
See the
"Creating a Custom Template Configuration Directory"
section in the Yocto Project Development Manual for more
information.
By default, running this script without a
Build Directory
argument creates the build
directory
in your current working directory.
If you provide a Build Directory argument when you
source
the script, you direct the OpenEmbedded
build system to create a Build Directory of your choice.
For example, the following command creates a Build Directory named
mybuilds
that is outside of the
Source Directory:
$ source oe-init-build-env ~/mybuilds
The OpenEmbedded build system uses the template configuration
files, which are found by default in the
meta-yocto/conf
directory in the
Source Directory.
See the
"Creating a Custom Template Configuration Directory"
section in the Yocto Project Development Manual for more
information.
oe-init-build-env
script
from a Source Directory that contains spaces in either the filenames
or directory names, the script returns an error indicating no such
file or directory.
Be sure to use a Source Directory free of names containing spaces.