Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By : Alex Gonzalez
Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By: Alex Gonzalez

Overview of this book

Table of Contents (13 chapters)
Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 a sysroot. The Yocto project offers downloadable sysroot 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...