1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

documentation: Updated the section on creating a general script

Split this section into two sections: one for creating the layer
using bitbake-layers create-layer and one for adding the layer
to bblayers.conf using bitbake-layers add-layer.

Needed to update some references in the yocto-project-qs and
kernel-dev manuals.

(From yocto-docs rev: 741a29b0cbeaaeaa0ac9155036ace2623938aee3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2018-03-20 16:15:16 -07:00
committed by Richard Purdie
parent 955e49c134
commit fcbe72179c
3 changed files with 53 additions and 15 deletions
@@ -966,11 +966,24 @@
The <filename>bitbake-layers</filename> script with the The <filename>bitbake-layers</filename> script with the
<filename>create-layer</filename> subcommand simplifies <filename>create-layer</filename> subcommand simplifies
creating a new general layer. creating a new general layer.
<note> <note><title>Notes</title>
For information on BSP layers, see the <itemizedlist>
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" <listitem><para>
section in the Yocto Project Board Specific (BSP) For information on BSP layers, see the
Developer's Guide. "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
section in the Yocto Project Board Specific (BSP)
Developer's Guide.
</para></listitem>
<listitem><para>
In order to use a layer with the OpenEmbedded
build system, you need to add the layer to your
<filename>bblayers.conf</filename> configuration
file.
See the
"<link linkend='adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</link>"
section for more information.
</para></listitem>
</itemizedlist>
</note> </note>
The default mode of the script's operation with this The default mode of the script's operation with this
subcommand is to create a layer with the following: subcommand is to create a layer with the following:
@@ -1009,6 +1022,13 @@
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake-layers create-layer <replaceable>your_layer_name</replaceable> $ bitbake-layers create-layer <replaceable>your_layer_name</replaceable>
</literallayout> </literallayout>
As an example, the following command adds a layer named
<filename>meta-scottrif</filename>:
<literallayout class='monospaced'>
$ bitbake-layers create-layer meta-scottrif
NOTE: Starting bitbake server...
Add your new layer with 'bitbake-layers add-layer meta-scottrif'
</literallayout>
</para> </para>
<para> <para>
@@ -1051,19 +1071,31 @@
Filename of the example recipe Filename of the example recipe
</literallayout> </literallayout>
</para> </para>
</section>
<section id='adding-a-layer-using-the-bitbake-layers-script'>
<title>Adding a Layer Using the <filename>bitbake-layers</filename> Script</title>
<para> <para>
Once you create your general layer, you must add it to your Once you create your general layer, you must add it to your
<filename>bblayers.conf</filename> file. <filename>bblayers.conf</filename> file.
You can add your layer by using the Adding the layer to this configuration file makes the
OpenEmbedded build system aware of your layer so that it can
search it for metadata.
</para>
<para>
Add your layer by using the
<filename>bitbake-layers add-layer</filename> command: <filename>bitbake-layers add-layer</filename> command:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake-layers add-layer <replaceable>your_layer_name</replaceable> $ bitbake-layers add-layer <replaceable>your_layer_name</replaceable>
</literallayout> </literallayout>
Here is an example where a layer named Here is an example that adds a layer named
<filename>meta-scottrif</filename> is added and then the <filename>meta-scottrif</filename> to the configuration file.
layers are shown using the Following the command that adds the layer is another
<filename>bitbake-layers show-layers</filename> command: <filename>bitbake-layers</filename> command that shows the
layers that are in your <filename>bblayers.conf</filename>
file:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake-layers add-layer meta-scottrif $ bitbake-layers add-layer meta-scottrif
NOTE: Starting bitbake server... NOTE: Starting bitbake server...
@@ -1081,6 +1113,11 @@
</literallayout> </literallayout>
Adding the layer to this file enables the build system to Adding the layer to this file enables the build system to
locate the layer during the build. locate the layer during the build.
<note>
During a build, the OpenEmbedded build system looks in
the layers from the top of the list down to the bottom
in that order.
</note>
</para> </para>
</section> </section>
</section> </section>
@@ -136,7 +136,7 @@
Developer's Guide, respectively. Developer's Guide, respectively.
For information on how to use the For information on how to use the
<filename>bitbake-layers create-layer</filename> <filename>bitbake-layers create-layer</filename>
command, see the command to quickly set up a layer, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
section in the Yocto Project Development Tasks section in the Yocto Project Development Tasks
Manual. Manual.
@@ -360,7 +360,7 @@
Developer's Guide, respectively. Developer's Guide, respectively.
For information on how to use the For information on how to use the
<filename>bitbake-layers create-layer</filename> <filename>bitbake-layers create-layer</filename>
command, see the command to quickly set up a layer, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
section in the Yocto Project Development Tasks section in the Yocto Project Development Tasks
Manual. Manual.
@@ -489,7 +489,8 @@
See the See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
section in the Yocto Project Development Tasks Manual for section in the Yocto Project Development Tasks Manual for
information on how to use this script. information on how to use this script to quick set up a
new layer.
</note> </note>
</para> </para>
+2 -2
View File
@@ -971,8 +971,8 @@
section in the same manual. section in the same manual.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Add a Layer for Software:</emphasis> <emphasis>Create a Layer for Software:</emphasis>
For steps on how to add a general layer for software, For steps on how to create a general layer for software,
see the see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
section in the Yocto Project Development Tasks Manual. section in the Yocto Project Development Tasks Manual.