5.3.2.2. Creating the Base Recipe Using recipetool create

recipetool create 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:

Note

Running recipetool -h or recipetool create -h produces the Python-generated help, which presented differently than what follows here.

     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 create -o OUTFILE 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 -o OUTFILE 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 -o OUTFILE -x EXTERNALSRC source
                    

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

     recipetool create -d -o OUTFILE source