sphinx: fix internal links

Many of the internal links were not converted probably from DocBook
using pandoc. After looking at the various patterns, the follow series
of 'naive' Python regexp were used to perform some additional
automatic conversion.

Also, since we rely on built-in glossary, all links to terms need to
use the sphinx :term: syntax.

This commit is generated using the following Python series of regexp:

   line = re.sub("`+(\w+)`* <(\&YOCTO_DOCS_REF_URL;)?#var-\\1>`__",
                 ":term:`\\1`",
                 line)

   line = re.sub("`+do_([a-z_]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-tasks-\\1>`__",
                 ":ref:`ref-tasks-\\1`",
                 line)

   line = re.sub("`+([a-z_\-\*\.]+).bbclass`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
                 ":ref:`\\1.bbclass <ref-classes-\\1>`",
                 line)

   line = re.sub("`+([a-z_\-\*\.]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
                 ":ref:`\\1 <ref-classes-\\1>`",
                 line)

   line = re.sub("`Source Directory <(\&YOCTO_DOCS_REF_URL;)?#source-directory>`__",
                 ":term:`Source Directory`",
                 line)

   line = re.sub("`Build Directory <(\&YOCTO_DOCS_REF_URL;)?#build-directory>`__",
                 ":term:`Build Directory`",
                 line)

   line = re.sub("`Metadata <(\&YOCTO_DOCS_REF_URL;)?#metadata>`__",
                 ":term:`Metadata`",
                 line)

   line = re.sub("`BitBake <(\&YOCTO_DOCS_REF_URL;)?#bitbake-term>`__",
                 ":term:`BitBake`",
                 line)

   line = re.sub("`Images <(\&YOCTO_DOCS_REF_URL;)?#ref-images>`__",
                 ":ref:`ref-manual/ref-images:Images`",
                 line)

   line = re.sub("`Classes <(\&YOCTO_DOCS_REF_URL;)?#ref-classes>`__",
                 ":ref:`ref-manual/ref-classes:Classes`",
                 line)

   line = re.sub("`workspace <(\&YOCTO_DOCS_REF_URL;)?#devtool-the-workspace-layer-structure>`__",
                 ":ref:`devtool-the-workspace-layer-structure`",
                 line)

   line = re.sub("`Open-?Embedded b?B?uild s?S?ystem <(\&YOCTO_DOCS_REF_URL;)?#build-system-term>`__",
                 ":term:`OpenEmbedded Build System`",
                 line)

   line = re.sub("`(OpenEmbedded-Core )?(\(?OE-Core\)? )?<(\&YOCTO_DOCS_REF_URL;)?#oe-core>`__",
                 ":term:`OpenEmbedded-Core (OE-Core)`",
                 line)

It won't catch multiline strings, but it catches a very large number
of occurences!

(From yocto-docs rev: 3f537d17de5b1fb76ba3bee196481984a4826378)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nicolas Dechesne
2020-07-24 16:27:54 +02:00
committed by Richard Purdie
parent 4cd953989d
commit c473fa2292
42 changed files with 2221 additions and 2221 deletions

View File

