Yocto Project: Create”Hello World” Recipe and Custom Meta-Layer

In this post, we will go over on how to create a “Hello World” recipe and custom meta layers together in Yocto Project.

A Yocto embedded image is built by different layers of metadata.  For example, we have the network utility layer, multimedia layer, library, web server layer, etc.  Within these layers are the recipes.  These recipes give tasks to bitbake, the compiler Yocto uses.  Then bitbake will follow the recipe to fetch, execute, configure and generate the packages to distribute to the Yocto devices.  Currently, there are three main types of packages. RPM for red hat distribution. DEB for debian distribution, and IPK for OPKG that Yocto uses.

Writing our own layers will be a tedious process.  However, Yocto provides template and autotool to make our life easier.  To make a custom meta layer, we can use “Yocto-layer create” command.  After that, Yocto will ask for the priority of the meta layer,  ask for generate a “Hello World” recipe for example, and ask for generate .bbappend file.  Then, we would have a layer configuration ready to tell Yocto to fetch all the recipes in that directory.  It would also generate all the necessary files including the example recipe, patch, license, and Readme. Of course, we would need to modify those files for a specific application.

Below is the video showing all the step to generate a Helloworld program from a custom meta layer in Amazon EC2 Ubuntu with Yocto Environment installed.

For more information, please visit wiki.hioproject.org