3.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). To get help on the tool, use the following command:

     $ recipetool -h
     NOTE: Starting bitbake server...
     usage: recipetool [-d] [-q] [--color COLOR] [-h] <subcommand> ...

     OpenEmbedded recipe tool

     options:
       -d, --debug     Enable debug output
       -q, --quiet     Print only errors
       --color COLOR   Colorize output (where COLOR is auto, always, never)
       -h, --help      show this help message and exit

     subcommands:
       create          Create a new recipe
       newappend       Create a bbappend for the specified target in the specified
                       layer
       setvar          Set a variable within a recipe
       appendfile      Create/update a bbappend to replace a target file
       appendsrcfiles  Create/update a bbappend to add or replace source files
       appendsrcfile   Create/update a bbappend to add or replace a source file
     Use recipetool <subcommand> --help to get help on a specific command
                    

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