@@ -11,7 +11,7 @@ Overview
In addition to supporting configuration fragments and patches, the Yocto
Project kernel tools also support rich
`Metadata <&YOCTO_DOCS_REF_URL;#metadata>`__ that you can use to define
:term:`Metadata` that you can use to define
complex policies and Board Support Package (BSP) support. The purpose of
the Metadata and the tools that manage it is to help you manage the
complexity of the configuration and sources used to support multiple
@@ -27,7 +27,7 @@ Kernel development tools ("kern-tools") exist also in the Yocto Project
Source Repositories under the "Yocto Linux Kernel" heading in the
``yocto-kernel-tools`` Git repository. The recipe that builds these
tools is ``meta/recipes-kernel/kern-tools/kern-tools-native_git.bb`` in
the `Source Directory <&YOCTO_DOCS_REF_URL;#source-directory>`__ (e.g.
the :term:`Source Directory` (e.g.
``poky``).
Using Kernel Metadata in a Recipe
@@ -49,9 +49,9 @@ linux-yocto recipe.
file) is said to be a "linux-yocto style" recipe.
Every linux-yocto style recipe must define the
```KMACHINE`` <&YOCTO_DOCS_REF_URL;#var-KMACHINE>`__ variable. This
:term:`KMACHINE` variable. This
variable is typically set to the same value as the ``MACHINE`` variable,
which is used by `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__.
which is used by :term:`BitBake`.
However, in some cases, the variable might instead refer to the
underlying platform of the ``MACHINE``.
@@ -65,7 +65,7 @@ Descriptions <#bsp-descriptions>`__ section for more information.
Every linux-yocto style recipe must also indicate the Linux kernel
source repository branch used to build the Linux kernel. The
```KBRANCH`` <&YOCTO_DOCS_REF_URL;#var-KBRANCH>`__ variable must be set
:term:`KBRANCH` variable must be set
to indicate the branch.
.. note::
@@ -84,7 +84,7 @@ to indicate the branch.
The linux-yocto style recipes can optionally define the following
variables: KERNEL_FEATURES LINUX_KERNEL_TYPE
```LINUX_KERNEL_TYPE`` <&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE>`__
:term:`LINUX_KERNEL_TYPE`
defines the kernel type to be used in assembling the configuration. If
you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to "standard".
Together with ``KMACHINE``, ``LINUX_KERNEL_TYPE`` defines the search
@@ -103,10 +103,10 @@ a match, they issue a warning.
The tools first search for the ``KMACHINE`` and then for the
``LINUX_KERNEL_TYPE``. If the tools cannot find a partial match, they
will use the sources from the ``KBRANCH`` and any configuration
specified in the ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__.
specified in the :term:`SRC_URI`.
You can use the
```KERNEL_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES>`__
:term:`KERNEL_FEATURES`
variable to include features (configuration fragments, patches, or both)
that are not already included by the ``KMACHINE`` and
``LINUX_KERNEL_TYPE`` variable combination. For example, to include a
@@ -185,7 +185,7 @@ contain "features" as far as the kernel tools are concerned.
Paths used in kernel Metadata files are relative to base, which is
either
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__ if
:term:`FILESEXTRAPATHS` if
you are creating Metadata in `recipe-space <#recipe-space-metadata>`__,
or the top level of
```yocto-kernel-cache`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/>`__
@@ -218,7 +218,7 @@ fragment files in the "`Creating Configuration
Fragments <#creating-config-fragments>`__" section.
Within the ``smp.scc`` file, the
```KFEATURE_DESCRIPTION`` <&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION>`__
:term:`KFEATURE_DESCRIPTION`
statement provides a short description of the fragment. Higher level
kernel tools use this description.
@@ -312,7 +312,7 @@ non-hardware configuration fragments with patches you want to use when
building a Linux kernel of a specific type (e.g. a real-time kernel).
Syntactically, kernel types are no different than features as described
in the "`Features <#features>`__" section. The
```LINUX_KERNEL_TYPE`` <&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE>`__
:term:`LINUX_KERNEL_TYPE`
variable in the kernel recipe selects the kernel type. For example, in
the ``linux-yocto_4.12.bb`` kernel recipe found in
``poky/meta/recipes-kernel/linux``, a
@@ -432,9 +432,9 @@ ktypes/standard/standard.scc branch beaglebone include beaglebone.scc #
default policy for standard kernels include
features/latencytop/latencytop.scc include
features/profiling/profiling.scc Every top-level BSP description file
should define the ```KMACHINE`` <&YOCTO_DOCS_REF_URL;#var-KMACHINE>`__,
```KTYPE`` <&YOCTO_DOCS_REF_URL;#var-KTYPE>`__, and
```KARCH`` <&YOCTO_DOCS_REF_URL;#var-KARCH>`__ variables. These
should define the :term:`KMACHINE`,
:term:`KTYPE`, and
:term:`KARCH` variables. These
variables allow the OpenEmbedded build system to identify the
description as meeting the criteria set by the recipe being built. This
example supports the "beaglebone" machine for the "standard" kernel and
@@ -444,7 +444,7 @@ Be aware that a hard link between the ``KTYPE`` variable and a kernel
type description file does not exist. Thus, if you do not have the
kernel type defined in your kernel Metadata as it is here, you only need
to ensure that the
```LINUX_KERNEL_TYPE`` <&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE>`__
:term:`LINUX_KERNEL_TYPE`
variable in the kernel recipe and the ``KTYPE`` variable in the BSP
description file match.
@@ -529,9 +529,9 @@ with the most basic functionality of the system as defined in the base
"minnow" description file.
Notice again the three critical variables:
```KMACHINE`` <&YOCTO_DOCS_REF_URL;#var-KMACHINE>`__,
```KTYPE`` <&YOCTO_DOCS_REF_URL;#var-KTYPE>`__, and
```KARCH`` <&YOCTO_DOCS_REF_URL;#var-KARCH>`__. Of these variables, only
:term:`KMACHINE`,
:term:`KTYPE`, and
:term:`KARCH`. Of these variables, only
``KTYPE`` has changed to specify the "tiny" kernel type.
Kernel Metadata Location
@@ -564,12 +564,12 @@ Recipe-Space Metadata
When stored in recipe-space, the kernel Metadata files reside in a
directory hierarchy below
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__. For
:term:`FILESEXTRAPATHS`. For
a linux-yocto recipe or for a Linux kernel recipe derived by copying and
modifying
``oe-core/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb`` to
a recipe in your layer, ``FILESEXTRAPATHS`` is typically set to
``${``\ ```THISDIR`` <&YOCTO_DOCS_REF_URL;#var-THISDIR>`__\ ``}/${``\ ```PN`` <&YOCTO_DOCS_REF_URL;#var-PN>`__\ ``}``.
``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}``.
See the "`Modifying an Existing
Recipe <#modifying-an-existing-recipe>`__" section for more information.
@@ -582,10 +582,10 @@ When the Metadata is stored in recipe-space, you must take steps to
ensure BitBake has the necessary information to decide what files to
fetch and when they need to be fetched again. It is only necessary to
specify the ``.scc`` files on the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__. BitBake parses them
:term:`SRC_URI`. BitBake parses them
and fetches any files referenced in the ``.scc`` files by the
``include``, ``patch``, or ``kconf`` commands. Because of this, it is
necessary to bump the recipe ```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__
necessary to bump the recipe :term:`PR`
value when changing the content of files not explicitly listed in the
``SRC_URI``.
@@ -600,7 +600,7 @@ Metadata Outside the Recipe-Space
When stored outside of the recipe-space, the kernel Metadata files
reside in a separate repository. The OpenEmbedded build system adds the
Metadata to the build as a "type=kmeta" repository through the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ variable. As an
:term:`SRC_URI` variable. As an
example, consider the following ``SRC_URI`` statement from the
``linux-yocto_4.12.bb`` kernel recipe: SRC_URI =
"git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH};
@@ -742,10 +742,10 @@ within an SCC description file (``.scc``):
"ref" if specified.
- ``define``: Defines variables, such as
```KMACHINE`` <&YOCTO_DOCS_REF_URL;#var-KMACHINE>`__,
```KTYPE`` <&YOCTO_DOCS_REF_URL;#var-KTYPE>`__,
```KARCH`` <&YOCTO_DOCS_REF_URL;#var-KARCH>`__, and
```KFEATURE_DESCRIPTION`` <&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION>`__.
:term:`KMACHINE`,
:term:`KTYPE`,
:term:`KARCH`, and
:term:`KFEATURE_DESCRIPTION`.
- ``include SCC_FILE``: Includes an SCC file in the current file. The
file is parsed as if you had inserted it inline.

