Preparing and using an SDK
The Yocto build system can be used to generate a cross-compilation toolchain and matching sysroot
for a target system.
Getting ready
We will use the previously used wandboard-quad
build directory and source the setup-environment
script as follows:
$ cd /opt/yocto/fsl-community-bsp/ $ source setup-environment wandboard-quad
How to do it...
There are several ways to build an SDK with the Yocto build system:
- The
meta-toolchain
target.This method will build a toolchain that matches your target platform, and a basic
sysroot
that will not match your target root filesystem. However, this toolchain can be used to build bare metal software like the U-Boot bootloader or the Linux kernel, which do not need asysroot
. The Yocto project offers downloadablesysroot
for the supported hardware platforms. You can also build this toolchain yourself with:$ bitbake meta-toolchain
Once built, it can be installed with:
$ cd tmp/deploy/sdk $ ./poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp...