Set Up Yocto Environment

Amazon EC2 and Yocto Project

Introduction to Yocto environment set up and its component

From the previous blog-Set Up Amazon EC2 to Compile Yocto Image,  We now could connect to the Amazon EC2 instance to compile Yocto images.

The first part is to set up the Yocto environment.  We would need to install some prerequisiste tools like gawk, wget, git-core, etc.. Then, we would download the HIO-Yocto Meta Layers and Yocto poky (contain bitbake tool).  Bitbake is  the build engine Yocto uses.  It follows recipes to execute tasks for cross platform compilation.

To build an image, we would need to set up the Yocto environment.  The neat part of Yocto is that, each device has its own machine variable.  You do not need to worry about the configuration of different devices.  Usually, we would need to modify a lot of configurations to make the applications compatible with the device. This machine variable will let Yocto automatically choose the right configurations to compile.  Hence, save us tons of time in production.

Inside the bsp folder,  we would see build-directories, downloads, and sources.  The build directories contain bblayers.conf and local.conf.  These two files tell bitbake where to locate the recipes and what to do with those recipes. The downloads folder store all the files that is fetch from the upstream, which include source mirror, internet sources, and local projects.  And lastly, sources store configurations and recipes.

To compile an Yocto Image, we mainly we modify the bblayers.conf and local.conf and make sure that we have the recipes in the source folder.  With all these set up, we can give bitbake a clear instruction on how to compile.  The compiling process usually take several hours because Yocto compiles the Linux distribution from scratch.  And this is where Amazon EC2 is the savor.  It boost the compiling time so much that we can debug and generate images more efficiently.

For more information, please visit Setup Build Yocto Environment