View File

@@ -72,7 +72,7 @@ section:
"poky".
2. *Prepare Your ``local.conf`` File:* By default, the
```MACHINE`` <&YOCTO_DOCS_REF_URL;#var-MACHINE>`__ variable is set to
:term:`MACHINE` variable is set to
"qemux86-64", which is fine if you are building for the QEMU emulator
in 64-bit mode. However, if you are not, you need to set the
``MACHINE`` variable appropriately in your ``conf/local.conf`` file
@@ -82,7 +82,7 @@ section:
Also, since you are preparing to work on the kernel image, you need
to set the
```MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS>`__
:term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
variable to include kernel modules.
In this example we wish to build for qemux86 so we must set the
@@ -115,7 +115,7 @@ section:
4. *Inform the BitBake Build Environment About Your Layer:* As directed
when you created your layer, you need to add the layer to the
```BBLAYERS`` <&YOCTO_DOCS_REF_URL;#var-BBLAYERS>`__ variable in the
:term:`BBLAYERS` variable in the
``bblayers.conf`` file as follows: $ cd ~/poky/build $ bitbake-layers
add-layer ../../meta-mylayer NOTE: Starting bitbake server... $
@@ -236,7 +236,7 @@ section:
"poky".
2. *Prepare Your ``local.conf`` File:* By default, the
```MACHINE`` <&YOCTO_DOCS_REF_URL;#var-MACHINE>`__ variable is set to
:term:`MACHINE` variable is set to
"qemux86-64", which is fine if you are building for the QEMU emulator
in 64-bit mode. However, if you are not, you need to set the
``MACHINE`` variable appropriately in your ``conf/local.conf`` file
@@ -246,7 +246,7 @@ section:
Also, since you are preparing to work on the kernel image, you need
to set the
```MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS>`__
:term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
variable to include kernel modules.
In this example we wish to build for qemux86 so we must set the
@@ -279,7 +279,7 @@ section:
4. *Inform the BitBake Build Environment About Your Layer:* As directed
when you created your layer, you need to add the layer to the
```BBLAYERS`` <&YOCTO_DOCS_REF_URL;#var-BBLAYERS>`__ variable in the
:term:`BBLAYERS` variable in the
``bblayers.conf`` file as follows: $ cd ~/poky/build $ bitbake-layers
add-layer ../../meta-mylayer NOTE: Starting bitbake server ... $
@@ -343,7 +343,7 @@ Creating and Preparing a Layer
If you are going to be modifying kernel recipes, it is recommended that
you create and prepare your own layer in which to do your work. Your
layer contains its own `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__
layer contains its own :term:`BitBake`
append files (``.bbappend``) and provides a convenient mechanism to
create your own recipe files (``.bb``) as well as store and use kernel
patch files. For background information on working with layers, see the
@@ -393,8 +393,8 @@ home directory:
"${THISDIR}/${PN}:" SRC_URI_append = " file://patch-file-one"
SRC_URI_append = " file://patch-file-two" SRC_URI_append = "
file://patch-file-three" The
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
and ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statements
:term:`FILESEXTRAPATHS`
and :term:`SRC_URI` statements
enable the OpenEmbedded build system to find patch files. For more
information on using append files, see the "`Using .bbappend Files in
Your Layer <&YOCTO_DOCS_DEV_URL;#using-bbappend-files>`__" section in
@@ -406,7 +406,7 @@ Modifying an Existing Recipe
In many cases, you can customize an existing linux-yocto recipe to meet
the needs of your project. Each release of the Yocto Project provides a
few Linux kernel recipes from which you can choose. These are located in
the `Source Directory <&YOCTO_DOCS_REF_URL;#source-directory>`__ in
the :term:`Source Directory` in
``meta/recipes-kernel/linux``.
Modifying an existing recipe can consist of the following:
@@ -431,12 +431,12 @@ modifying the ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` recipe,
the append file will typically be located as follows within your custom
layer: your-layer/recipes-kernel/linux/linux-yocto_4.12.bbappend The
append file should initially extend the
```FILESPATH`` <&YOCTO_DOCS_REF_URL;#var-FILESPATH>`__ search path by
:term:`FILESPATH` search path by
prepending the directory that contains your files to the
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
:term:`FILESEXTRAPATHS`
variable as follows: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" The
path
``${``\ ```THISDIR`` <&YOCTO_DOCS_REF_URL;#var-THISDIR>`__\ ``}/${``\ ```PN`` <&YOCTO_DOCS_REF_URL;#var-PN>`__\ ``}``
``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}``
expands to "linux-yocto" in the current directory for this example. If
you add any new files that modify the kernel recipe and you have
extended ``FILESPATH`` as described above, you must place the files in
@@ -472,16 +472,16 @@ COMPATIBLE_MACHINE_beaglebone = "beaglebone" LINUX_VERSION_genericx86 =
= "4.12.10" LINUX_VERSION_beaglebone = "4.12.10" This append file
contains statements used to support several BSPs that ship with the
Yocto Project. The file defines machines using the
```COMPATIBLE_MACHINE`` <&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE>`__
:term:`COMPATIBLE_MACHINE`
variable and uses the
```KMACHINE`` <&YOCTO_DOCS_REF_URL;#var-KMACHINE>`__ variable to ensure
:term:`KMACHINE` variable to ensure
the machine name used by the OpenEmbedded build system maps to the
machine name used by the Linux Yocto kernel. The file also uses the
optional ```KBRANCH`` <&YOCTO_DOCS_REF_URL;#var-KBRANCH>`__ variable to
optional :term:`KBRANCH` variable to
ensure the build process uses the appropriate kernel branch.
Although this particular example does not use it, the
```KERNEL_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES>`__
:term:`KERNEL_FEATURES`
variable could be used to enable features specific to the kernel. The
append file points to specific commits in the `Source
Directory <&YOCTO_DOCS_REF_URL;#source-directory>`__ Git repository and
@@ -497,7 +497,7 @@ accomplish this definition by putting the configurations in a file or a
set of files inside a directory located at the same level as your
kernel's append file and having the same name as the kernel's main
recipe file. With all these conditions met, simply reference those files
in the ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statement in
in the :term:`SRC_URI` statement in
the append file.
For example, suppose you had some configuration options in a file called
@@ -515,7 +515,7 @@ the following in your append file: SRC_URI += "file://myconfig.cfg \\
file://eth.cfg \\ file://gfx.cfg"
Another variable you can use in your kernel recipe append file is the
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
:term:`FILESEXTRAPATHS`
variable. When you use this statement, you are extending the locations
used by the OpenEmbedded system to look for files and patches as the
recipe is processed.
@@ -546,9 +546,9 @@ Applying Patches
If you have a single patch or a small series of patches that you want to
apply to the Linux kernel source, you can do so just as you would with
any other recipe. You first copy the patches to the path added to
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__ in
:term:`FILESEXTRAPATHS` in
your ``.bbappend`` file as described in the previous section, and then
reference them in ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__
reference them in :term:`SRC_URI`
statements.
For example, you can apply a three-patch series by adding the following
@@ -572,7 +572,7 @@ Changing the Configuration
You can make wholesale or incremental changes to the final ``.config``
file used for the eventual Linux kernel configuration by including a
``defconfig`` file and by specifying configuration fragments in the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ to be applied to that
:term:`SRC_URI` to be applied to that
file.
If you have a complete, working Linux kernel ``.config`` file you want
@@ -583,8 +583,8 @@ following lines to the linux-yocto ``.bbappend`` file in your layer:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI +=
"file://defconfig" The ``SRC_URI`` tells the build system how to search
for the file, while the
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
extends the ```FILESPATH`` <&YOCTO_DOCS_REF_URL;#var-FILESPATH>`__
:term:`FILESEXTRAPATHS`
extends the :term:`FILESPATH`
variable (search directories) to include the ``${PN}`` directory you
created to hold the configuration changes.
@@ -631,7 +631,7 @@ looks for ``defconfig`` files in the layer used for Metadata, which is
``defconfig`` files in your layer but would rather allow users to use
the default configuration from the kernel tree and still be able to add
configuration fragments to the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ through, for example,
:term:`SRC_URI` through, for example,
append files, you can direct the OpenEmbedded build system to use a
``defconfig`` file that is "in-tree".
@@ -651,7 +651,7 @@ build system detects a statement that identifies an "out-of-tree"
``KBUILD_DEFCONFIG`` variable.
See the
```KBUILD_DEFCONFIG`` <&YOCTO_DOCS_REF_URL;#var-KBUILD_DEFCONFIG>`__
:term:`KBUILD_DEFCONFIG`
variable description for more information.
Using ``devtool`` to Patch the Kernel
@@ -844,8 +844,8 @@ Section.
addition to your ``local.conf`` file specifying to use
"kernel-modules" and the "qemux86" machine, it must also point to the
updated kernel source files. Add
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ and
```SRCREV`` <&YOCTO_DOCS_REF_URL;#var-SRCREV>`__ statements similar
:term:`SRC_URI` and
:term:`SRCREV` statements similar
to the following to your ``local.conf``: $ cd ~/poky/build/conf Add
the following to the ``local.conf``: SRC_URI_pn-linux-yocto =
"git:///path-to/linux-yocto-4.12;protocol=file;name=machine;branch=standard/base;
@@ -907,8 +907,8 @@ Section.
contents: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = "
file://0001-calibrate.c-Added-some-printk-statements.patch" The
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
and ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statements
:term:`FILESEXTRAPATHS`
and :term:`SRC_URI` statements
enable the OpenEmbedded build system to find the patch file.
For more information on append files and patches, see the "`Creating
@@ -968,16 +968,16 @@ environment, you must do the following:
- Because you launch ``menuconfig`` using BitBake, you must be sure to
set up your environment by running the
````` <&YOCTO_DOCS_REF_URL;#structure-core-script>`__ script found in
the `Build Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__.
the :term:`Build Directory`.
- You must be sure of the state of your build's configuration in the
`Source Directory <&YOCTO_DOCS_REF_URL;#source-directory>`__.
:term:`Source Directory`.
- Your build host must have the following two packages installed:
libncurses5-dev libtinfo-dev
The following commands initialize the BitBake environment, run the
```do_kernel_configme`` <&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme>`__
:ref:`ref-tasks-kernel_configme`
task, and launch ``menuconfig``. These commands assume the Source
Directory's top-level folder is ``~/poky``: $ cd poky $ source
oe-init-build-env $ bitbake linux-yocto -c kernel_configme -f $ bitbake
@@ -1089,17 +1089,17 @@ which the OpenEmbedded build system can draw to create the final
To create a ``defconfig``, start with a complete, working Linux kernel
``.config`` file. Copy that file to the appropriate
``${``\ ```PN`` <&YOCTO_DOCS_REF_URL;#var-PN>`__\ ``}`` directory in
``${``\ :term:`PN`\ ``}`` directory in
your layer's ``recipes-kernel/linux`` directory, and rename the copied
file to "defconfig" (e.g.
``~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig``). Then,
add the following lines to the linux-yocto ``.bbappend`` file in your
layer: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI +=
"file://defconfig" The
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ tells the build
:term:`SRC_URI` tells the build
system how to search for the file, while the
```FILESEXTRAPATHS`` <&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS>`__
extends the ```FILESPATH`` <&YOCTO_DOCS_REF_URL;#var-FILESPATH>`__
:term:`FILESEXTRAPATHS`
extends the :term:`FILESPATH`
variable (search directories) to include the ``${PN}`` directory you
created to hold the configuration changes.
@@ -1179,7 +1179,7 @@ steps:
3. *Create the Configuration Fragment:* Run the ``diffconfig`` command
to prepare a configuration fragment. The resulting file
``fragment.cfg`` is placed in the
``${``\ ```WORKDIR`` <&YOCTO_DOCS_REF_URL;#var-WORKDIR>`__\ ``}``
``${``\ :term:`WORKDIR`\ ``}``
directory: $ bitbake linux-yocto -c diffconfig
The ``diffconfig`` command creates a file that is a list of Linux kernel
@@ -1196,7 +1196,7 @@ information on how to use the output as a configuration fragment.
Where do you put your configuration fragment files? You can place these
files in an area pointed to by
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ as directed by your
:term:`SRC_URI` as directed by your
``bblayers.conf`` file, which is located in your layer. The OpenEmbedded
build system picks up the configuration and adds it to the kernel's
configuration. For example, suppose you had a set of configuration
@@ -1219,7 +1219,7 @@ Validating Configuration
------------------------
You can use the
```do_kernel_configcheck`` <&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck>`__
:ref:`ref-tasks-kernel_configcheck`
task to provide configuration validation: $ bitbake linux-yocto -c
kernel_configcheck -f Running this task produces warnings for when a
requested configuration does not appear in the final ``.config`` file or
@@ -1268,9 +1268,9 @@ The output describes the various problems that you can encounter along
with where to find the offending configuration items. You can use the
information in the logs to adjust your configuration files and then
repeat the
```do_kernel_configme`` <&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme>`__
:ref:`ref-tasks-kernel_configme`
and
```do_kernel_configcheck`` <&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck>`__
:ref:`ref-tasks-kernel_configcheck`
tasks until they produce no warnings.
For more information on how to use the ``menuconfig`` tool, see the
@@ -1395,7 +1395,7 @@ If you cannot work with one of the Linux kernel versions supported by
existing linux-yocto recipes, you can still make use of the Yocto
Project Linux kernel tooling by working with your own sources. When you
use your own sources, you will not be able to leverage the existing
kernel `Metadata <&YOCTO_DOCS_REF_URL;#metadata>`__ and stabilization
kernel :term:`Metadata` and stabilization
work of the linux-yocto sources. However, you will be able to manage
your own Metadata in the same format as the linux-yocto sources.
Maintaining format compatibility facilitates converging with linux-yocto
@@ -1428,7 +1428,7 @@ Here are some basic steps you can use to work with your own sources:
the following: $ make defconfig After running the command, copy the
resulting ``.config`` file to the ``files`` directory in your layer
as "defconfig" and then add it to the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ variable in the
:term:`SRC_URI` variable in the
recipe.
Running the ``make defconfig`` command results in the default
@@ -1445,7 +1445,7 @@ Here are some basic steps you can use to work with your own sources:
4. *Edit the Recipe:* Edit the following variables in your recipe as
appropriate for your project:
- ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__: The
- :term:`SRC_URI`: The
``SRC_URI`` should specify a Git repository that uses one of the
supported Git fetcher protocols (i.e. ``file``, ``git``, ``http``,
and so forth). The ``SRC_URI`` variable should also specify either
@@ -1453,32 +1453,32 @@ Here are some basic steps you can use to work with your own sources:
skeleton recipe provides an example ``SRC_URI`` as a syntax
reference.
- ```LINUX_VERSION`` <&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION>`__:
- :term:`LINUX_VERSION`:
The Linux kernel version you are using (e.g. "4.12").
- ```LINUX_VERSION_EXTENSION`` <&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION>`__:
- :term:`LINUX_VERSION_EXTENSION`:
The Linux kernel ``CONFIG_LOCALVERSION`` that is compiled into the
resulting kernel and visible through the ``uname`` command.
- ```SRCREV`` <&YOCTO_DOCS_REF_URL;#var-SRCREV>`__: The commit ID
- :term:`SRCREV`: The commit ID
from which you want to build.
- ```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__: Treat this variable the
- :term:`PR`: Treat this variable the
same as you would in any other recipe. Increment the variable to
indicate to the OpenEmbedded build system that the recipe has
changed.
- ```PV`` <&YOCTO_DOCS_REF_URL;#var-PV>`__: The default ``PV``
- :term:`PV`: The default ``PV``
assignment is typically adequate. It combines the
``LINUX_VERSION`` with the Source Control Manager (SCM) revision
as derived from the ```SRCPV`` <&YOCTO_DOCS_REF_URL;#var-SRCPV>`__
as derived from the :term:`SRCPV`
variable. The combined results are a string with the following
form:
3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
While lengthy, the extra verbosity in ``PV`` helps ensure you are
using the exact sources from which you intend to build.
- ```COMPATIBLE_MACHINE`` <&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE>`__:
- :term:`COMPATIBLE_MACHINE`:
A list of the machines supported by your new recipe. This variable
in the example recipe is set by default to a regular expression
that matches only the empty string, "(^$)". This default setting
@@ -1546,13 +1546,13 @@ or other files necessary for building the module that do not come with
the sources. Finally, update the recipe as needed for the module.
Typically, you will need to set the following variables:
- ```DESCRIPTION`` <&YOCTO_DOCS_REF_URL;#var-DESCRIPTION>`__
- :term:`DESCRIPTION`
- ```LICENSE*`` <&YOCTO_DOCS_REF_URL;#var-LICENSE>`__
- ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__
- :term:`SRC_URI`
- ```PV`` <&YOCTO_DOCS_REF_URL;#var-PV>`__
- :term:`PV`
Depending on the build system used by the module sources, you might need
to make some adjustments. For example, a typical module ``Makefile``
@@ -1561,14 +1561,14 @@ looks much like the one provided with the ``hello-mod`` template: obj-m
modules_install: $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install ...
The important point to note here is the
```KERNEL_SRC`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_SRC>`__ variable. The
```module`` <&YOCTO_DOCS_REF_URL;#ref-classes-module>`__ class sets this
:term:`KERNEL_SRC` variable. The
:ref:`module <ref-classes-module>` class sets this
variable and the
```KERNEL_PATH`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_PATH>`__ variable to
:term:`KERNEL_PATH` variable to
``${STAGING_KERNEL_DIR}`` with the necessary Linux kernel build
information to build modules. If your module ``Makefile`` uses a
different variable, you might want to override the
```do_compile`` <&YOCTO_DOCS_REF_URL;#ref-tasks-compile>`__ step, or
:ref:`ref-tasks-compile` step, or
create a patch to the ``Makefile`` to work with the more typical
``KERNEL_SRC`` or ``KERNEL_PATH`` variables.
@@ -1577,13 +1577,13 @@ module in your images. To do this, see the documentation for the
following variables in the Yocto Project Reference Manual and set one of
them appropriately for your machine configuration file:
- ```MACHINE_ESSENTIAL_EXTRA_RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS>`__
- :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
- ```MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS>`__
- :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
- ```MACHINE_EXTRA_RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS>`__
- :term:`MACHINE_EXTRA_RDEPENDS`
- ```MACHINE_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS>`__
- :term:`MACHINE_EXTRA_RRECOMMENDS`
Modules are often not required for boot and can be excluded from certain
build configurations. The following allows for the most flexibility:
@@ -1592,8 +1592,8 @@ derived by appending the module filename without the ``.ko`` extension
to the string "kernel-module-".
Because the variable is
```RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS>`__ and not a
```RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-RDEPENDS>`__ variable, the build
:term:`RRECOMMENDS` and not a
:term:`RDEPENDS` variable, the build
will not fail if this module is not available to include in the image.
Inspecting Changes and Commits
@@ -1661,9 +1661,9 @@ Adding Recipe-Space Kernel Features
You can add kernel features in the
`recipe-space <#recipe-space-metadata>`__ by using the
```KERNEL_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES>`__
:term:`KERNEL_FEATURES`
variable and by specifying the feature's ``.scc`` file path in the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statement. When you
:term:`SRC_URI` statement. When you
add features using this method, the OpenEmbedded build system checks to
be sure the features are present. If the features are not present, the
build stops. Kernel features are the last elements processed for

