Automatically creating a base package recipe using recipetool

The recipetool allows for easier creation of a base recipe based on the source code files. As long as you can extract or point to the source files, the recipetool will generate a recipe and automatically configure all pre-built information into the new recipe file.

To illustrate, assume we have an application that builds using Autotools. When we use the recipetool to create the base recipe, it generates a recipe that has the pre-build dependencies, it inherits the autotools class, sets the license requirements, and checksums.

The recipetool creates a recipe file with several comments that are intended for our understanding of the content. All the comments can be deleted when we integrate the recipe file to our metalayer.

To generate a recipe using the bbexample, available in https://github.com/OSSystems/bbexample, we can use the following commands:

$ source oe-init-build-env build
$ recipetool create -V 1.0 https://github.com/OSSystems/bbexample

The following image shows the recipe creation:

The recipetool creates the bbexample_git.bb file after downloading the source code from the URL and analyzing its content. Based on the source code it creates the base of the recipe, as shown in the following image:

Even though the recipetool creates a base recipe, it should not be taken as a final recipe. You should check for compilation options, extra metadata information, and so on.

The bbexample_git.bb file is created in the directory the recipetool is executed (build), we must then copy the file to the desired location, in the example meta-newlayer/recipes-mine/bbexample/bbexample_git.bb. After copying it, we can build it using BitBake as usual.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.218.215