There are several ways to obtain an SDK with the Yocto project:
- Downloading a precompiled SDK:
The easiest way to obtain an SDK with a cross-compilation toolchain for a supported platform is to download a precompiled one; for example, from the Yocto Project downloads site: http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/toolchain/.
Installation scripts are named as follows:
<distro>-<c library>-<host>-<image name>-<architecture>-toolchain-<version>.sh
Where:
- distro is the configured distribution, usually Poky
- The c library is usually glibc but could be musl
- host is the machine the toolchain is intended to run on; usually it is either i686 or x86_64
- image name is core-image-minimal or core-image-sato for precompiled toolchains, but will match the image name used to build the toolchain against
- architecture will be a combination of CPU and in the case of ARM, also ABI (hard or soft floating point)
- version will be the Yocto Project release
- The Yocto Project provides prebuilt toolchains for both 32- and 64-bit x86 host machines, and prebuilt ARM toolchains both for ARMv5E and Cortex-A8 (ARMv7A) architectures. These contain sysroots that match the core-image-minimal and core-image-sato target images. To install the prebuilt ARMv7A toolchain for an x86_64 host, run the following:
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/toolchain/x86_64/poky-glibc-x86_64-core-image-sato-cortexa8hf-neon-toolchain-2.4.sh
$ chmod a+x poky-glibc-x86_64-core-image-sato-cortexa8hf-neon-toolchain-2.4.sh
$ ./poky-glibc-x86_64-core-image-sato-cortexa8hf-neon-toolchain-2.4.sh
- Building your own toolchain installer:
On most embedded Linux projects, your machine will be supported by an external layer and you will have a customized root filesystem that your sysroot will need to match. So, building your own toolchain installer is recommended when you have a customized root filesystem. For example, the ideal toolchain to work with the Wandboard would be Cortex-A9-specific and targeted to produce hard floating point binaries.
- Using the Yocto Project build system:
Finally, if you already have a Yocto build system installation on your host, you can also use it for application development. Usually, application developers do not need the complexity of a Yocto build system installation, so a toolchain installer for the target system will be enough.