View File

@@ -313,7 +313,7 @@ The temporary kernel source files resulting from a build using BitBake
have a particular hierarchy. When you build the kernel on your
development system, all files needed for the build are taken from the
source repositories pointed to by the
```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ variable and gathered
:term:`SRC_URI` variable and gathered
in a temporary work area where they are subsequently used to create the
unique kernel. Thus, in a sense, the process constructs a local source
tree specific to your kernel from which to generate the new kernel

View File

@@ -28,12 +28,12 @@ append file to override metadata. How do I install a specific kernel
module? Linux kernel modules are packaged individually. To ensure a
specific kernel module is included in an image, include it in the
appropriate machine
```RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS>`__ variable.
:term:`RRECOMMENDS` variable.
These other variables are useful for installing specific modules:
```MACHINE_ESSENTIAL_EXTRA_RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS>`__
```MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS>`__
```MACHINE_EXTRA_RDEPENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS>`__
```MACHINE_EXTRA_RRECOMMENDS`` <&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS>`__
:term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
:term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
:term:`MACHINE_EXTRA_RDEPENDS`
:term:`MACHINE_EXTRA_RRECOMMENDS`
For example, set the following in the ``qemux86.conf`` file to include
the ``ab123`` kernel modules with images built for the ``qemux86``
machine: MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123" For more

View File

@@ -13,7 +13,7 @@ Regardless of how you intend to make use of the Yocto Project, chances
are you will work with the Linux kernel. This manual describes how to
set up your build host to support kernel development, introduces the
kernel development process, provides background information on the Yocto
Linux kernel `Metadata <&YOCTO_DOCS_REF_URL;#metadata>`__, describes
Linux kernel :term:`Metadata`, describes
common tasks you can perform using the kernel tools, shows you how to
use the kernel Metadata needed to work with the kernel inside the Yocto
Project, and provides insight into how the Yocto Project team develops

View File

@@ -111,7 +111,7 @@ patch, or BSP:
4. *Append Extra Features:* Extra features are appended to the top-level
feature description. These features can come from the
```KERNEL_FEATURES`` <&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES>`__
:term:`KERNEL_FEATURES`
variable in recipes.
5. *Locate, Expand, and Append Each Feature:* Each extra feature is
@@ -172,7 +172,7 @@ can consider the compilation phase of kernel development, which is
building a kernel image. Some prerequisites exist that are validated by
the build process before compilation starts:
- The ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ points to the
- The :term:`SRC_URI` points to the
kernel Git repository.
- A BSP build branch with Metadata exists in the ``yocto-kernel-cache``