diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2022-12-09 19:01:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-18 10:41:21 +0000 |
commit | 6846d4d00bc3a9d4e188ad9c8cfdf6e45cd1ba06 (patch) | |
tree | 6a59e9936ac9f2ca063d4fc8a5c4d9ecc9492769 /documentation/kernel-dev | |
parent | 474e071608c7c1c97e9dafde810aef5630c716e7 (diff) | |
download | poky-6846d4d00bc3a9d4e188ad9c8cfdf6e45cd1ba06.tar.gz |
manuals: define proper numbered lists
Using "#." instead of "1.", "2.", "3.", etc.
(From yocto-docs rev: 11c2585acd0fa6c330702af2359ce5a9e47cde1f)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev')
-rw-r--r-- | documentation/kernel-dev/common.rst | 110 | ||||
-rw-r--r-- | documentation/kernel-dev/intro.rst | 10 | ||||
-rw-r--r-- | documentation/kernel-dev/maint-appx.rst | 16 |
3 files changed, 68 insertions, 68 deletions
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst index c4c1f629a6..fd00a9d1dc 100644 --- a/documentation/kernel-dev/common.rst +++ b/documentation/kernel-dev/common.rst | |||
@@ -52,7 +52,7 @@ image and ready to make modifications as described in the | |||
52 | ":ref:`kernel-dev/common:using \`\`devtool\`\` to patch the kernel`" | 52 | ":ref:`kernel-dev/common:using \`\`devtool\`\` to patch the kernel`" |
53 | section: | 53 | section: |
54 | 54 | ||
55 | 1. *Initialize the BitBake Environment:* | 55 | #. *Initialize the BitBake Environment:* |
56 | you need to initialize the BitBake build environment by sourcing | 56 | you need to initialize the BitBake build environment by sourcing |
57 | the build environment script (i.e. :ref:`structure-core-script`):: | 57 | the build environment script (i.e. :ref:`structure-core-script`):: |
58 | 58 | ||
@@ -66,7 +66,7 @@ section: | |||
66 | (i.e. ``poky``) have been cloned using Git and the local repository is named | 66 | (i.e. ``poky``) have been cloned using Git and the local repository is named |
67 | "poky". | 67 | "poky". |
68 | 68 | ||
69 | 2. *Prepare Your local.conf File:* By default, the :term:`MACHINE` variable | 69 | #. *Prepare Your local.conf File:* By default, the :term:`MACHINE` variable |
70 | is set to "qemux86-64", which is fine if you are building for the QEMU | 70 | is set to "qemux86-64", which is fine if you are building for the QEMU |
71 | emulator in 64-bit mode. However, if you are not, you need to set the | 71 | emulator in 64-bit mode. However, if you are not, you need to set the |
72 | :term:`MACHINE` variable appropriately in your ``conf/local.conf`` file | 72 | :term:`MACHINE` variable appropriately in your ``conf/local.conf`` file |
@@ -83,7 +83,7 @@ section: | |||
83 | MACHINE = "qemux86" | 83 | MACHINE = "qemux86" |
84 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" | 84 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" |
85 | 85 | ||
86 | 3. *Create a Layer for Patches:* You need to create a layer to hold | 86 | #. *Create a Layer for Patches:* You need to create a layer to hold |
87 | patches created for the kernel image. You can use the | 87 | patches created for the kernel image. You can use the |
88 | ``bitbake-layers create-layer`` command as follows:: | 88 | ``bitbake-layers create-layer`` command as follows:: |
89 | 89 | ||
@@ -106,7 +106,7 @@ section: | |||
106 | ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`" | 106 | ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`" |
107 | section in the Yocto Project Development Tasks Manual. | 107 | section in the Yocto Project Development Tasks Manual. |
108 | 108 | ||
109 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed | 109 | #. *Inform the BitBake Build Environment About Your Layer:* As directed |
110 | when you created your layer, you need to add the layer to the | 110 | when you created your layer, you need to add the layer to the |
111 | :term:`BBLAYERS` variable in the | 111 | :term:`BBLAYERS` variable in the |
112 | ``bblayers.conf`` file as follows:: | 112 | ``bblayers.conf`` file as follows:: |
@@ -116,7 +116,7 @@ section: | |||
116 | NOTE: Starting bitbake server... | 116 | NOTE: Starting bitbake server... |
117 | $ | 117 | $ |
118 | 118 | ||
119 | 5. *Build the Clean Image:* The final step in preparing to work on the | 119 | #. *Build the Clean Image:* The final step in preparing to work on the |
120 | kernel is to build an initial image using ``bitbake``:: | 120 | kernel is to build an initial image using ``bitbake``:: |
121 | 121 | ||
122 | $ bitbake core-image-minimal | 122 | $ bitbake core-image-minimal |
@@ -158,7 +158,7 @@ this procedure leaves you ready to make modifications to the kernel | |||
158 | source as described in the ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" | 158 | source as described in the ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" |
159 | section: | 159 | section: |
160 | 160 | ||
161 | 1. *Initialize the BitBake Environment:* Before you can do anything | 161 | #. *Initialize the BitBake Environment:* Before you can do anything |
162 | using BitBake, you need to initialize the BitBake build environment | 162 | using BitBake, you need to initialize the BitBake build environment |
163 | by sourcing the build environment script (i.e. | 163 | by sourcing the build environment script (i.e. |
164 | :ref:`structure-core-script`). | 164 | :ref:`structure-core-script`). |
@@ -181,7 +181,7 @@ section: | |||
181 | (i.e. ``poky``) have been cloned using Git and the local repository is named | 181 | (i.e. ``poky``) have been cloned using Git and the local repository is named |
182 | "poky". | 182 | "poky". |
183 | 183 | ||
184 | 2. *Prepare Your local.conf File:* By default, the :term:`MACHINE` variable is | 184 | #. *Prepare Your local.conf File:* By default, the :term:`MACHINE` variable is |
185 | set to "qemux86-64", which is fine if you are building for the QEMU emulator | 185 | set to "qemux86-64", which is fine if you are building for the QEMU emulator |
186 | in 64-bit mode. However, if you are not, you need to set the :term:`MACHINE` | 186 | in 64-bit mode. However, if you are not, you need to set the :term:`MACHINE` |
187 | variable appropriately in your ``conf/local.conf`` file found in the | 187 | variable appropriately in your ``conf/local.conf`` file found in the |
@@ -199,7 +199,7 @@ section: | |||
199 | MACHINE = "qemux86" | 199 | MACHINE = "qemux86" |
200 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" | 200 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" |
201 | 201 | ||
202 | 3. *Create a Layer for Patches:* You need to create a layer to hold | 202 | #. *Create a Layer for Patches:* You need to create a layer to hold |
203 | patches created for the kernel image. You can use the | 203 | patches created for the kernel image. You can use the |
204 | ``bitbake-layers create-layer`` command as follows:: | 204 | ``bitbake-layers create-layer`` command as follows:: |
205 | 205 | ||
@@ -221,7 +221,7 @@ section: | |||
221 | ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`" | 221 | ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`" |
222 | section in the Yocto Project Development Tasks Manual. | 222 | section in the Yocto Project Development Tasks Manual. |
223 | 223 | ||
224 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed | 224 | #. *Inform the BitBake Build Environment About Your Layer:* As directed |
225 | when you created your layer, you need to add the layer to the | 225 | when you created your layer, you need to add the layer to the |
226 | :term:`BBLAYERS` variable in the | 226 | :term:`BBLAYERS` variable in the |
227 | ``bblayers.conf`` file as follows:: | 227 | ``bblayers.conf`` file as follows:: |
@@ -231,7 +231,7 @@ section: | |||
231 | NOTE: Starting bitbake server ... | 231 | NOTE: Starting bitbake server ... |
232 | $ | 232 | $ |
233 | 233 | ||
234 | 5. *Create a Local Copy of the Kernel Git Repository:* You can find Git | 234 | #. *Create a Local Copy of the Kernel Git Repository:* You can find Git |
235 | repositories of supported Yocto Project kernels organized under | 235 | repositories of supported Yocto Project kernels organized under |
236 | "Yocto Linux Kernel" in the Yocto Project Source Repositories at | 236 | "Yocto Linux Kernel" in the Yocto Project Source Repositories at |
237 | :yocto_git:`/`. | 237 | :yocto_git:`/`. |
@@ -262,7 +262,7 @@ section: | |||
262 | You cannot use the ``linux-yocto-4.12`` kernel with releases prior to | 262 | You cannot use the ``linux-yocto-4.12`` kernel with releases prior to |
263 | Yocto Project 2.4. | 263 | Yocto Project 2.4. |
264 | 264 | ||
265 | 6. *Create a Local Copy of the Kernel Cache Git Repository:* For | 265 | #. *Create a Local Copy of the Kernel Cache Git Repository:* For |
266 | simplicity, it is recommended that you create your copy of the kernel | 266 | simplicity, it is recommended that you create your copy of the kernel |
267 | cache Git repository outside of the | 267 | cache Git repository outside of the |
268 | :term:`Source Directory`, which is | 268 | :term:`Source Directory`, which is |
@@ -313,7 +313,7 @@ following section describes how to create a layer without the aid of | |||
313 | tools. These steps assume creation of a layer named ``mylayer`` in your | 313 | tools. These steps assume creation of a layer named ``mylayer`` in your |
314 | home directory: | 314 | home directory: |
315 | 315 | ||
316 | 1. *Create Structure*: Create the layer's structure:: | 316 | #. *Create Structure*: Create the layer's structure:: |
317 | 317 | ||
318 | $ mkdir meta-mylayer | 318 | $ mkdir meta-mylayer |
319 | $ mkdir meta-mylayer/conf | 319 | $ mkdir meta-mylayer/conf |
@@ -325,7 +325,7 @@ home directory: | |||
325 | ``recipes-kernel`` directory holds your append file and eventual | 325 | ``recipes-kernel`` directory holds your append file and eventual |
326 | patch files. | 326 | patch files. |
327 | 327 | ||
328 | 2. *Create the Layer Configuration File*: Move to the | 328 | #. *Create the Layer Configuration File*: Move to the |
329 | ``meta-mylayer/conf`` directory and create the ``layer.conf`` file as | 329 | ``meta-mylayer/conf`` directory and create the ``layer.conf`` file as |
330 | follows:: | 330 | follows:: |
331 | 331 | ||
@@ -342,7 +342,7 @@ home directory: | |||
342 | 342 | ||
343 | Notice ``mylayer`` as part of the last three statements. | 343 | Notice ``mylayer`` as part of the last three statements. |
344 | 344 | ||
345 | 3. *Create the Kernel Recipe Append File*: Move to the | 345 | #. *Create the Kernel Recipe Append File*: Move to the |
346 | ``meta-mylayer/recipes-kernel/linux`` directory and create the | 346 | ``meta-mylayer/recipes-kernel/linux`` directory and create the |
347 | kernel's append file. This example uses the ``linux-yocto-4.12`` | 347 | kernel's append file. This example uses the ``linux-yocto-4.12`` |
348 | kernel. Thus, the name of the append file is | 348 | kernel. Thus, the name of the append file is |
@@ -695,7 +695,7 @@ modified image causes the added messages to appear on the emulator's | |||
695 | console. The example is a continuation of the setup procedure found in | 695 | console. The example is a continuation of the setup procedure found in |
696 | the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Section. | 696 | the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Section. |
697 | 697 | ||
698 | 1. *Check Out the Kernel Source Files:* First you must use ``devtool`` | 698 | #. *Check Out the Kernel Source Files:* First you must use ``devtool`` |
699 | to checkout the kernel source code in its workspace. | 699 | to checkout the kernel source code in its workspace. |
700 | 700 | ||
701 | .. note:: | 701 | .. note:: |
@@ -723,10 +723,10 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
723 | You can safely ignore these messages. The source code is correctly | 723 | You can safely ignore these messages. The source code is correctly |
724 | checked out. | 724 | checked out. |
725 | 725 | ||
726 | 2. *Edit the Source Files* Follow these steps to make some simple | 726 | #. *Edit the Source Files* Follow these steps to make some simple |
727 | changes to the source files: | 727 | changes to the source files: |
728 | 728 | ||
729 | 1. *Change the working directory*: In the previous step, the output | 729 | #. *Change the working directory*: In the previous step, the output |
730 | noted where you can find the source files (e.g. | 730 | noted where you can find the source files (e.g. |
731 | ``poky_sdk/workspace/sources/linux-yocto``). Change to where the | 731 | ``poky_sdk/workspace/sources/linux-yocto``). Change to where the |
732 | kernel source code is before making your edits to the | 732 | kernel source code is before making your edits to the |
@@ -734,7 +734,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
734 | 734 | ||
735 | $ cd poky_sdk/workspace/sources/linux-yocto | 735 | $ cd poky_sdk/workspace/sources/linux-yocto |
736 | 736 | ||
737 | 2. *Edit the source file*: Edit the ``init/calibrate.c`` file to have | 737 | #. *Edit the source file*: Edit the ``init/calibrate.c`` file to have |
738 | the following changes:: | 738 | the following changes:: |
739 | 739 | ||
740 | void calibrate_delay(void) | 740 | void calibrate_delay(void) |
@@ -754,12 +754,12 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
754 | . | 754 | . |
755 | . | 755 | . |
756 | 756 | ||
757 | 3. *Build the Updated Kernel Source:* To build the updated kernel | 757 | #. *Build the Updated Kernel Source:* To build the updated kernel |
758 | source, use ``devtool``:: | 758 | source, use ``devtool``:: |
759 | 759 | ||
760 | $ devtool build linux-yocto | 760 | $ devtool build linux-yocto |
761 | 761 | ||
762 | 4. *Create the Image With the New Kernel:* Use the | 762 | #. *Create the Image With the New Kernel:* Use the |
763 | ``devtool build-image`` command to create a new image that has the | 763 | ``devtool build-image`` command to create a new image that has the |
764 | new kernel:: | 764 | new kernel:: |
765 | 765 | ||
@@ -774,15 +774,15 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
774 | :yocto_wiki:`TipsAndTricks/KernelDevelopmentWithEsdk </TipsAndTricks/KernelDevelopmentWithEsdk>` | 774 | :yocto_wiki:`TipsAndTricks/KernelDevelopmentWithEsdk </TipsAndTricks/KernelDevelopmentWithEsdk>` |
775 | Wiki Page. | 775 | Wiki Page. |
776 | 776 | ||
777 | 5. *Test the New Image:* For this example, you can run the new image | 777 | #. *Test the New Image:* For this example, you can run the new image |
778 | using QEMU to verify your changes: | 778 | using QEMU to verify your changes: |
779 | 779 | ||
780 | 1. *Boot the image*: Boot the modified image in the QEMU emulator | 780 | #. *Boot the image*: Boot the modified image in the QEMU emulator |
781 | using this command:: | 781 | using this command:: |
782 | 782 | ||
783 | $ runqemu qemux86 | 783 | $ runqemu qemux86 |
784 | 784 | ||
785 | 2. *Verify the changes*: Log into the machine using ``root`` with no | 785 | #. *Verify the changes*: Log into the machine using ``root`` with no |
786 | password and then use the following shell command to scroll | 786 | password and then use the following shell command to scroll |
787 | through the console's boot output. | 787 | through the console's boot output. |
788 | 788 | ||
@@ -794,7 +794,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
794 | the results of your ``printk`` statements as part of the output | 794 | the results of your ``printk`` statements as part of the output |
795 | when you scroll down the console window. | 795 | when you scroll down the console window. |
796 | 796 | ||
797 | 6. *Stage and commit your changes*: Change | 797 | #. *Stage and commit your changes*: Change |
798 | your working directory to where you modified the ``calibrate.c`` file | 798 | your working directory to where you modified the ``calibrate.c`` file |
799 | and use these Git commands to stage and commit your changes:: | 799 | and use these Git commands to stage and commit your changes:: |
800 | 800 | ||
@@ -803,7 +803,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
803 | $ git add init/calibrate.c | 803 | $ git add init/calibrate.c |
804 | $ git commit -m "calibrate: Add printk example" | 804 | $ git commit -m "calibrate: Add printk example" |
805 | 805 | ||
806 | 7. *Export the Patches and Create an Append File:* To export your | 806 | #. *Export the Patches and Create an Append File:* To export your |
807 | commits as patches and create a ``.bbappend`` file, use the following | 807 | commits as patches and create a ``.bbappend`` file, use the following |
808 | command. This example uses the previously established layer named ``meta-mylayer``:: | 808 | command. This example uses the previously established layer named ``meta-mylayer``:: |
809 | 809 | ||
@@ -819,7 +819,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
819 | finishes, the patches and the ``.bbappend`` file are located in the | 819 | finishes, the patches and the ``.bbappend`` file are located in the |
820 | ``~/meta-mylayer/recipes-kernel/linux`` directory. | 820 | ``~/meta-mylayer/recipes-kernel/linux`` directory. |
821 | 821 | ||
822 | 8. *Build the Image With Your Modified Kernel:* You can now build an | 822 | #. *Build the Image With Your Modified Kernel:* You can now build an |
823 | image that includes your kernel patches. Execute the following | 823 | image that includes your kernel patches. Execute the following |
824 | command from your :term:`Build Directory` in the terminal | 824 | command from your :term:`Build Directory` in the terminal |
825 | set up to run BitBake:: | 825 | set up to run BitBake:: |
@@ -857,20 +857,20 @@ found in the | |||
857 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" | 857 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" |
858 | Section. | 858 | Section. |
859 | 859 | ||
860 | 1. *Edit the Source Files* Prior to this step, you should have used Git | 860 | #. *Edit the Source Files* Prior to this step, you should have used Git |
861 | to create a local copy of the repository for your kernel. Assuming | 861 | to create a local copy of the repository for your kernel. Assuming |
862 | you created the repository as directed in the | 862 | you created the repository as directed in the |
863 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" | 863 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" |
864 | section, use the following commands to edit the ``calibrate.c`` file: | 864 | section, use the following commands to edit the ``calibrate.c`` file: |
865 | 865 | ||
866 | 1. *Change the working directory*: You need to locate the source | 866 | #. *Change the working directory*: You need to locate the source |
867 | files in the local copy of the kernel Git repository. Change to | 867 | files in the local copy of the kernel Git repository. Change to |
868 | where the kernel source code is before making your edits to the | 868 | where the kernel source code is before making your edits to the |
869 | ``calibrate.c`` file:: | 869 | ``calibrate.c`` file:: |
870 | 870 | ||
871 | $ cd ~/linux-yocto-4.12/init | 871 | $ cd ~/linux-yocto-4.12/init |
872 | 872 | ||
873 | 2. *Edit the source file*: Edit the ``calibrate.c`` file to have the | 873 | #. *Edit the source file*: Edit the ``calibrate.c`` file to have the |
874 | following changes:: | 874 | following changes:: |
875 | 875 | ||
876 | void calibrate_delay(void) | 876 | void calibrate_delay(void) |
@@ -890,7 +890,7 @@ Section. | |||
890 | . | 890 | . |
891 | . | 891 | . |
892 | 892 | ||
893 | 2. *Stage and Commit Your Changes:* Use standard Git commands to stage | 893 | #. *Stage and Commit Your Changes:* Use standard Git commands to stage |
894 | and commit the changes you just made:: | 894 | and commit the changes you just made:: |
895 | 895 | ||
896 | $ git add calibrate.c | 896 | $ git add calibrate.c |
@@ -900,7 +900,7 @@ Section. | |||
900 | stage and commit your changes, the OpenEmbedded Build System will not | 900 | stage and commit your changes, the OpenEmbedded Build System will not |
901 | pick up the changes. | 901 | pick up the changes. |
902 | 902 | ||
903 | 3. *Update Your local.conf File to Point to Your Source Files:* In | 903 | #. *Update Your local.conf File to Point to Your Source Files:* In |
904 | addition to your ``local.conf`` file specifying to use | 904 | addition to your ``local.conf`` file specifying to use |
905 | "kernel-modules" and the "qemux86" machine, it must also point to the | 905 | "kernel-modules" and the "qemux86" machine, it must also point to the |
906 | updated kernel source files. Add | 906 | updated kernel source files. Add |
@@ -924,21 +924,21 @@ Section. | |||
924 | be sure to specify the correct branch and machine types. For this | 924 | be sure to specify the correct branch and machine types. For this |
925 | example, the branch is ``standard/base`` and the machine is ``qemux86``. | 925 | example, the branch is ``standard/base`` and the machine is ``qemux86``. |
926 | 926 | ||
927 | 4. *Build the Image:* With the source modified, your changes staged and | 927 | #. *Build the Image:* With the source modified, your changes staged and |
928 | committed, and the ``local.conf`` file pointing to the kernel files, | 928 | committed, and the ``local.conf`` file pointing to the kernel files, |
929 | you can now use BitBake to build the image:: | 929 | you can now use BitBake to build the image:: |
930 | 930 | ||
931 | $ cd poky/build | 931 | $ cd poky/build |
932 | $ bitbake core-image-minimal | 932 | $ bitbake core-image-minimal |
933 | 933 | ||
934 | 5. *Boot the image*: Boot the modified image in the QEMU emulator using | 934 | #. *Boot the image*: Boot the modified image in the QEMU emulator using |
935 | this command. When prompted to login to the QEMU console, use "root" | 935 | this command. When prompted to login to the QEMU console, use "root" |
936 | with no password:: | 936 | with no password:: |
937 | 937 | ||
938 | $ cd poky/build | 938 | $ cd poky/build |
939 | $ runqemu qemux86 | 939 | $ runqemu qemux86 |
940 | 940 | ||
941 | 6. *Look for Your Changes:* As QEMU booted, you might have seen your | 941 | #. *Look for Your Changes:* As QEMU booted, you might have seen your |
942 | changes rapidly scroll by. If not, use these commands to see your | 942 | changes rapidly scroll by. If not, use these commands to see your |
943 | changes: | 943 | changes: |
944 | 944 | ||
@@ -950,7 +950,7 @@ Section. | |||
950 | ``printk`` statements as part of the output when you scroll down the | 950 | ``printk`` statements as part of the output when you scroll down the |
951 | console window. | 951 | console window. |
952 | 952 | ||
953 | 7. *Generate the Patch File:* Once you are sure that your patch works | 953 | #. *Generate the Patch File:* Once you are sure that your patch works |
954 | correctly, you can generate a ``*.patch`` file in the kernel source | 954 | correctly, you can generate a ``*.patch`` file in the kernel source |
955 | repository:: | 955 | repository:: |
956 | 956 | ||
@@ -958,7 +958,7 @@ Section. | |||
958 | $ git format-patch -1 | 958 | $ git format-patch -1 |
959 | 0001-calibrate.c-Added-some-printk-statements.patch | 959 | 0001-calibrate.c-Added-some-printk-statements.patch |
960 | 960 | ||
961 | 8. *Move the Patch File to Your Layer:* In order for subsequent builds | 961 | #. *Move the Patch File to Your Layer:* In order for subsequent builds |
962 | to pick up patches, you need to move the patch file you created in | 962 | to pick up patches, you need to move the patch file you created in |
963 | the previous step to your layer ``meta-mylayer``. For this example, | 963 | the previous step to your layer ``meta-mylayer``. For this example, |
964 | the layer created earlier is located in your home directory as | 964 | the layer created earlier is located in your home directory as |
@@ -978,7 +978,7 @@ Section. | |||
978 | 978 | ||
979 | $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto | 979 | $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto |
980 | 980 | ||
981 | 9. *Create the Append File:* Finally, you need to create the | 981 | #. *Create the Append File:* Finally, you need to create the |
982 | ``linux-yocto_4.12.bbappend`` file and insert statements that allow | 982 | ``linux-yocto_4.12.bbappend`` file and insert statements that allow |
983 | the OpenEmbedded build system to find the patch. The append file | 983 | the OpenEmbedded build system to find the patch. The append file |
984 | needs to be in your layer's ``recipes-kernel/linux`` directory and it | 984 | needs to be in your layer's ``recipes-kernel/linux`` directory and it |
@@ -1223,7 +1223,7 @@ saved, and one freshly created using the ``menuconfig`` tool. | |||
1223 | To create a configuration fragment using this method, follow these | 1223 | To create a configuration fragment using this method, follow these |
1224 | steps: | 1224 | steps: |
1225 | 1225 | ||
1226 | 1. *Complete a Build Through Kernel Configuration:* Complete a build at | 1226 | #. *Complete a Build Through Kernel Configuration:* Complete a build at |
1227 | least through the kernel configuration task as follows:: | 1227 | least through the kernel configuration task as follows:: |
1228 | 1228 | ||
1229 | $ bitbake linux-yocto -c kernel_configme -f | 1229 | $ bitbake linux-yocto -c kernel_configme -f |
@@ -1233,11 +1233,11 @@ steps: | |||
1233 | your build state might become unknown, it is best to run this task | 1233 | your build state might become unknown, it is best to run this task |
1234 | prior to starting ``menuconfig``. | 1234 | prior to starting ``menuconfig``. |
1235 | 1235 | ||
1236 | 2. *Launch menuconfig:* Run the ``menuconfig`` command:: | 1236 | #. *Launch menuconfig:* Run the ``menuconfig`` command:: |
1237 | 1237 | ||
1238 | $ bitbake linux-yocto -c menuconfig | 1238 | $ bitbake linux-yocto -c menuconfig |
1239 | 1239 | ||
1240 | 3. *Create the Configuration Fragment:* Run the ``diffconfig`` command | 1240 | #. *Create the Configuration Fragment:* Run the ``diffconfig`` command |
1241 | to prepare a configuration fragment. The resulting file | 1241 | to prepare a configuration fragment. The resulting file |
1242 | ``fragment.cfg`` is placed in the | 1242 | ``fragment.cfg`` is placed in the |
1243 | ``${``\ :term:`WORKDIR`\ ``}`` | 1243 | ``${``\ :term:`WORKDIR`\ ``}`` |
@@ -1408,17 +1408,17 @@ configuration. | |||
1408 | 1408 | ||
1409 | To streamline the configuration, do the following: | 1409 | To streamline the configuration, do the following: |
1410 | 1410 | ||
1411 | 1. *Use a Working Configuration:* Start with a full configuration that | 1411 | #. *Use a Working Configuration:* Start with a full configuration that |
1412 | you know works. Be sure the configuration builds and boots | 1412 | you know works. Be sure the configuration builds and boots |
1413 | successfully. Use this configuration file as your baseline. | 1413 | successfully. Use this configuration file as your baseline. |
1414 | 1414 | ||
1415 | 2. *Run Configure and Check Tasks:* Separately run the | 1415 | #. *Run Configure and Check Tasks:* Separately run the |
1416 | :ref:`ref-tasks-kernel_configme` and :ref:`ref-tasks-kernel_configcheck` tasks:: | 1416 | :ref:`ref-tasks-kernel_configme` and :ref:`ref-tasks-kernel_configcheck` tasks:: |
1417 | 1417 | ||
1418 | $ bitbake linux-yocto -c kernel_configme -f | 1418 | $ bitbake linux-yocto -c kernel_configme -f |
1419 | $ bitbake linux-yocto -c kernel_configcheck -f | 1419 | $ bitbake linux-yocto -c kernel_configcheck -f |
1420 | 1420 | ||
1421 | 3. *Process the Results:* Take the resulting list of files from the | 1421 | #. *Process the Results:* Take the resulting list of files from the |
1422 | :ref:`ref-tasks-kernel_configcheck` task warnings and do the following: | 1422 | :ref:`ref-tasks-kernel_configcheck` task warnings and do the following: |
1423 | 1423 | ||
1424 | - Drop values that are redefined in the fragment but do not change | 1424 | - Drop values that are redefined in the fragment but do not change |
@@ -1431,7 +1431,7 @@ To streamline the configuration, do the following: | |||
1431 | 1431 | ||
1432 | - Remove repeated and invalid options. | 1432 | - Remove repeated and invalid options. |
1433 | 1433 | ||
1434 | 4. *Re-Run Configure and Check Tasks:* After you have worked through the | 1434 | #. *Re-Run Configure and Check Tasks:* After you have worked through the |
1435 | output of the kernel configuration audit, you can re-run the | 1435 | output of the kernel configuration audit, you can re-run the |
1436 | :ref:`ref-tasks-kernel_configme` and :ref:`ref-tasks-kernel_configcheck` tasks to see the | 1436 | :ref:`ref-tasks-kernel_configme` and :ref:`ref-tasks-kernel_configcheck` tasks to see the |
1437 | results of your changes. If you have more issues, you can deal with | 1437 | results of your changes. If you have more issues, you can deal with |
@@ -1462,20 +1462,20 @@ If you build a kernel image and the version string has a "+" or a | |||
1462 | "-dirty" at the end, it means there are uncommitted modifications in the kernel's | 1462 | "-dirty" at the end, it means there are uncommitted modifications in the kernel's |
1463 | source directory. Follow these steps to clean up the version string: | 1463 | source directory. Follow these steps to clean up the version string: |
1464 | 1464 | ||
1465 | 1. *Discover the Uncommitted Changes:* Go to the kernel's locally cloned | 1465 | #. *Discover the Uncommitted Changes:* Go to the kernel's locally cloned |
1466 | Git repository (source directory) and use the following Git command | 1466 | Git repository (source directory) and use the following Git command |
1467 | to list the files that have been changed, added, or removed:: | 1467 | to list the files that have been changed, added, or removed:: |
1468 | 1468 | ||
1469 | $ git status | 1469 | $ git status |
1470 | 1470 | ||
1471 | 2. *Commit the Changes:* You should commit those changes to the kernel | 1471 | #. *Commit the Changes:* You should commit those changes to the kernel |
1472 | source tree regardless of whether or not you will save, export, or | 1472 | source tree regardless of whether or not you will save, export, or |
1473 | use the changes:: | 1473 | use the changes:: |
1474 | 1474 | ||
1475 | $ git add | 1475 | $ git add |
1476 | $ git commit -s -a -m "getting rid of -dirty" | 1476 | $ git commit -s -a -m "getting rid of -dirty" |
1477 | 1477 | ||
1478 | 3. *Rebuild the Kernel Image:* Once you commit the changes, rebuild the | 1478 | #. *Rebuild the Kernel Image:* Once you commit the changes, rebuild the |
1479 | kernel. | 1479 | kernel. |
1480 | 1480 | ||
1481 | Depending on your particular kernel development workflow, the | 1481 | Depending on your particular kernel development workflow, the |
@@ -1509,18 +1509,18 @@ You can find this recipe in the ``poky`` Git repository: | |||
1509 | 1509 | ||
1510 | Here are some basic steps you can use to work with your own sources: | 1510 | Here are some basic steps you can use to work with your own sources: |
1511 | 1511 | ||
1512 | 1. *Create a Copy of the Kernel Recipe:* Copy the | 1512 | #. *Create a Copy of the Kernel Recipe:* Copy the |
1513 | ``linux-yocto-custom.bb`` recipe to your layer and give it a | 1513 | ``linux-yocto-custom.bb`` recipe to your layer and give it a |
1514 | meaningful name. The name should include the version of the Yocto | 1514 | meaningful name. The name should include the version of the Yocto |
1515 | Linux kernel you are using (e.g. ``linux-yocto-myproject_4.12.bb``, | 1515 | Linux kernel you are using (e.g. ``linux-yocto-myproject_4.12.bb``, |
1516 | where "4.12" is the base version of the Linux kernel with which you | 1516 | where "4.12" is the base version of the Linux kernel with which you |
1517 | would be working). | 1517 | would be working). |
1518 | 1518 | ||
1519 | 2. *Create a Directory for Your Patches:* In the same directory inside | 1519 | #. *Create a Directory for Your Patches:* In the same directory inside |
1520 | your layer, create a matching directory to store your patches and | 1520 | your layer, create a matching directory to store your patches and |
1521 | configuration files (e.g. ``linux-yocto-myproject``). | 1521 | configuration files (e.g. ``linux-yocto-myproject``). |
1522 | 1522 | ||
1523 | 3. *Ensure You Have Configurations:* Make sure you have either a | 1523 | #. *Ensure You Have Configurations:* Make sure you have either a |
1524 | ``defconfig`` file or configuration fragment files in your layer. | 1524 | ``defconfig`` file or configuration fragment files in your layer. |
1525 | When you use the ``linux-yocto-custom.bb`` recipe, you must specify a | 1525 | When you use the ``linux-yocto-custom.bb`` recipe, you must specify a |
1526 | configuration. If you do not have a ``defconfig`` file, you can run | 1526 | configuration. If you do not have a ``defconfig`` file, you can run |
@@ -1545,7 +1545,7 @@ Here are some basic steps you can use to work with your own sources: | |||
1545 | ``arch/arm/configs`` and use the one that is the best starting point | 1545 | ``arch/arm/configs`` and use the one that is the best starting point |
1546 | for your board). | 1546 | for your board). |
1547 | 1547 | ||
1548 | 4. *Edit the Recipe:* Edit the following variables in your recipe as | 1548 | #. *Edit the Recipe:* Edit the following variables in your recipe as |
1549 | appropriate for your project: | 1549 | appropriate for your project: |
1550 | 1550 | ||
1551 | - :term:`SRC_URI`: The | 1551 | - :term:`SRC_URI`: The |
@@ -1594,7 +1594,7 @@ Here are some basic steps you can use to work with your own sources: | |||
1594 | 1594 | ||
1595 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" | 1595 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" |
1596 | 1596 | ||
1597 | 5. *Customize Your Recipe as Needed:* Provide further customizations to | 1597 | #. *Customize Your Recipe as Needed:* Provide further customizations to |
1598 | your recipe as needed just as you would customize an existing | 1598 | your recipe as needed just as you would customize an existing |
1599 | linux-yocto recipe. See the | 1599 | linux-yocto recipe. See the |
1600 | ":ref:`ref-manual/devtool-reference:modifying an existing recipe`" section | 1600 | ":ref:`ref-manual/devtool-reference:modifying an existing recipe`" section |
@@ -1826,7 +1826,7 @@ kernel features. | |||
1826 | Consider the following example that adds the "test.scc" feature to the | 1826 | Consider the following example that adds the "test.scc" feature to the |
1827 | build. | 1827 | build. |
1828 | 1828 | ||
1829 | 1. *Create the Feature File:* Create a ``.scc`` file and locate it just | 1829 | #. *Create the Feature File:* Create a ``.scc`` file and locate it just |
1830 | as you would any other patch file, ``.cfg`` file, or fetcher item you | 1830 | as you would any other patch file, ``.cfg`` file, or fetcher item you |
1831 | specify in the :term:`SRC_URI` statement. | 1831 | specify in the :term:`SRC_URI` statement. |
1832 | 1832 | ||
@@ -1854,7 +1854,7 @@ build. | |||
1854 | ``linux-yocto`` directory has both the feature ``test.scc`` file and | 1854 | ``linux-yocto`` directory has both the feature ``test.scc`` file and |
1855 | a similarly named configuration fragment file ``test.cfg``. | 1855 | a similarly named configuration fragment file ``test.cfg``. |
1856 | 1856 | ||
1857 | 2. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the | 1857 | #. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the |
1858 | recipe's :term:`SRC_URI` statement:: | 1858 | recipe's :term:`SRC_URI` statement:: |
1859 | 1859 | ||
1860 | SRC_URI += "file://test.scc" | 1860 | SRC_URI += "file://test.scc" |
@@ -1862,7 +1862,7 @@ build. | |||
1862 | The leading space before the path is important as the path is | 1862 | The leading space before the path is important as the path is |
1863 | appended to the existing path. | 1863 | appended to the existing path. |
1864 | 1864 | ||
1865 | 3. *Specify the Feature as a Kernel Feature:* Use the | 1865 | #. *Specify the Feature as a Kernel Feature:* Use the |
1866 | :term:`KERNEL_FEATURES` statement to specify the feature as a kernel | 1866 | :term:`KERNEL_FEATURES` statement to specify the feature as a kernel |
1867 | feature:: | 1867 | feature:: |
1868 | 1868 | ||
diff --git a/documentation/kernel-dev/intro.rst b/documentation/kernel-dev/intro.rst index 06cc884386..a663733a1d 100644 --- a/documentation/kernel-dev/intro.rst +++ b/documentation/kernel-dev/intro.rst | |||
@@ -108,12 +108,12 @@ general information and references for further information. | |||
108 | .. image:: figures/kernel-dev-flow.png | 108 | .. image:: figures/kernel-dev-flow.png |
109 | :width: 100% | 109 | :width: 100% |
110 | 110 | ||
111 | 1. *Set up Your Host Development System to Support Development Using the | 111 | #. *Set up Your Host Development System to Support Development Using the |
112 | Yocto Project*: See the ":doc:`/dev-manual/start`" section in | 112 | Yocto Project*: See the ":doc:`/dev-manual/start`" section in |
113 | the Yocto Project Development Tasks Manual for options on how to get | 113 | the Yocto Project Development Tasks Manual for options on how to get |
114 | a build host ready to use the Yocto Project. | 114 | a build host ready to use the Yocto Project. |
115 | 115 | ||
116 | 2. *Set Up Your Host Development System for Kernel Development:* It is | 116 | #. *Set Up Your Host Development System for Kernel Development:* It is |
117 | recommended that you use ``devtool`` for kernel | 117 | recommended that you use ``devtool`` for kernel |
118 | development. Alternatively, you can use traditional kernel | 118 | development. Alternatively, you can use traditional kernel |
119 | development methods with the Yocto Project. Either way, there are | 119 | development methods with the Yocto Project. Either way, there are |
@@ -131,7 +131,7 @@ general information and references for further information. | |||
131 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" | 131 | ":ref:`kernel-dev/common:getting ready for traditional kernel development`" |
132 | section. | 132 | section. |
133 | 133 | ||
134 | 3. *Make Changes to the Kernel Source Code if applicable:* Modifying the | 134 | #. *Make Changes to the Kernel Source Code if applicable:* Modifying the |
135 | kernel does not always mean directly changing source files. However, | 135 | kernel does not always mean directly changing source files. However, |
136 | if you have to do this, you make the changes to the files in the | 136 | if you have to do this, you make the changes to the files in the |
137 | Yocto's :term:`Build Directory` if you are using ``devtool``. For more | 137 | Yocto's :term:`Build Directory` if you are using ``devtool``. For more |
@@ -144,7 +144,7 @@ general information and references for further information. | |||
144 | ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" | 144 | ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" |
145 | section. | 145 | section. |
146 | 146 | ||
147 | 4. *Make Kernel Configuration Changes if Applicable:* If your situation | 147 | #. *Make Kernel Configuration Changes if Applicable:* If your situation |
148 | calls for changing the kernel's configuration, you can use | 148 | calls for changing the kernel's configuration, you can use |
149 | :ref:`menuconfig <kernel-dev/common:using \`\`menuconfig\`\`>`, | 149 | :ref:`menuconfig <kernel-dev/common:using \`\`menuconfig\`\`>`, |
150 | which allows you to | 150 | which allows you to |
@@ -169,7 +169,7 @@ general information and references for further information. | |||
169 | Additionally, if you are working in a BSP layer and need to modify | 169 | Additionally, if you are working in a BSP layer and need to modify |
170 | the BSP's kernel's configuration, you can use ``menuconfig``. | 170 | the BSP's kernel's configuration, you can use ``menuconfig``. |
171 | 171 | ||
172 | 5. *Rebuild the Kernel Image With Your Changes:* Rebuilding the kernel | 172 | #. *Rebuild the Kernel Image With Your Changes:* Rebuilding the kernel |
173 | image applies your changes. Depending on your target hardware, you | 173 | image applies your changes. Depending on your target hardware, you |
174 | can verify your changes on actual hardware or perhaps QEMU. | 174 | can verify your changes on actual hardware or perhaps QEMU. |
175 | 175 | ||
diff --git a/documentation/kernel-dev/maint-appx.rst b/documentation/kernel-dev/maint-appx.rst index 6aa2fb7cf1..53b7376089 100644 --- a/documentation/kernel-dev/maint-appx.rst +++ b/documentation/kernel-dev/maint-appx.rst | |||
@@ -92,11 +92,11 @@ top-level kernel feature or BSP. The following actions effectively | |||
92 | provide the Metadata and create the tree that includes the new feature, | 92 | provide the Metadata and create the tree that includes the new feature, |
93 | patch, or BSP: | 93 | patch, or BSP: |
94 | 94 | ||
95 | 1. *Pass Feature to the OpenEmbedded Build System:* A top-level kernel | 95 | #. *Pass Feature to the OpenEmbedded Build System:* A top-level kernel |
96 | feature is passed to the kernel build subsystem. Normally, this | 96 | feature is passed to the kernel build subsystem. Normally, this |
97 | feature is a BSP for a particular kernel type. | 97 | feature is a BSP for a particular kernel type. |
98 | 98 | ||
99 | 2. *Locate Feature:* The file that describes the top-level feature is | 99 | #. *Locate Feature:* The file that describes the top-level feature is |
100 | located by searching these system directories: | 100 | located by searching these system directories: |
101 | 101 | ||
102 | - The in-tree kernel-cache directories, which are located in the | 102 | - The in-tree kernel-cache directories, which are located in the |
@@ -112,31 +112,31 @@ patch, or BSP: | |||
112 | 112 | ||
113 | bsp_root_name-kernel_type.scc | 113 | bsp_root_name-kernel_type.scc |
114 | 114 | ||
115 | 3. *Expand Feature:* Once located, the feature description is either | 115 | #. *Expand Feature:* Once located, the feature description is either |
116 | expanded into a simple script of actions, or into an existing | 116 | expanded into a simple script of actions, or into an existing |
117 | equivalent script that is already part of the shipped kernel. | 117 | equivalent script that is already part of the shipped kernel. |
118 | 118 | ||
119 | 4. *Append Extra Features:* Extra features are appended to the top-level | 119 | #. *Append Extra Features:* Extra features are appended to the top-level |
120 | feature description. These features can come from the | 120 | feature description. These features can come from the |
121 | :term:`KERNEL_FEATURES` | 121 | :term:`KERNEL_FEATURES` |
122 | variable in recipes. | 122 | variable in recipes. |
123 | 123 | ||
124 | 5. *Locate, Expand, and Append Each Feature:* Each extra feature is | 124 | #. *Locate, Expand, and Append Each Feature:* Each extra feature is |
125 | located, expanded and appended to the script as described in step | 125 | located, expanded and appended to the script as described in step |
126 | three. | 126 | three. |
127 | 127 | ||
128 | 6. *Execute the Script:* The script is executed to produce files | 128 | #. *Execute the Script:* The script is executed to produce files |
129 | ``.scc`` and ``.cfg`` files in appropriate directories of the | 129 | ``.scc`` and ``.cfg`` files in appropriate directories of the |
130 | ``yocto-kernel-cache`` repository. These files are descriptions of | 130 | ``yocto-kernel-cache`` repository. These files are descriptions of |
131 | all the branches, tags, patches and configurations that need to be | 131 | all the branches, tags, patches and configurations that need to be |
132 | applied to the base Git repository to completely create the source | 132 | applied to the base Git repository to completely create the source |
133 | (build) branch for the new BSP or feature. | 133 | (build) branch for the new BSP or feature. |
134 | 134 | ||
135 | 7. *Clone Base Repository:* The base repository is cloned, and the | 135 | #. *Clone Base Repository:* The base repository is cloned, and the |
136 | actions listed in the ``yocto-kernel-cache`` directories are applied | 136 | actions listed in the ``yocto-kernel-cache`` directories are applied |
137 | to the tree. | 137 | to the tree. |
138 | 138 | ||
139 | 8. *Perform Cleanup:* The Git repositories are left with the desired | 139 | #. *Perform Cleanup:* The Git repositories are left with the desired |
140 | branches checked out and any required branching, patching and tagging | 140 | branches checked out and any required branching, patching and tagging |
141 | has been performed. | 141 | has been performed. |
142 | 142 | ||