The first thing you need to do is install the SDK on your host
development machine by running the *.sh
installation script.
You can download a tarball installer, which includes the
pre-built toolchain, the runqemu
script, and support files from the appropriate directory under
http://downloads.yoctoproject.org/releases/yocto/yocto-2.2/toolchain/.
Toolchains are available for 32-bit and 64-bit x86 development
systems from the i686
and
x86_64
directories, respectively.
The toolchains the Yocto Project provides are based off the
core-image-sato
image and contain
libraries appropriate for developing against that image.
Each type of development system supports five or more target
architectures.
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.
poky-glibc-host_system
-image_type
-arch
-toolchain-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.arch
is a string representing the tuned target architecture: i586, x86_64, powerpc, mips, armv7a or armv5terelease_version
is a string representing the release number of the Yocto Project: 2.2, 2.2+snapshot
For example, the following toolchain 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.2 snapshot:
poky-glibc-x86_64-core-image-sato-i586-toolchain-2.2.sh
The SDK and toolchains are self-contained and by default are installed
into /opt/poky
.
However, when you run the SDK installer, you can choose an
installation directory.
$ chmod +x poky-glibc-x86_64-core-image-sato-i586-toolchain-2.2.sh
The following command shows how to run the installer given a
toolchain tarball for a 64-bit x86 development host system and
a 32-bit x86 target architecture.
The example assumes the toolchain installer is located in
~/Downloads/
.
$ ./poky-glibc-x86_64-core-image-sato-i586-toolchain-2.2.sh Poky (Yocto Project Reference Distro) SDK installer version 2.0 =============================================================== Enter target directory for SDK (default: /opt/poky/2.2): You are about to install the SDK to "/opt/poky/2.2". Proceed[Y/n]? Y Extracting SDK.......................................................................done Setting it up...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. $ . /opt/poky/2.2/environment-setup-i586-poky-linux
Again, reference the "Installed Standard SDK Directory Structure" section for more details on the resulting directory structure of the installed SDK.