The first thing you need to do is install the SDK on your
Build Host
by running the *.sh
installation script.
You can download a tarball installer, which includes the
pre-built toolchain, the runqemu
script, the internal build system, devtool
,
and support files from the appropriate
toolchain
directory within the Index of Releases.
Toolchains are available for several 32-bit and 64-bit
architectures with the x86_64
directories,
respectively.
The toolchains the Yocto Project provides are based off the
core-image-sato
and
core-image-minimal
images and contain
libraries appropriate for developing against that image.
The names of the tarball installer scripts are such that a string representing the host system appears first in the filename and then is immediately followed by a string representing the target architecture. An extensible SDK has the string "-ext" as part of the name. Following is the general form:
poky-glibc-host_system
-image_type
-arch
-toolchain-ext-release_version
.sh Where:host_system
is a string representing your development system: i686 or x86_64.image_type
is the image for which the SDK was built: core-image-sato or core-image-minimalarch
is a string representing the tuned target architecture: aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neonrelease_version
is a string representing the release number of the Yocto Project: 2.7, 2.7+snapshot
For example, the following SDK installer is for a 64-bit
development host system and a i586-tuned target architecture
based off the SDK for core-image-sato
and
using the current 2.7 snapshot:
poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-2.7.sh
The SDK and toolchains are self-contained and by default are
installed into the poky_sdk
folder in your
home directory.
You can choose to install the extensible SDK in any location when
you run the installer.
However, because files need to be written under that directory
during the normal course of operation, the location you choose
for installation must be writable for whichever
users need to use the SDK.
The following command shows how to run the installer given a
toolchain tarball for a 64-bit x86 development host system and
a 64-bit x86 target architecture.
The example assumes the SDK installer is located in
~/Downloads/
and has execution rights.
$ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5 ========================================================================== Enter target directory for SDK (default: ~/poky_sdk): You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed[Y/n]? Y Extracting SDK..............done Setting it up... Extracting buildtools... Preparing build system... Parsing recipes: 100% |##################################################################| Time: 0:00:52 Initialising tasks: 100% |###############################################################| Time: 0:00:00 Checking sstate mirror object availability: 100% |#######################################| Time: 0:00:00 Loading cache: 100% |####################################################################| Time: 0:00:00 Initialising tasks: 100% |###############################################################| Time: 0:00:00 done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux