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.
MACHINE
variable in the local.conf
file and
re-run the BitBake command.
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.