This script is one of two scripts that set up the OpenEmbedded
build environment.
Aside from setting up the environment, this script starts a
memory-resident BitBake server.
For information on the other setup script, see the
"oe-init-build-env
"
section.
Memory-resident BitBake resides in memory until you specifically remove it using the following BitBake command:
$ bitbake -m
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.
One of these variables is the
BBSERVER
variable, which allows the OpenEmbedded build system to locate
the server that is running BitBake.
You need to run an environment setup script before using BitBake commands. Following is the script syntax:
$ source oe-init-build-env-memresport_number
build_dir
The script uses other scripts within the
scripts
directory to do the bulk of the work.
If you do not provide a port number with the script, the BitBake server starts at a randomnly selected port.
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-memres No port specified, using dynamically selected port ### 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' Bitbake server started on demand as needed, use bitbake -m to shut it down
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 a build directory named
build
.
If you provide a Build Directory argument when you
source
the script, the Build Directory is
created using that name.
For example, the following command starts the BitBake server using
a randomnly selected port and creates a Build Directory named
mybuilds
that is outside of the
Source Directory:
$ source oe-init-build-env-memres ~/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-memres
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.