diff options
Diffstat (limited to 'documentation/kernel-dev/maint-appx.rst')
-rw-r--r-- | documentation/kernel-dev/maint-appx.rst | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/documentation/kernel-dev/maint-appx.rst b/documentation/kernel-dev/maint-appx.rst index 89f4b43343..53b7376089 100644 --- a/documentation/kernel-dev/maint-appx.rst +++ b/documentation/kernel-dev/maint-appx.rst | |||
@@ -28,8 +28,7 @@ in the Yocto Project Linux kernel in any clone of the Yocto Project | |||
28 | Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For | 28 | Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For |
29 | example, the following commands clone the Yocto Project baseline Linux | 29 | example, the following commands clone the Yocto Project baseline Linux |
30 | kernel that branches off ``linux.org`` version 4.12 and the | 30 | kernel that branches off ``linux.org`` version 4.12 and the |
31 | ``yocto-kernel-cache``, which contains stores of kernel Metadata: | 31 | ``yocto-kernel-cache``, which contains stores of kernel Metadata:: |
32 | :: | ||
33 | 32 | ||
34 | $ git clone git://git.yoctoproject.org/linux-yocto-4.12 | 33 | $ git clone git://git.yoctoproject.org/linux-yocto-4.12 |
35 | $ git clone git://git.yoctoproject.org/linux-kernel-cache | 34 | $ git clone git://git.yoctoproject.org/linux-kernel-cache |
@@ -42,16 +41,14 @@ section. | |||
42 | 41 | ||
43 | Once you have cloned the kernel Git repository and the cache of Metadata | 42 | Once you have cloned the kernel Git repository and the cache of Metadata |
44 | on your local machine, you can discover the branches that are available | 43 | on your local machine, you can discover the branches that are available |
45 | in the repository using the following Git command: | 44 | in the repository using the following Git command:: |
46 | :: | ||
47 | 45 | ||
48 | $ git branch -a | 46 | $ git branch -a |
49 | 47 | ||
50 | Checking out a branch allows you to work with a particular Yocto Linux | 48 | Checking out a branch allows you to work with a particular Yocto Linux |
51 | kernel. For example, the following commands check out the | 49 | kernel. For example, the following commands check out the |
52 | "standard/beagleboard" branch of the Yocto Linux kernel repository and | 50 | "standard/beagleboard" branch of the Yocto Linux kernel repository and |
53 | the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository: | 51 | the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository:: |
54 | :: | ||
55 | 52 | ||
56 | $ cd ~/linux-yocto-4.12 | 53 | $ cd ~/linux-yocto-4.12 |
57 | $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard | 54 | $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard |
@@ -64,7 +61,7 @@ the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository: | |||
64 | kernel versions (e.g. "yocto-4.12", "yocto-4.10", "yocto-4.9", and so forth). | 61 | kernel versions (e.g. "yocto-4.12", "yocto-4.10", "yocto-4.9", and so forth). |
65 | 62 | ||
66 | Once you have checked out and switched to appropriate branches, you can | 63 | Once you have checked out and switched to appropriate branches, you can |
67 | see a snapshot of all the kernel source files used to used to build that | 64 | see a snapshot of all the kernel source files used to build that |
68 | particular Yocto Linux kernel for a particular board. | 65 | particular Yocto Linux kernel for a particular board. |
69 | 66 | ||
70 | To see the features and configurations for a particular Yocto Linux | 67 | To see the features and configurations for a particular Yocto Linux |
@@ -95,11 +92,11 @@ top-level kernel feature or BSP. The following actions effectively | |||
95 | 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, |
96 | patch, or BSP: | 93 | patch, or BSP: |
97 | 94 | ||
98 | 1. *Pass Feature to the OpenEmbedded Build System:* A top-level kernel | 95 | #. *Pass Feature to the OpenEmbedded Build System:* A top-level kernel |
99 | feature is passed to the kernel build subsystem. Normally, this | 96 | feature is passed to the kernel build subsystem. Normally, this |
100 | feature is a BSP for a particular kernel type. | 97 | feature is a BSP for a particular kernel type. |
101 | 98 | ||
102 | 2. *Locate Feature:* The file that describes the top-level feature is | 99 | #. *Locate Feature:* The file that describes the top-level feature is |
103 | located by searching these system directories: | 100 | located by searching these system directories: |
104 | 101 | ||
105 | - The in-tree kernel-cache directories, which are located in the | 102 | - The in-tree kernel-cache directories, which are located in the |
@@ -107,40 +104,39 @@ patch, or BSP: | |||
107 | repository organized under the "Yocto Linux Kernel" heading in the | 104 | repository organized under the "Yocto Linux Kernel" heading in the |
108 | :yocto_git:`Yocto Project Source Repositories <>`. | 105 | :yocto_git:`Yocto Project Source Repositories <>`. |
109 | 106 | ||
110 | - Areas pointed to by ``SRC_URI`` statements found in kernel recipes. | 107 | - Areas pointed to by :term:`SRC_URI` statements found in kernel recipes. |
111 | 108 | ||
112 | For a typical build, the target of the search is a feature | 109 | For a typical build, the target of the search is a feature |
113 | description in an ``.scc`` file whose name follows this format (e.g. | 110 | description in an ``.scc`` file whose name follows this format (e.g. |
114 | ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``): | 111 | ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``):: |
115 | :: | ||
116 | 112 | ||
117 | bsp_root_name-kernel_type.scc | 113 | bsp_root_name-kernel_type.scc |
118 | 114 | ||
119 | 3. *Expand Feature:* Once located, the feature description is either | 115 | #. *Expand Feature:* Once located, the feature description is either |
120 | expanded into a simple script of actions, or into an existing | 116 | expanded into a simple script of actions, or into an existing |
121 | equivalent script that is already part of the shipped kernel. | 117 | equivalent script that is already part of the shipped kernel. |
122 | 118 | ||
123 | 4. *Append Extra Features:* Extra features are appended to the top-level | 119 | #. *Append Extra Features:* Extra features are appended to the top-level |
124 | feature description. These features can come from the | 120 | feature description. These features can come from the |
125 | :term:`KERNEL_FEATURES` | 121 | :term:`KERNEL_FEATURES` |
126 | variable in recipes. | 122 | variable in recipes. |
127 | 123 | ||
128 | 5. *Locate, Expand, and Append Each Feature:* Each extra feature is | 124 | #. *Locate, Expand, and Append Each Feature:* Each extra feature is |
129 | located, expanded and appended to the script as described in step | 125 | located, expanded and appended to the script as described in step |
130 | three. | 126 | three. |
131 | 127 | ||
132 | 6. *Execute the Script:* The script is executed to produce files | 128 | #. *Execute the Script:* The script is executed to produce files |
133 | ``.scc`` and ``.cfg`` files in appropriate directories of the | 129 | ``.scc`` and ``.cfg`` files in appropriate directories of the |
134 | ``yocto-kernel-cache`` repository. These files are descriptions of | 130 | ``yocto-kernel-cache`` repository. These files are descriptions of |
135 | all the branches, tags, patches and configurations that need to be | 131 | all the branches, tags, patches and configurations that need to be |
136 | applied to the base Git repository to completely create the source | 132 | applied to the base Git repository to completely create the source |
137 | (build) branch for the new BSP or feature. | 133 | (build) branch for the new BSP or feature. |
138 | 134 | ||
139 | 7. *Clone Base Repository:* The base repository is cloned, and the | 135 | #. *Clone Base Repository:* The base repository is cloned, and the |
140 | actions listed in the ``yocto-kernel-cache`` directories are applied | 136 | actions listed in the ``yocto-kernel-cache`` directories are applied |
141 | to the tree. | 137 | to the tree. |
142 | 138 | ||
143 | 8. *Perform Cleanup:* The Git repositories are left with the desired | 139 | #. *Perform Cleanup:* The Git repositories are left with the desired |
144 | branches checked out and any required branching, patching and tagging | 140 | branches checked out and any required branching, patching and tagging |
145 | has been performed. | 141 | has been performed. |
146 | 142 | ||
@@ -179,7 +175,7 @@ Build Strategy | |||
179 | Once you have cloned a Yocto Linux kernel repository and the cache | 175 | Once you have cloned a Yocto Linux kernel repository and the cache |
180 | repository (``yocto-kernel-cache``) onto your development system, you | 176 | repository (``yocto-kernel-cache``) onto your development system, you |
181 | can consider the compilation phase of kernel development, which is | 177 | can consider the compilation phase of kernel development, which is |
182 | building a kernel image. Some prerequisites exist that are validated by | 178 | building a kernel image. Some prerequisites are validated by |
183 | the build process before compilation starts: | 179 | the build process before compilation starts: |
184 | 180 | ||
185 | - The :term:`SRC_URI` points to the | 181 | - The :term:`SRC_URI` points to the |
@@ -198,7 +194,7 @@ the build process before compilation starts: | |||
198 | In the previous example, the "yocto-4.12" branch is checked out in | 194 | In the previous example, the "yocto-4.12" branch is checked out in |
199 | the ``yocto-kernel-cache`` repository. | 195 | the ``yocto-kernel-cache`` repository. |
200 | 196 | ||
201 | The OpenEmbedded build system makes sure these conditions exist before | 197 | The OpenEmbedded build system makes sure these conditions are satisfied before |
202 | attempting compilation. Other means, however, do exist, such as | 198 | attempting compilation. Other means, however, do exist, such as |
203 | bootstrapping a BSP. | 199 | bootstrapping a BSP. |
204 | 200 | ||
@@ -222,8 +218,7 @@ build process generates a build tree that is separate from your kernel's | |||
222 | local Git source repository tree. This build tree has a name that uses | 218 | local Git source repository tree. This build tree has a name that uses |
223 | the following form, where ``${MACHINE}`` is the metadata name of the | 219 | the following form, where ``${MACHINE}`` is the metadata name of the |
224 | machine (BSP) and "kernel_type" is one of the Yocto Project supported | 220 | machine (BSP) and "kernel_type" is one of the Yocto Project supported |
225 | kernel types (e.g. "standard"): | 221 | kernel types (e.g. "standard"):: |
226 | :: | ||
227 | 222 | ||
228 | linux-${MACHINE}-kernel_type-build | 223 | linux-${MACHINE}-kernel_type-build |
229 | 224 | ||
@@ -234,6 +229,5 @@ This behavior means that all the generated files for a particular | |||
234 | machine or BSP are now in the build tree directory. The files include | 229 | machine or BSP are now in the build tree directory. The files include |
235 | the final ``.config`` file, all the ``.o`` files, the ``.a`` files, and | 230 | the final ``.config`` file, all the ``.o`` files, the ``.a`` files, and |
236 | so forth. Since each machine or BSP has its own separate | 231 | so forth. Since each machine or BSP has its own separate |
237 | :term:`Build Directory` in its own separate | 232 | :term:`Build Directory` in its own separate branch of the Git repository, |
238 | branch of the Git repository, you can easily switch between different | 233 | you can easily switch between different builds. |
239 | builds. | ||