summaryrefslogtreecommitdiffstats
path: root/documentation/kernel-dev/maint-appx.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/kernel-dev/maint-appx.rst')
-rw-r--r--documentation/kernel-dev/maint-appx.rst44
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
28Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For 28Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For
29example, the following commands clone the Yocto Project baseline Linux 29example, the following commands clone the Yocto Project baseline Linux
30kernel that branches off ``linux.org`` version 4.12 and the 30kernel 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
43Once you have cloned the kernel Git repository and the cache of Metadata 42Once you have cloned the kernel Git repository and the cache of Metadata
44on your local machine, you can discover the branches that are available 43on your local machine, you can discover the branches that are available
45in the repository using the following Git command: 44in the repository using the following Git command::
46::
47 45
48 $ git branch -a 46 $ git branch -a
49 47
50Checking out a branch allows you to work with a particular Yocto Linux 48Checking out a branch allows you to work with a particular Yocto Linux
51kernel. For example, the following commands check out the 49kernel. 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
53the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository: 51the "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
66Once you have checked out and switched to appropriate branches, you can 63Once you have checked out and switched to appropriate branches, you can
67see a snapshot of all the kernel source files used to used to build that 64see a snapshot of all the kernel source files used to build that
68particular Yocto Linux kernel for a particular board. 65particular Yocto Linux kernel for a particular board.
69 66
70To see the features and configurations for a particular Yocto Linux 67To see the features and configurations for a particular Yocto Linux
@@ -95,11 +92,11 @@ top-level kernel feature or BSP. The following actions effectively
95provide the Metadata and create the tree that includes the new feature, 92provide the Metadata and create the tree that includes the new feature,
96patch, or BSP: 93patch, or BSP:
97 94
981. *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
1022. *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
1193. *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
1234. *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
1285. *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
1326. *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
1397. *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
1438. *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
179Once you have cloned a Yocto Linux kernel repository and the cache 175Once you have cloned a Yocto Linux kernel repository and the cache
180repository (``yocto-kernel-cache``) onto your development system, you 176repository (``yocto-kernel-cache``) onto your development system, you
181can consider the compilation phase of kernel development, which is 177can consider the compilation phase of kernel development, which is
182building a kernel image. Some prerequisites exist that are validated by 178building a kernel image. Some prerequisites are validated by
183the build process before compilation starts: 179the 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
201The OpenEmbedded build system makes sure these conditions exist before 197The OpenEmbedded build system makes sure these conditions are satisfied before
202attempting compilation. Other means, however, do exist, such as 198attempting compilation. Other means, however, do exist, such as
203bootstrapping a BSP. 199bootstrapping a BSP.
204 200
@@ -222,8 +218,7 @@ build process generates a build tree that is separate from your kernel's
222local Git source repository tree. This build tree has a name that uses 218local Git source repository tree. This build tree has a name that uses
223the following form, where ``${MACHINE}`` is the metadata name of the 219the following form, where ``${MACHINE}`` is the metadata name of the
224machine (BSP) and "kernel_type" is one of the Yocto Project supported 220machine (BSP) and "kernel_type" is one of the Yocto Project supported
225kernel types (e.g. "standard"): 221kernel 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
234machine or BSP are now in the build tree directory. The files include 229machine or BSP are now in the build tree directory. The files include
235the final ``.config`` file, all the ``.o`` files, the ``.a`` files, and 230the final ``.config`` file, all the ``.o`` files, the ``.a`` files, and
236so forth. Since each machine or BSP has its own separate 231so 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,
238branch of the Git repository, you can easily switch between different 233you can easily switch between different builds.
239builds.