mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
dev-manual, kernel-dev: Replaced yocto-layers with bitbake-layers command
The yocto-layers script is being deprecated in the 2.4 YP release and the preferred script is now bitbake-layers. In particular, the section that talks about creating a general layer was using yocto-layers create. I have replaced it with bitbake-layers create-layer command. The bsp-guide and kernel-dev manual had links that used (in the case of kernel-dev) and referenced yocto-layers. I had to change these to reflect using bitbake-layers create-layers. (From yocto-docs rev: 73ec4d0c8c2c093b7c9df86038d132f0da975273) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4cbdb705de
commit
f29cdba71a
@@ -1593,10 +1593,10 @@
|
|||||||
necessary to create a BSP and perform basic kernel maintenance on that BSP using
|
necessary to create a BSP and perform basic kernel maintenance on that BSP using
|
||||||
the tools.
|
the tools.
|
||||||
<note>
|
<note>
|
||||||
You can also use the <filename>yocto-layer</filename> tool to create
|
You can also use the <filename>bitbake-layers</filename> script to create
|
||||||
a "generic" layer.
|
a "generic" layer.
|
||||||
For information on this tool, see the
|
For information on using this script to create a layer, see the
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer 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.
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||||
section in the Yocto Project Board Support Package (BSP)
|
section in the Yocto Project Board Support Package (BSP)
|
||||||
Developer's Guide and the
|
Developer's Guide and the
|
||||||
"<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
|
"<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
|
||||||
section further down in this manual.
|
section further down in this manual.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -968,122 +968,141 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='creating-a-general-layer-using-the-yocto-layer-script'>
|
<section id='creating-a-general-layer-using-the-bitbake-layers-script'>
|
||||||
<title>Creating a General Layer Using the yocto-layer Script</title>
|
<title>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <filename>yocto-layer</filename> script simplifies
|
The <filename>bitbake-layers</filename> script with the
|
||||||
|
<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>
|
||||||
|
The <filename>bitbake-layers</filename> script
|
||||||
|
replaces the <filename>yocto-layer</filename>
|
||||||
|
script, which is deprecated in the Yocto Project
|
||||||
|
2.4 release.
|
||||||
|
The <filename>yocto-layer</filename> script
|
||||||
|
continues to function as part of the 2.4 release
|
||||||
|
but will be removed post 2.4.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</note>
|
</note>
|
||||||
The default mode of the script's operation is to prompt you for
|
The default mode of the script's operation with this
|
||||||
information needed to generate the layer:
|
subcommand is to create a layer with the following:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The layer priority.
|
<listitem><para>A layer priority of 6.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>Whether or not to create a sample recipe.
|
<listitem><para>A <filename>conf</filename>
|
||||||
|
subdirectory that contains a
|
||||||
|
<filename>layer.conf</filename> file.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>Whether or not to create a sample
|
<listitem><para>
|
||||||
append file.
|
A <filename>recipes-example</filename> subdirectory
|
||||||
|
that contains a further subdirectory named
|
||||||
|
<filename>example</filename>, which contains
|
||||||
|
an <filename>example.bb</filename> recipe file.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>A <filename >COPYING.MIT</filename>,
|
||||||
|
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.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
A <filename>README</filename> file, which is a file
|
||||||
|
describing the contents of your new layer.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Use the <filename>yocto-layer create</filename> sub-command
|
In its simplest form, you can use the following command form
|
||||||
to create a new general layer.
|
to create a layer.
|
||||||
In its simplest form, you can create a layer as follows:
|
The command creates a layer whose name corresponds to
|
||||||
|
<replaceable>your_layer_name</replaceable> in the current
|
||||||
|
directory:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ yocto-layer create mylayer
|
$ bitbake-layers create-layer <replaceable>your_layer_name</replaceable>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
The previous example creates a layer named
|
|
||||||
<filename>meta-mylayer</filename> in the current directory.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As the <filename>yocto-layer create</filename> command runs,
|
If you want to set the priority of the layer to other than the
|
||||||
default values for the prompts appear in brackets.
|
default value of "6", you can either use the
|
||||||
Pressing enter without supplying anything for the prompts
|
<filename>‐‐priority</filename> option or you can
|
||||||
or pressing enter and providing an invalid response causes the
|
edit the
|
||||||
script to accept the default value.
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
|
||||||
Once the script completes, the new layer
|
value in the <filename>conf/layer.conf</filename> after the
|
||||||
is created in the current working directory.
|
script creates it.
|
||||||
The script names the layer by prepending
|
Furthermore, if you want to give the example recipe file
|
||||||
<filename>meta-</filename> to the name you provide.
|
some name other than the default, you can
|
||||||
|
use the
|
||||||
|
<filename>‐‐example-recipe-name</filename> option.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Minimally, the script creates the following within the layer:
|
The easiest way to see how the
|
||||||
<itemizedlist>
|
<filename>bitbake-layers create-layer</filename> command
|
||||||
<listitem><para><emphasis>The <filename>conf</filename>
|
works is to experiment with the script.
|
||||||
directory:</emphasis>
|
|
||||||
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.
|
|
||||||
<filename><replaceable>layer</replaceable>.conf</filename>).
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para><emphasis>The
|
|
||||||
<filename>COPYING.MIT</filename> file:</emphasis>
|
|
||||||
The copyright and use notice for the software.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para><emphasis>The <filename>README</filename>
|
|
||||||
file:</emphasis>
|
|
||||||
A file describing the contents of your new layer.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you choose to generate a sample recipe file, the script
|
|
||||||
prompts you for the name for the recipe and then creates it
|
|
||||||
in <filename><replaceable>layer</replaceable>/recipes-example/example/</filename>.
|
|
||||||
The script creates a <filename>.bb</filename> file and a
|
|
||||||
directory, which contains a sample
|
|
||||||
<filename>helloworld.c</filename> source file, along with
|
|
||||||
a sample patch file.
|
|
||||||
If you do not provide a recipe name, the script uses
|
|
||||||
"example".
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you choose to generate a sample append file, the script
|
|
||||||
prompts you for the name for the file and then creates it
|
|
||||||
in <filename><replaceable>layer</replaceable>/recipes-example-bbappend/example-bbappend/</filename>.
|
|
||||||
The script creates a <filename>.bbappend</filename> 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.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The easiest way to see how the <filename>yocto-layer</filename>
|
|
||||||
script works is to experiment with the script.
|
|
||||||
You can also read the usage information by entering the
|
You can also read the usage information by entering the
|
||||||
following:
|
following:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ 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
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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.
|
||||||
Here is an example where a layer named
|
You can add your layer by using the
|
||||||
<filename>meta-mylayer</filename> is added:
|
<filename>bitbake-layers add-layer</filename> command:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BBLAYERS = ?" \
|
$ bitbake-layers add-layer <replaceable>your_layer_name</replaceable>
|
||||||
/usr/local/src/yocto/meta \
|
</literallayout>
|
||||||
/usr/local/src/yocto/meta-poky \
|
Here is an example where a layer named
|
||||||
/usr/local/src/yocto/meta-yocto-bsp \
|
<filename>meta-scottrif</filename> is added and then the
|
||||||
/usr/local/src/yocto/meta-mylayer \
|
layers are shown using the
|
||||||
"
|
<filename>bitbake-layers show-layers</filename> command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ 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
|
||||||
</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.
|
||||||
@@ -6060,7 +6079,7 @@ Some notes from Cal:
|
|||||||
configuration file makes it easier to reproduce the same
|
configuration file makes it easier to reproduce the same
|
||||||
build configuration when using multiple build machines.
|
build configuration when using multiple build machines.
|
||||||
See the
|
See the
|
||||||
"<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
|
"<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
|
||||||
section for information on how to quickly set up a layer.
|
section for information on how to quickly set up a layer.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><emphasis>Create the distribution configuration file:</emphasis>
|
<listitem><para><emphasis>Create the distribution configuration file:</emphasis>
|
||||||
|
|||||||
@@ -115,18 +115,15 @@
|
|||||||
<emphasis>Create a Layer for Patches:</emphasis>
|
<emphasis>Create a Layer for Patches:</emphasis>
|
||||||
You need to create a layer to hold patches created
|
You need to create a layer to hold patches created
|
||||||
for the kernel image.
|
for the kernel image.
|
||||||
You can use the <filename>yocto-layer</filename> command
|
You can use the
|
||||||
as follows:
|
<filename>bitbake-layers create-layer</filename>
|
||||||
|
command as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky
|
$ cd ~/poky/build
|
||||||
$ yocto-layer create mylayer -o ../meta-mylayer
|
$ bitbake-layers create-layer ../../meta-mylayer
|
||||||
Please enter the layer priority you'd like to use for the layer: [default: 6]
|
NOTE: Starting bitbake server...
|
||||||
Would you like to have an example recipe created? (y/n) [default: n]
|
Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
|
||||||
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).
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
<note>
|
||||||
For background information on working with
|
For background information on working with
|
||||||
@@ -138,8 +135,9 @@
|
|||||||
section in the Yocto Project Board Support (BSP)
|
section in the Yocto Project Board Support (BSP)
|
||||||
Developer's Guide, respectively.
|
Developer's Guide, respectively.
|
||||||
For information on how to use the
|
For information on how to use the
|
||||||
<filename>yocto-layer</filename> script, see the
|
<filename>bitbake-layers create-layer</filename>
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</ulink>"
|
command, 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>"
|
||||||
section in the Yocto Project Development Tasks
|
section in the Yocto Project Development Tasks
|
||||||
Manual.
|
Manual.
|
||||||
</note>
|
</note>
|
||||||
@@ -155,6 +153,8 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky/build
|
$ cd ~/poky/build
|
||||||
$ bitbake-layers add-layer ../../meta-mylayer
|
$ bitbake-layers add-layer ../../meta-mylayer
|
||||||
|
NOTE: Starting bitbake server...
|
||||||
|
$
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
@@ -340,18 +340,14 @@
|
|||||||
<emphasis>Create a Layer for Patches:</emphasis>
|
<emphasis>Create a Layer for Patches:</emphasis>
|
||||||
You need to create a layer to hold patches created
|
You need to create a layer to hold patches created
|
||||||
for the kernel image.
|
for the kernel image.
|
||||||
You can use the <filename>yocto-layer</filename> command
|
You can use the
|
||||||
as follows:
|
<filename>bitbake-layers create-layer</filename>
|
||||||
|
command as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky
|
$ cd ~/poky/build
|
||||||
$ yocto-layer create mylayer -o ../meta-mylayer
|
$ bitbake-layers create-layer ../../meta-mylayer
|
||||||
Please enter the layer priority you'd like to use for the layer: [default: 6]
|
NOTE: Starting bitbake server...
|
||||||
Would you like to have an example recipe created? (y/n) [default: n]
|
Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
|
||||||
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).
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
<note>
|
||||||
For background information on working with
|
For background information on working with
|
||||||
@@ -363,8 +359,9 @@
|
|||||||
section in the Yocto Project Board Support (BSP)
|
section in the Yocto Project Board Support (BSP)
|
||||||
Developer's Guide, respectively.
|
Developer's Guide, respectively.
|
||||||
For information on how to use the
|
For information on how to use the
|
||||||
<filename>yocto-layer</filename> script, see the
|
<filename>bitbake-layers create-layer</filename>
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</ulink>"
|
command, 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>"
|
||||||
section in the Yocto Project Development Tasks
|
section in the Yocto Project Development Tasks
|
||||||
Manual.
|
Manual.
|
||||||
</note>
|
</note>
|
||||||
@@ -380,6 +377,8 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky/build
|
$ cd ~/poky/build
|
||||||
$ bitbake-layers add-layer ../../meta-mylayer
|
$ bitbake-layers add-layer ../../meta-mylayer
|
||||||
|
NOTE: Starting bitbake server ...
|
||||||
|
$
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
@@ -484,10 +483,11 @@
|
|||||||
<note><title>Tip</title>
|
<note><title>Tip</title>
|
||||||
The Yocto Project comes with many tools that simplify
|
The Yocto Project comes with many tools that simplify
|
||||||
tasks you need to perform.
|
tasks you need to perform.
|
||||||
One such tool is the <filename>yocto-layer create</filename>
|
One such tool is the
|
||||||
script, which simplifies creating a new layer.
|
<filename>bitbake-layers create-layer</filename>
|
||||||
|
command, which simplifies creating a new layer.
|
||||||
See the
|
See the
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer 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.
|
||||||
</note>
|
</note>
|
||||||
|
|||||||
Reference in New Issue
Block a user