diff options
Diffstat (limited to 'documentation/kernel-dev/common.rst')
-rw-r--r-- | documentation/kernel-dev/common.rst | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst index 0cee503346..654c4e0a01 100644 --- a/documentation/kernel-dev/common.rst +++ b/documentation/kernel-dev/common.rst | |||
@@ -315,11 +315,7 @@ home directory: | |||
315 | 315 | ||
316 | #. *Create Structure*: Create the layer's structure:: | 316 | #. *Create Structure*: Create the layer's structure:: |
317 | 317 | ||
318 | $ mkdir meta-mylayer | 318 | $ mkdir -p meta-mylayer/conf meta-mylayer/recipes-kernel/linux/linux-yocto |
319 | $ mkdir meta-mylayer/conf | ||
320 | $ mkdir meta-mylayer/recipes-kernel | ||
321 | $ mkdir meta-mylayer/recipes-kernel/linux | ||
322 | $ mkdir meta-mylayer/recipes-kernel/linux/linux-yocto | ||
323 | 319 | ||
324 | The ``conf`` directory holds your configuration files, while the | 320 | The ``conf`` directory holds your configuration files, while the |
325 | ``recipes-kernel`` directory holds your append file and eventual | 321 | ``recipes-kernel`` directory holds your append file and eventual |
@@ -676,7 +672,7 @@ The steps in this procedure show you how you can patch the kernel using | |||
676 | 672 | ||
677 | Before attempting this procedure, be sure you have performed the | 673 | Before attempting this procedure, be sure you have performed the |
678 | steps to get ready for updating the kernel as described in the | 674 | steps to get ready for updating the kernel as described in the |
679 | ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" | 675 | ":ref:`kernel-dev/common:getting ready to develop using ``devtool```" |
680 | section. | 676 | section. |
681 | 677 | ||
682 | Patching the kernel involves changing or adding configurations to an | 678 | Patching the kernel involves changing or adding configurations to an |
@@ -689,7 +685,7 @@ output at boot time through ``printk`` statements in the kernel's | |||
689 | ``calibrate.c`` source code file. Applying the patch and booting the | 685 | ``calibrate.c`` source code file. Applying the patch and booting the |
690 | modified image causes the added messages to appear on the emulator's | 686 | modified image causes the added messages to appear on the emulator's |
691 | console. The example is a continuation of the setup procedure found in | 687 | console. The example is a continuation of the setup procedure found in |
692 | the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Section. | 688 | the ":ref:`kernel-dev/common:getting ready to develop using ``devtool```" Section. |
693 | 689 | ||
694 | #. *Check Out the Kernel Source Files:* First you must use ``devtool`` | 690 | #. *Check Out the Kernel Source Files:* First you must use ``devtool`` |
695 | to checkout the kernel source code in its workspace. | 691 | to checkout the kernel source code in its workspace. |
@@ -697,7 +693,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
697 | .. note:: | 693 | .. note:: |
698 | 694 | ||
699 | See this step in the | 695 | See this step in the |
700 | ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" | 696 | ":ref:`kernel-dev/common:getting ready to develop using ``devtool```" |
701 | section for more information. | 697 | section for more information. |
702 | 698 | ||
703 | Use the following ``devtool`` command to check out the code:: | 699 | Use the following ``devtool`` command to check out the code:: |
@@ -808,7 +804,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
808 | .. note:: | 804 | .. note:: |
809 | 805 | ||
810 | See Step 3 of the | 806 | See Step 3 of the |
811 | ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" | 807 | ":ref:`kernel-dev/common:getting ready to develop using ``devtool```" |
812 | section for information on setting up this layer. | 808 | section for information on setting up this layer. |
813 | 809 | ||
814 | Once the command | 810 | Once the command |
@@ -964,9 +960,7 @@ Section. | |||
964 | additional structure to your layer using the following commands:: | 960 | additional structure to your layer using the following commands:: |
965 | 961 | ||
966 | $ cd ~/meta-mylayer | 962 | $ cd ~/meta-mylayer |
967 | $ mkdir recipes-kernel | 963 | $ mkdir -p recipes-kernel recipes-kernel/linux/linux-yocto |
968 | $ mkdir recipes-kernel/linux | ||
969 | $ mkdir recipes-kernel/linux/linux-yocto | ||
970 | 964 | ||
971 | Once you have created this | 965 | Once you have created this |
972 | hierarchy in your layer, you can move the patch file using the | 966 | hierarchy in your layer, you can move the patch file using the |
@@ -1196,7 +1190,7 @@ appear in the ``.config`` file, which is in the :term:`Build Directory`. | |||
1196 | 1190 | ||
1197 | For more information about where the ``.config`` file is located, see the | 1191 | For more information about where the ``.config`` file is located, see the |
1198 | example in the | 1192 | example in the |
1199 | ":ref:`kernel-dev/common:using \`\`menuconfig\`\``" | 1193 | ":ref:`kernel-dev/common:using ``menuconfig```" |
1200 | section. | 1194 | section. |
1201 | 1195 | ||
1202 | It is simple to create a configuration fragment. One method is to use | 1196 | It is simple to create a configuration fragment. One method is to use |
@@ -1292,7 +1286,7 @@ when you override a policy configuration in a hardware configuration | |||
1292 | fragment. | 1286 | fragment. |
1293 | 1287 | ||
1294 | In order to run this task, you must have an existing ``.config`` file. | 1288 | In order to run this task, you must have an existing ``.config`` file. |
1295 | See the ":ref:`kernel-dev/common:using \`\`menuconfig\`\``" section for | 1289 | See the ":ref:`kernel-dev/common:using ``menuconfig```" section for |
1296 | information on how to create a configuration file. | 1290 | information on how to create a configuration file. |
1297 | 1291 | ||
1298 | Here is sample output from the :ref:`ref-tasks-kernel_configcheck` task: | 1292 | Here is sample output from the :ref:`ref-tasks-kernel_configcheck` task: |
@@ -1365,7 +1359,7 @@ and | |||
1365 | tasks until they produce no warnings. | 1359 | tasks until they produce no warnings. |
1366 | 1360 | ||
1367 | For more information on how to use the ``menuconfig`` tool, see the | 1361 | For more information on how to use the ``menuconfig`` tool, see the |
1368 | :ref:`kernel-dev/common:using \`\`menuconfig\`\`` section. | 1362 | :ref:`kernel-dev/common:using ``menuconfig``` section. |
1369 | 1363 | ||
1370 | Fine-Tuning the Kernel Configuration File | 1364 | Fine-Tuning the Kernel Configuration File |
1371 | ----------------------------------------- | 1365 | ----------------------------------------- |
@@ -1568,16 +1562,9 @@ Here are some basic steps you can use to work with your own sources: | |||
1568 | changed. | 1562 | changed. |
1569 | 1563 | ||
1570 | - :term:`PV`: The default :term:`PV` | 1564 | - :term:`PV`: The default :term:`PV` |
1571 | assignment is typically adequate. It combines the | 1565 | assignment is typically adequate. It combines the value of |
1572 | :term:`LINUX_VERSION` with the Source Control Manager (SCM) revision | 1566 | :term:`LINUX_VERSION` and the value ``+git`` which adds source control |
1573 | as derived from the :term:`SRCPV` | 1567 | information to :term:`PKGV` later during the packaging phase. |
1574 | variable. The combined results are a string with the following | ||
1575 | form:: | ||
1576 | |||
1577 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 | ||
1578 | |||
1579 | While lengthy, the extra verbosity in :term:`PV` helps ensure you are | ||
1580 | using the exact sources from which you intend to build. | ||
1581 | 1568 | ||
1582 | - :term:`COMPATIBLE_MACHINE`: | 1569 | - :term:`COMPATIBLE_MACHINE`: |
1583 | A list of the machines supported by your new recipe. This variable | 1570 | A list of the machines supported by your new recipe. This variable |
@@ -1674,10 +1661,10 @@ looks much like the one provided with the ``hello-mod`` template:: | |||
1674 | SRC := $(shell pwd) | 1661 | SRC := $(shell pwd) |
1675 | 1662 | ||
1676 | all: | 1663 | all: |
1677 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) | 1664 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) |
1678 | 1665 | ||
1679 | modules_install: | 1666 | modules_install: |
1680 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install | 1667 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install |
1681 | ... | 1668 | ... |
1682 | 1669 | ||
1683 | The important point to note here is the :term:`KERNEL_SRC` variable. The | 1670 | The important point to note here is the :term:`KERNEL_SRC` variable. The |