summaryrefslogtreecommitdiffstats
path: root/documentation/kernel-dev/common.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/kernel-dev/common.rst')
-rw-r--r--documentation/kernel-dev/common.rst52
1 files changed, 26 insertions, 26 deletions
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst
index f64cbab56c..de62df5b1f 100644
--- a/documentation/kernel-dev/common.rst
+++ b/documentation/kernel-dev/common.rst
@@ -70,7 +70,7 @@ section:
70 :term:`MACHINE` variable is set to 70 :term:`MACHINE` variable is set to
71 "qemux86-64", which is fine if you are building for the QEMU emulator 71 "qemux86-64", which is fine if you are building for the QEMU emulator
72 in 64-bit mode. However, if you are not, you need to set the 72 in 64-bit mode. However, if you are not, you need to set the
73 ``MACHINE`` variable appropriately in your ``conf/local.conf`` file 73 :term:`MACHINE` variable appropriately in your ``conf/local.conf`` file
74 found in the 74 found in the
75 :term:`Build Directory` (i.e. 75 :term:`Build Directory` (i.e.
76 ``poky/build`` in this example). 76 ``poky/build`` in this example).
@@ -248,7 +248,7 @@ section:
248 :term:`MACHINE` variable is set to 248 :term:`MACHINE` variable is set to
249 "qemux86-64", which is fine if you are building for the QEMU emulator 249 "qemux86-64", which is fine if you are building for the QEMU emulator
250 in 64-bit mode. However, if you are not, you need to set the 250 in 64-bit mode. However, if you are not, you need to set the
251 ``MACHINE`` variable appropriately in your ``conf/local.conf`` file 251 :term:`MACHINE` variable appropriately in your ``conf/local.conf`` file
252 found in the 252 found in the
253 :term:`Build Directory` (i.e. 253 :term:`Build Directory` (i.e.
254 ``poky/build`` in this example). 254 ``poky/build`` in this example).
@@ -474,7 +474,7 @@ variable as follows::
474The path ``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}`` 474The path ``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}``
475expands to "linux-yocto" in the current directory for this example. If 475expands to "linux-yocto" in the current directory for this example. If
476you add any new files that modify the kernel recipe and you have 476you add any new files that modify the kernel recipe and you have
477extended ``FILESPATH`` as described above, you must place the files in 477extended :term:`FILESPATH` as described above, you must place the files in
478your layer in the following area:: 478your layer in the following area::
479 479
480 your-layer/recipes-kernel/linux/linux-yocto/ 480 your-layer/recipes-kernel/linux/linux-yocto/
@@ -553,7 +553,7 @@ the append file.
553 553
554For example, suppose you had some configuration options in a file called 554For example, suppose you had some configuration options in a file called
555``network_configs.cfg``. You can place that file inside a directory 555``network_configs.cfg``. You can place that file inside a directory
556named ``linux-yocto`` and then add a ``SRC_URI`` statement such as the 556named ``linux-yocto`` and then add a :term:`SRC_URI` statement such as the
557following to the append file. When the OpenEmbedded build system builds 557following to the append file. When the OpenEmbedded build system builds
558the kernel, the configuration options are picked up and applied. 558the kernel, the configuration options are picked up and applied.
559:: 559::
@@ -563,7 +563,7 @@ the kernel, the configuration options are picked up and applied.
563To group related configurations into multiple files, you perform a 563To group related configurations into multiple files, you perform a
564similar procedure. Here is an example that groups separate 564similar procedure. Here is an example that groups separate
565configurations specifically for Ethernet and graphics into their own 565configurations specifically for Ethernet and graphics into their own
566files and adds the configurations by using a ``SRC_URI`` statement like 566files and adds the configurations by using a :term:`SRC_URI` statement like
567the following in your append file:: 567the following in your append file::
568 568
569 SRC_URI += "file://myconfig.cfg \ 569 SRC_URI += "file://myconfig.cfg \
@@ -643,7 +643,7 @@ following lines to the linux-yocto ``.bbappend`` file in your layer::
643 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 643 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
644 SRC_URI += "file://defconfig" 644 SRC_URI += "file://defconfig"
645 645
646The ``SRC_URI`` tells the build system how to search 646The :term:`SRC_URI` tells the build system how to search
647for the file, while the 647for the file, while the
648:term:`FILESEXTRAPATHS` 648:term:`FILESEXTRAPATHS`
649extends the :term:`FILESPATH` 649extends the :term:`FILESPATH`
@@ -684,7 +684,7 @@ with the following content (without indentation)::
684 CONFIG_SERIAL_CORE_CONSOLE=y 684 CONFIG_SERIAL_CORE_CONSOLE=y
685 685
686Next, include this 686Next, include this
687configuration fragment and extend the ``FILESPATH`` variable in your 687configuration fragment and extend the :term:`FILESPATH` variable in your
688``.bbappend`` file:: 688``.bbappend`` file::
689 689
690 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 690 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -722,7 +722,7 @@ form::
722 KBUILD_DEFCONFIG_KMACHINE ?= "defconfig_file" 722 KBUILD_DEFCONFIG_KMACHINE ?= "defconfig_file"
723 723
724Here is an example 724Here is an example
725that assigns the ``KBUILD_DEFCONFIG`` variable based on "raspberrypi2" 725that assigns the :term:`KBUILD_DEFCONFIG` variable based on "raspberrypi2"
726and provides the path to the "in-tree" ``defconfig`` file to be used for 726and provides the path to the "in-tree" ``defconfig`` file to be used for
727a Raspberry Pi 2, which is based on the Broadcom 2708/2709 chipset:: 727a Raspberry Pi 2, which is based on the Broadcom 2708/2709 chipset::
728 728
@@ -734,7 +734,7 @@ Aside from modifying your kernel recipe and providing your own
734a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the 734a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the
735build system detects a statement that identifies an "out-of-tree" 735build system detects a statement that identifies an "out-of-tree"
736``defconfig`` file, that statement will override your 736``defconfig`` file, that statement will override your
737``KBUILD_DEFCONFIG`` variable. 737:term:`KBUILD_DEFCONFIG` variable.
738 738
739See the 739See the
740:term:`KBUILD_DEFCONFIG` 740:term:`KBUILD_DEFCONFIG`
@@ -1349,10 +1349,10 @@ be picked up and applied when the kernel is built::
1349 SRC_URI += "file://myconfig.cfg" 1349 SRC_URI += "file://myconfig.cfg"
1350 1350
1351As mentioned earlier, you can group related configurations into multiple 1351As mentioned earlier, you can group related configurations into multiple
1352files and name them all in the ``SRC_URI`` statement as well. For 1352files and name them all in the :term:`SRC_URI` statement as well. For
1353example, you could group separate configurations specifically for 1353example, you could group separate configurations specifically for
1354Ethernet and graphics into their own files and add those by using a 1354Ethernet and graphics into their own files and add those by using a
1355``SRC_URI`` statement like the following in your append file:: 1355:term:`SRC_URI` statement like the following in your append file::
1356 1356
1357 SRC_URI += "file://myconfig.cfg \ 1357 SRC_URI += "file://myconfig.cfg \
1358 file://eth.cfg \ 1358 file://eth.cfg \
@@ -1628,11 +1628,11 @@ Here are some basic steps you can use to work with your own sources:
1628 appropriate for your project: 1628 appropriate for your project:
1629 1629
1630 - :term:`SRC_URI`: The 1630 - :term:`SRC_URI`: The
1631 ``SRC_URI`` should specify a Git repository that uses one of the 1631 :term:`SRC_URI` should specify a Git repository that uses one of the
1632 supported Git fetcher protocols (i.e. ``file``, ``git``, ``http``, 1632 supported Git fetcher protocols (i.e. ``file``, ``git``, ``http``,
1633 and so forth). The ``SRC_URI`` variable should also specify either 1633 and so forth). The :term:`SRC_URI` variable should also specify either
1634 a ``defconfig`` file or some configuration fragment files. The 1634 a ``defconfig`` file or some configuration fragment files. The
1635 skeleton recipe provides an example ``SRC_URI`` as a syntax 1635 skeleton recipe provides an example :term:`SRC_URI` as a syntax
1636 reference. 1636 reference.
1637 1637
1638 - :term:`LINUX_VERSION`: 1638 - :term:`LINUX_VERSION`:
@@ -1650,16 +1650,16 @@ Here are some basic steps you can use to work with your own sources:
1650 indicate to the OpenEmbedded build system that the recipe has 1650 indicate to the OpenEmbedded build system that the recipe has
1651 changed. 1651 changed.
1652 1652
1653 - :term:`PV`: The default ``PV`` 1653 - :term:`PV`: The default :term:`PV`
1654 assignment is typically adequate. It combines the 1654 assignment is typically adequate. It combines the
1655 ``LINUX_VERSION`` with the Source Control Manager (SCM) revision 1655 :term:`LINUX_VERSION` with the Source Control Manager (SCM) revision
1656 as derived from the :term:`SRCPV` 1656 as derived from the :term:`SRCPV`
1657 variable. The combined results are a string with the following 1657 variable. The combined results are a string with the following
1658 form:: 1658 form::
1659 1659
1660 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 1660 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
1661 1661
1662 While lengthy, the extra verbosity in ``PV`` helps ensure you are 1662 While lengthy, the extra verbosity in :term:`PV` helps ensure you are
1663 using the exact sources from which you intend to build. 1663 using the exact sources from which you intend to build.
1664 1664
1665 - :term:`COMPATIBLE_MACHINE`: 1665 - :term:`COMPATIBLE_MACHINE`:
@@ -1773,7 +1773,7 @@ information to build modules. If your module ``Makefile`` uses a
1773different variable, you might want to override the 1773different variable, you might want to override the
1774:ref:`ref-tasks-compile` step, or 1774:ref:`ref-tasks-compile` step, or
1775create a patch to the ``Makefile`` to work with the more typical 1775create a patch to the ``Makefile`` to work with the more typical
1776``KERNEL_SRC`` or ``KERNEL_PATH`` variables. 1776:term:`KERNEL_SRC` or :term:`KERNEL_PATH` variables.
1777 1777
1778After you have prepared your recipe, you will likely want to include the 1778After you have prepared your recipe, you will likely want to include the
1779module in your images. To do this, see the documentation for the 1779module in your images. To do this, see the documentation for the
@@ -1886,23 +1886,23 @@ build stops. Kernel features are the last elements processed for
1886configuring and patching the kernel. Therefore, adding features in this 1886configuring and patching the kernel. Therefore, adding features in this
1887manner is a way to enforce specific features are present and enabled 1887manner is a way to enforce specific features are present and enabled
1888without needing to do a full audit of any other layer's additions to the 1888without needing to do a full audit of any other layer's additions to the
1889``SRC_URI`` statement. 1889:term:`SRC_URI` statement.
1890 1890
1891You add a kernel feature by providing the feature as part of the 1891You add a kernel feature by providing the feature as part of the
1892``KERNEL_FEATURES`` variable and by providing the path to the feature's 1892:term:`KERNEL_FEATURES` variable and by providing the path to the feature's
1893``.scc`` file, which is relative to the root of the kernel Metadata. The 1893``.scc`` file, which is relative to the root of the kernel Metadata. The
1894OpenEmbedded build system searches all forms of kernel Metadata on the 1894OpenEmbedded build system searches all forms of kernel Metadata on the
1895``SRC_URI`` statement regardless of whether the Metadata is in the 1895:term:`SRC_URI` statement regardless of whether the Metadata is in the
1896"kernel-cache", system kernel Metadata, or a recipe-space Metadata (i.e. 1896"kernel-cache", system kernel Metadata, or a recipe-space Metadata (i.e.
1897part of the kernel recipe). See the 1897part of the kernel recipe). See the
1898":ref:`kernel-dev/advanced:kernel metadata location`" section for 1898":ref:`kernel-dev/advanced:kernel metadata location`" section for
1899additional information. 1899additional information.
1900 1900
1901When you specify the feature's ``.scc`` file on the ``SRC_URI`` 1901When you specify the feature's ``.scc`` file on the :term:`SRC_URI`
1902statement, the OpenEmbedded build system adds the directory of that 1902statement, the OpenEmbedded build system adds the directory of that
1903``.scc`` file along with all its subdirectories to the kernel feature 1903``.scc`` file along with all its subdirectories to the kernel feature
1904search path. Because subdirectories are searched, you can reference a 1904search path. Because subdirectories are searched, you can reference a
1905single ``.scc`` file in the ``SRC_URI`` statement to reference multiple 1905single ``.scc`` file in the :term:`SRC_URI` statement to reference multiple
1906kernel features. 1906kernel features.
1907 1907
1908Consider the following example that adds the "test.scc" feature to the 1908Consider the following example that adds the "test.scc" feature to the
@@ -1910,7 +1910,7 @@ build.
1910 1910
19111. *Create the Feature File:* Create a ``.scc`` file and locate it just 19111. *Create the Feature File:* Create a ``.scc`` file and locate it just
1912 as you would any other patch file, ``.cfg`` file, or fetcher item you 1912 as you would any other patch file, ``.cfg`` file, or fetcher item you
1913 specify in the ``SRC_URI`` statement. 1913 specify in the :term:`SRC_URI` statement.
1914 1914
1915 .. note:: 1915 .. note::
1916 1916
@@ -1937,7 +1937,7 @@ build.
1937 a similarly named configuration fragment file ``test.cfg``. 1937 a similarly named configuration fragment file ``test.cfg``.
1938 1938
19392. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the 19392. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the
1940 recipe's ``SRC_URI`` statement:: 1940 recipe's :term:`SRC_URI` statement::
1941 1941
1942 SRC_URI_append = " file://test.scc" 1942 SRC_URI_append = " file://test.scc"
1943 1943
@@ -1945,7 +1945,7 @@ build.
1945 appended to the existing path. 1945 appended to the existing path.
1946 1946
19473. *Specify the Feature as a Kernel Feature:* Use the 19473. *Specify the Feature as a Kernel Feature:* Use the
1948 ``KERNEL_FEATURES`` statement to specify the feature as a kernel 1948 :term:`KERNEL_FEATURES` statement to specify the feature as a kernel
1949 feature:: 1949 feature::
1950 1950
1951 KERNEL_FEATURES_append = " test.scc" 1951 KERNEL_FEATURES_append = " test.scc"