diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml index e80c37970a..d7b6f15b26 100644 --- a/documentation/bsp-guide/bsp.xml +++ b/documentation/bsp-guide/bsp.xml @@ -1593,10 +1593,10 @@ necessary to create a BSP and perform basic kernel maintenance on that BSP using the tools. - You can also use the yocto-layer tool to create + You can also use the bitbake-layers script to create a "generic" layer. - For information on this tool, see the - "Creating a General Layer Using the yocto-layer Script" + For information on using this script to create a layer, see the + "Creating a General Layer Using the bitbake-layers Script" section in the Yocto Project Development Tasks Manual. diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index ac82dad0a3..2d6bdf5cd9 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -108,7 +108,7 @@ "Creating a New BSP Layer Using the yocto-bsp Script" section in the Yocto Project Board Support Package (BSP) Developer's Guide and the - "Creating a General Layer Using the yocto-layer Script" + "Creating a General Layer Using the bitbake-layers Script" section further down in this manual. @@ -968,122 +968,141 @@ -
- Creating a General Layer Using the yocto-layer Script +
+ Creating a General Layer Using the <filename>bitbake-layers</filename> Script - The yocto-layer script simplifies + The bitbake-layers script with the + create-layer subcommand simplifies creating a new general layer. - - For information on BSP layers, see the - "BSP Layers" - section in the Yocto Project Board Specific (BSP) - Developer's Guide. + Notes + + + For information on BSP layers, see the + "BSP Layers" + section in the Yocto Project Board Specific (BSP) + Developer's Guide. + + + The bitbake-layers script + replaces the yocto-layer + script, which is deprecated in the Yocto Project + 2.4 release. + The yocto-layer script + continues to function as part of the 2.4 release + but will be removed post 2.4. + + - The default mode of the script's operation is to prompt you for - information needed to generate the layer: + The default mode of the script's operation with this + subcommand is to create a layer with the following: - The layer priority. + A layer priority of 6. - Whether or not to create a sample recipe. + A conf + subdirectory that contains a + layer.conf file. - Whether or not to create a sample - append file. + + A recipes-example subdirectory + that contains a further subdirectory named + example, which contains + an example.bb recipe file. + + A COPYING.MIT, + which is the license statement for the layer. + The script assumes you want to use the MIT license, + which is typical for most layers, for the contents of + the layer itself. + + + A README file, which is a file + describing the contents of your new layer. - Use the yocto-layer create sub-command - to create a new general layer. - In its simplest form, you can create a layer as follows: + In its simplest form, you can use the following command form + to create a layer. + The command creates a layer whose name corresponds to + your_layer_name in the current + directory: - $ yocto-layer create mylayer + $ bitbake-layers create-layer your_layer_name - The previous example creates a layer named - meta-mylayer in the current directory. - As the yocto-layer create command runs, - default values for the prompts appear in brackets. - Pressing enter without supplying anything for the prompts - or pressing enter and providing an invalid response causes the - script to accept the default value. - Once the script completes, the new layer - is created in the current working directory. - The script names the layer by prepending - meta- to the name you provide. + If you want to set the priority of the layer to other than the + default value of "6", you can either use the + ‐‐priority option or you can + edit the + BBFILE_PRIORITY + value in the conf/layer.conf after the + script creates it. + Furthermore, if you want to give the example recipe file + some name other than the default, you can + use the + ‐‐example-recipe-name option. - Minimally, the script creates the following within the layer: - - The conf - directory: - This directory contains the layer's configuration file. - The root name for the file is the same as the root name - your provided for the layer (e.g. - layer.conf). - - The - COPYING.MIT file: - The copyright and use notice for the software. - - The README - file: - A file describing the contents of your new layer. - - - - - - If you choose to generate a sample recipe file, the script - prompts you for the name for the recipe and then creates it - in layer/recipes-example/example/. - The script creates a .bb file and a - directory, which contains a sample - helloworld.c source file, along with - a sample patch file. - If you do not provide a recipe name, the script uses - "example". - - - - If you choose to generate a sample append file, the script - prompts you for the name for the file and then creates it - in layer/recipes-example-bbappend/example-bbappend/. - The script creates a .bbappend file and a - directory, which contains a sample patch file. - If you do not provide a recipe name, the script uses - "example". - The script also prompts you for the version of the append file. - The version should match the recipe to which the append file - is associated. - - - - The easiest way to see how the yocto-layer - script works is to experiment with the script. + The easiest way to see how the + bitbake-layers create-layer command + works is to experiment with the script. You can also read the usage information by entering the following: - $ yocto-layer help + $ bitbake-layers create-layer --help + NOTE: Starting bitbake server... + usage: bitbake-layers create-layer [-h] [--priority PRIORITY] + [--example-recipe-name EXAMPLERECIPE] + layerdir + + Create a basic layer + + positional arguments: + layerdir Layer directory to create + + optional arguments: + -h, --help show this help message and exit + --priority PRIORITY, -p PRIORITY + Layer directory to create + --example-recipe-name EXAMPLERECIPE, -e EXAMPLERECIPE + Filename of the example recipe Once you create your general layer, you must add it to your bblayers.conf file. - Here is an example where a layer named - meta-mylayer is added: + You can add your layer by using the + bitbake-layers add-layer command: - BBLAYERS = ?" \ - /usr/local/src/yocto/meta \ - /usr/local/src/yocto/meta-poky \ - /usr/local/src/yocto/meta-yocto-bsp \ - /usr/local/src/yocto/meta-mylayer \ - " + $ bitbake-layers add-layer your_layer_name + + Here is an example where a layer named + meta-scottrif is added and then the + layers are shown using the + bitbake-layers show-layers command: + + $ bitbake-layers add-layer meta-scottrif + NOTE: Starting bitbake server... + Loading cache: 100% |############################################| Time: 0:00:00 + Loaded 1275 entries from dependency cache. + Parsing recipes: 100% |##########################################| Time: 0:00:00 + Parsing of 819 .bb files complete (817 cached, 2 parsed). 1276 targets, 44 skipped, 0 masked, 0 errors. + $ bitbake-layers show-layers + NOTE: Starting bitbake server... + layer path priority + ========================================================================== + meta /home/scottrif/poky/meta 5 + meta-poky /home/scottrif/poky/meta-poky 5 + meta-yocto-bsp /home/scottrif/poky/meta-yocto-bsp 5 + meta-mylayer /home/scottrif/meta-mylayer 6 + workspace /home/scottrif/poky/build/workspace 99 + meta-scottrif /home/scottrif/poky/build/meta-scottrif 6 Adding the layer to this file enables the build system to locate the layer during the build. @@ -6060,7 +6079,7 @@ Some notes from Cal: configuration file makes it easier to reproduce the same build configuration when using multiple build machines. See the - "Creating a General Layer Using the yocto-layer Script" + "Creating a General Layer Using the bitbake-layers Script" section for information on how to quickly set up a layer. Create the distribution configuration file: diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 3b4428549d..b8fd870162 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml @@ -115,18 +115,15 @@ Create a Layer for Patches: You need to create a layer to hold patches created for the kernel image. - You can use the yocto-layer command - as follows: + You can use the + bitbake-layers create-layer + command as follows: - $ cd ~/poky - $ yocto-layer create mylayer -o ../meta-mylayer - Please enter the layer priority you'd like to use for the layer: [default: 6] - Would you like to have an example recipe created? (y/n) [default: n] - Would you like to have an example bbappend file created? (y/n) [default: n] - - New layer created in ../meta-mylayer. - - Don't forget to add it to your BBLAYERS (for details see ../meta-mylayer/README). + $ cd ~/poky/build + $ bitbake-layers create-layer ../../meta-mylayer + NOTE: Starting bitbake server... + Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer' + $ For background information on working with @@ -138,8 +135,9 @@ section in the Yocto Project Board Support (BSP) Developer's Guide, respectively. For information on how to use the - yocto-layer script, see the - "Creating a General Layer Using the yocto-layer Script" + bitbake-layers create-layer + command, see the + "Creating a General Layer Using the bitbake-layers Script" section in the Yocto Project Development Tasks Manual. @@ -155,6 +153,8 @@ $ cd ~/poky/build $ bitbake-layers add-layer ../../meta-mylayer + NOTE: Starting bitbake server... + $ @@ -340,18 +340,14 @@ Create a Layer for Patches: You need to create a layer to hold patches created for the kernel image. - You can use the yocto-layer command - as follows: + You can use the + bitbake-layers create-layer + command as follows: - $ cd ~/poky - $ yocto-layer create mylayer -o ../meta-mylayer - Please enter the layer priority you'd like to use for the layer: [default: 6] - Would you like to have an example recipe created? (y/n) [default: n] - Would you like to have an example bbappend file created? (y/n) [default: n] - - New layer created in ../meta-mylayer. - - Don't forget to add it to your BBLAYERS (for details see ../meta-mylayer/README). + $ cd ~/poky/build + $ bitbake-layers create-layer ../../meta-mylayer + NOTE: Starting bitbake server... + Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer' For background information on working with @@ -363,8 +359,9 @@ section in the Yocto Project Board Support (BSP) Developer's Guide, respectively. For information on how to use the - yocto-layer script, see the - "Creating a General Layer Using the yocto-layer Script" + bitbake-layers create-layer + command, see the + "Creating a General Layer Using the bitbake-layers Script" section in the Yocto Project Development Tasks Manual. @@ -380,6 +377,8 @@ $ cd ~/poky/build $ bitbake-layers add-layer ../../meta-mylayer + NOTE: Starting bitbake server ... + $ @@ -484,10 +483,11 @@ Tip The Yocto Project comes with many tools that simplify tasks you need to perform. - One such tool is the yocto-layer create - script, which simplifies creating a new layer. + One such tool is the + bitbake-layers create-layer + command, which simplifies creating a new layer. See the - "Creating a General Layer Using the yocto-layer Script" + "Creating a General Layer Using the bitbake-layers Script" section in the Yocto Project Development Tasks Manual for information on how to use this script.