5.3.2.1. Creating the Base Recipe Using recipetool

recipetool automates creation of a base recipe given a set of source code files. As long as you can extract or point to the source files, the tool will construct a recipe and automatically configure all pre-build information into the recipe. For example, suppose you have an application that builds using Autotools. Creating the base recipe using recipetool results in a recipe that has the pre-build dependencies, license requirements, and checksums configured.

To run the tool, you just need to be in your Build Directory and have sourced the build environment setup script (i.e. oe-init-build-env or oe-init-build-env-memres). Here is the basic recipetool syntax:

     recipetool -h
     recipetool create [-h]
     recipetool [-d] [-q] [--color auto | always | never ] create [-o OUTFILE] [-m] [-x EXTERNALSRC] source

          -d       Enables debug output.
          -q       Outputs only errors (quiet mode).
          --color  Colorizes the output automatically, always, or never.
          -h       Displays Python generated syntax for recipetool.
          create   Causes recipetool to create a base recipe.  The create
                   command is further defined with these options:

                   -o OUTFILE      Specifies the full path and filename for the generated
                                   recipe.
                   -m              Causes the recipe to be machine-specific rather than
                                   architecture-specific (default).
                   -x EXTERNALSRC  Fetches and extracts source files from source
                                   and places them in EXTERNALSRC.
                                   source must be a URL.
                   -h              Displays Python-generated syntax for create.
                   source          Specifies the source code on which to base the
                                   recipe.
                    

Running recipetool creates the base recipe and locates it properly in the layer that contains your source files. Following are some syntax examples:

Use this syntax to generate a recipe based on source. Once generated, the recipe resides in the existing source code layer:

     recipetool create source
                    

Use this syntax to generate a recipe using code that you extract from source. The extracted code is placed in its own layer defined by EXTERNALSRC.

     recipetool create -x EXTERNALSRC source
                    

Use this syntax to generate a recipe and override the tool's default placement of the recipe by specifying both its location and name using OUTFILE.

     recipetool create -o OUTFILE source
                    

Use this syntax to generate a recipe based on source. The options direct recipetool to run in "quiet mode" and to generate debugging information. Once generated, the recipe resides in the existing source code layer:

     recipetool create -o OUTFILE source