diff options
Diffstat (limited to 'documentation/kernel-dev/common.rst')
| -rw-r--r-- | documentation/kernel-dev/common.rst | 52 |
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:: | |||
| 474 | The path ``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}`` | 474 | The path ``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}`` |
| 475 | expands to "linux-yocto" in the current directory for this example. If | 475 | expands to "linux-yocto" in the current directory for this example. If |
| 476 | you add any new files that modify the kernel recipe and you have | 476 | you add any new files that modify the kernel recipe and you have |
| 477 | extended ``FILESPATH`` as described above, you must place the files in | 477 | extended :term:`FILESPATH` as described above, you must place the files in |
| 478 | your layer in the following area:: | 478 | your 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 | ||
| 554 | For example, suppose you had some configuration options in a file called | 554 | For 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 |
| 556 | named ``linux-yocto`` and then add a ``SRC_URI`` statement such as the | 556 | named ``linux-yocto`` and then add a :term:`SRC_URI` statement such as the |
| 557 | following to the append file. When the OpenEmbedded build system builds | 557 | following to the append file. When the OpenEmbedded build system builds |
| 558 | the kernel, the configuration options are picked up and applied. | 558 | the 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. | |||
| 563 | To group related configurations into multiple files, you perform a | 563 | To group related configurations into multiple files, you perform a |
| 564 | similar procedure. Here is an example that groups separate | 564 | similar procedure. Here is an example that groups separate |
| 565 | configurations specifically for Ethernet and graphics into their own | 565 | configurations specifically for Ethernet and graphics into their own |
| 566 | files and adds the configurations by using a ``SRC_URI`` statement like | 566 | files and adds the configurations by using a :term:`SRC_URI` statement like |
| 567 | the following in your append file:: | 567 | the 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 | ||
| 646 | The ``SRC_URI`` tells the build system how to search | 646 | The :term:`SRC_URI` tells the build system how to search |
| 647 | for the file, while the | 647 | for the file, while the |
| 648 | :term:`FILESEXTRAPATHS` | 648 | :term:`FILESEXTRAPATHS` |
| 649 | extends the :term:`FILESPATH` | 649 | extends 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 | ||
| 686 | Next, include this | 686 | Next, include this |
| 687 | configuration fragment and extend the ``FILESPATH`` variable in your | 687 | configuration 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 | ||
| 724 | Here is an example | 724 | Here is an example |
| 725 | that assigns the ``KBUILD_DEFCONFIG`` variable based on "raspberrypi2" | 725 | that assigns the :term:`KBUILD_DEFCONFIG` variable based on "raspberrypi2" |
| 726 | and provides the path to the "in-tree" ``defconfig`` file to be used for | 726 | and provides the path to the "in-tree" ``defconfig`` file to be used for |
| 727 | a Raspberry Pi 2, which is based on the Broadcom 2708/2709 chipset:: | 727 | a 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 | |||
| 734 | a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the | 734 | a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the |
| 735 | build system detects a statement that identifies an "out-of-tree" | 735 | build 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 | ||
| 739 | See the | 739 | See 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 | ||
| 1351 | As mentioned earlier, you can group related configurations into multiple | 1351 | As mentioned earlier, you can group related configurations into multiple |
| 1352 | files and name them all in the ``SRC_URI`` statement as well. For | 1352 | files and name them all in the :term:`SRC_URI` statement as well. For |
| 1353 | example, you could group separate configurations specifically for | 1353 | example, you could group separate configurations specifically for |
| 1354 | Ethernet and graphics into their own files and add those by using a | 1354 | Ethernet 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 | |||
| 1773 | different variable, you might want to override the | 1773 | different variable, you might want to override the |
| 1774 | :ref:`ref-tasks-compile` step, or | 1774 | :ref:`ref-tasks-compile` step, or |
| 1775 | create a patch to the ``Makefile`` to work with the more typical | 1775 | create 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 | ||
| 1778 | After you have prepared your recipe, you will likely want to include the | 1778 | After you have prepared your recipe, you will likely want to include the |
| 1779 | module in your images. To do this, see the documentation for the | 1779 | module 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 | |||
| 1886 | configuring and patching the kernel. Therefore, adding features in this | 1886 | configuring and patching the kernel. Therefore, adding features in this |
| 1887 | manner is a way to enforce specific features are present and enabled | 1887 | manner is a way to enforce specific features are present and enabled |
| 1888 | without needing to do a full audit of any other layer's additions to the | 1888 | without 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 | ||
| 1891 | You add a kernel feature by providing the feature as part of the | 1891 | You 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 |
| 1894 | OpenEmbedded build system searches all forms of kernel Metadata on the | 1894 | OpenEmbedded 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. |
| 1897 | part of the kernel recipe). See the | 1897 | part 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 |
| 1899 | additional information. | 1899 | additional information. |
| 1900 | 1900 | ||
| 1901 | When you specify the feature's ``.scc`` file on the ``SRC_URI`` | 1901 | When you specify the feature's ``.scc`` file on the :term:`SRC_URI` |
| 1902 | statement, the OpenEmbedded build system adds the directory of that | 1902 | statement, 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 |
| 1904 | search path. Because subdirectories are searched, you can reference a | 1904 | search path. Because subdirectories are searched, you can reference a |
| 1905 | single ``.scc`` file in the ``SRC_URI`` statement to reference multiple | 1905 | single ``.scc`` file in the :term:`SRC_URI` statement to reference multiple |
| 1906 | kernel features. | 1906 | kernel features. |
| 1907 | 1907 | ||
| 1908 | Consider the following example that adds the "test.scc" feature to the | 1908 | Consider the following example that adds the "test.scc" feature to the |
| @@ -1910,7 +1910,7 @@ build. | |||
| 1910 | 1910 | ||
| 1911 | 1. *Create the Feature File:* Create a ``.scc`` file and locate it just | 1911 | 1. *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 | ||
| 1939 | 2. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the | 1939 | 2. *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 | ||
| 1947 | 3. *Specify the Feature as a Kernel Feature:* Use the | 1947 | 3. *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" |
