A final way of making the cross-toolchain available is to use BitBake
to generate the toolchain within an existing
Build Directory.
This method does not install the toolchain into the default
/opt
directory.
As with the previous method, if you need to install the target sysroot, you must
do that separately as well.
Follow these steps to generate the toolchain into the Build Directory:
Set up the Build Environment:
Source the OpenEmbedded build environment setup
script (i.e.
oe-init-build-env
or
oe-init-build-env-memres
)
located in the
Source Directory.
Check your Local Configuration File:
At this point, you should be sure that the
MACHINE
variable
in the local.conf
file found in the
conf
directory of the Build Directory
is set for the target architecture.
Comments within the local.conf
file
list the values you can use for the
MACHINE
variable.
If you do not change the MACHINE
variable, the OpenEmbedded build system uses
qemux86
as the default target
machine when building the cross-toolchain.
MACHINE
variable in the local.conf
file and
re-run the bitbake
command.
Make Sure Your Layers are Enabled:
Examine the conf/bblayers.conf
file
and make sure that you have enabled all the compatible
layers for your target machine.
The OpenEmbedded build system needs to be aware of each
layer you want included when building images and
cross-toolchains.
For information on how to enable a layer, see the
"Enabling Your Layer"
section in the Yocto Project Development Manual.
Generate the Cross-Toolchain:
Run bitbake meta-ide-support
to
complete the cross-toolchain generation.
Once the bitbake
command finishes,
the cross-toolchain is
generated and populated within the Build Directory.
You will notice environment setup files for the
cross-toolchain that contain the string
"environment-setup
" in the
Build Directory's tmp
folder.
Be aware that when you use this method to install the toolchain, you still need to separately extract and install the sysroot filesystem. For information on how to do this, see the "Extracting the Root Filesystem" section.