diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2014-02-03 07:29:54 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-11 12:17:06 +0000 |
commit | a2e5746f29078c805b1e1e28471f323be4d59294 (patch) | |
tree | 36127f92ea079a2490e26cd47987dfa1fcabdbe1 /bitbake | |
parent | 3cdf800334bf7f6297e6c15bfc334814e8416380 (diff) | |
download | poky-a2e5746f29078c805b1e1e28471f323be4d59294.tar.gz |
bitbake: user-manual-intro.xml: General edits to Introduction chapter.
I performed a general edit to this chapter. Some significant changes
include changing the chapter's title to "Overview" when it was titled
"BitBake User Manual", doing some consolidation of text to eliminate
a couple sections that described methods to obtain a copy of BitBake,
and various improvements as needed.
(Bitbake rev: f635c4b36af79b8572095083a392fb58c11198c9)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/doc/user-manual/user-manual-intro.xml | 230 |
1 files changed, 105 insertions, 125 deletions
diff --git a/bitbake/doc/user-manual/user-manual-intro.xml b/bitbake/doc/user-manual/user-manual-intro.xml index f013ee6f45..8ce046a340 100644 --- a/bitbake/doc/user-manual/user-manual-intro.xml +++ b/bitbake/doc/user-manual/user-manual-intro.xml | |||
@@ -2,7 +2,7 @@ | |||
2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | 2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
3 | 3 | ||
4 | <chapter id="user-manual-intro"> | 4 | <chapter id="user-manual-intro"> |
5 | <title>BitBake User Manual</title> | 5 | <title>Overview</title> |
6 | 6 | ||
7 | <section id="intro"> | 7 | <section id="intro"> |
8 | <title>Introduction</title> | 8 | <title>Introduction</title> |
@@ -63,7 +63,7 @@ | |||
63 | <itemizedlist> | 63 | <itemizedlist> |
64 | <listitem><para>BitBake, a generic task executor</para></listitem> | 64 | <listitem><para>BitBake, a generic task executor</para></listitem> |
65 | <listitem><para>OpenEmbedded, a metadata set utilized by | 65 | <listitem><para>OpenEmbedded, a metadata set utilized by |
66 | BitBake.</para></listitem> | 66 | BitBake</para></listitem> |
67 | </itemizedlist> | 67 | </itemizedlist> |
68 | Today, BitBake is the primary basis of the | 68 | Today, BitBake is the primary basis of the |
69 | <ulink url="http://www.openembedded.org/">OpenEmbedded</ulink> | 69 | <ulink url="http://www.openembedded.org/">OpenEmbedded</ulink> |
@@ -97,51 +97,50 @@ | |||
97 | Support running any number of tasks within a given | 97 | Support running any number of tasks within a given |
98 | package, including, but not limited to, fetching | 98 | package, including, but not limited to, fetching |
99 | upstream sources, unpacking them, patching them, | 99 | upstream sources, unpacking them, patching them, |
100 | configuring them, etc. | 100 | configuring them, and so forth. |
101 | </para></listitem> | 101 | </para></listitem> |
102 | <listitem><para> | 102 | <listitem><para> |
103 | Must be Linux distribution agnostic (both build and | 103 | Be Linux distribution agnostic for both build and |
104 | target). | 104 | target systems. |
105 | </para></listitem> | 105 | </para></listitem> |
106 | <listitem><para> | 106 | <listitem><para> |
107 | Must be architecture agnostic | 107 | Be architecture agnostic. |
108 | </para></listitem> | 108 | </para></listitem> |
109 | <listitem><para> | 109 | <listitem><para> |
110 | Must support multiple build and target operating systems | 110 | Support multiple build and target operating systems |
111 | (including Cygwin, the BSDs, etc). | 111 | (e.g. Cygwin, the BSDs, and so forth). |
112 | </para></listitem> | 112 | </para></listitem> |
113 | <listitem><para> | 113 | <listitem><para> |
114 | Must be able to be self contained, rather than tightly | 114 | Be self contained, rather than tightly |
115 | integrated into the build machine's root | 115 | integrated into the build machine's root |
116 | filesystem. | 116 | filesystem. |
117 | </para></listitem> | 117 | </para></listitem> |
118 | <listitem><para> | 118 | <listitem><para> |
119 | There must be a way to handle conditional metadata | 119 | Handle conditional metadata on the target architecture, |
120 | (on target architecture, operating system, | 120 | operating system, distribution, and machine. |
121 | distribution, machine). | ||
122 | </para></listitem> | 121 | </para></listitem> |
123 | <listitem><para> | 122 | <listitem><para> |
124 | It must be easy for the person using the tools to | 123 | Be easy to use the tools to supply local metadata and packages |
125 | supply their own local metadata and packages | 124 | against which to operate. |
126 | to operate against. | ||
127 | </para></listitem> | 125 | </para></listitem> |
128 | <listitem><para> | 126 | <listitem><para> |
129 | Must make it easy to collaborate between multiple | 127 | Be easy to use BitBake to collaborate between multiple |
130 | projects using BitBake for their builds. | 128 | projects for their builds. |
131 | </para></listitem> | 129 | </para></listitem> |
132 | <listitem><para> | 130 | <listitem><para> |
133 | Should provide an inheritance mechanism to share | 131 | Provide an inheritance mechanism that share |
134 | common metadata between many packages. | 132 | common metadata between many packages. |
135 | </para></listitem> | 133 | </para></listitem> |
136 | </itemizedlist> | 134 | </itemizedlist> |
137 | Over time it has become apparent that some further requirements | 135 | Over time it became apparent that some further requirements |
138 | were necessary: | 136 | were necessary: |
139 | <itemizedlist> | 137 | <itemizedlist> |
140 | <listitem><para> | 138 | <listitem><para> |
141 | Handle variants of a base recipe (native, sdk, multilib). | 139 | Handle variants of a base recipe (e.g. native, sdk, |
140 | and multilib). | ||
142 | </para></listitem> | 141 | </para></listitem> |
143 | <listitem><para> | 142 | <listitem><para> |
144 | Able to split metadata into layers and allow layers | 143 | Split metadata into layers and allow layers |
145 | to override each other. | 144 | to override each other. |
146 | </para></listitem> | 145 | </para></listitem> |
147 | <listitem><para> | 146 | <listitem><para> |
@@ -155,7 +154,7 @@ | |||
155 | with extensions being made to the basic functionality to | 154 | with extensions being made to the basic functionality to |
156 | reflect the additional requirements. | 155 | reflect the additional requirements. |
157 | Flexibility and power have always been the priorities. | 156 | Flexibility and power have always been the priorities. |
158 | It is highly extensible, supporting embedded Python code and | 157 | BitBake is highly extensible and supports embedded Python code and |
159 | execution of any arbitrary tasks. | 158 | execution of any arbitrary tasks. |
160 | </para> | 159 | </para> |
161 | </section> | 160 | </section> |
@@ -169,23 +168,30 @@ | |||
169 | what tasks are required to run, and executes those tasks. | 168 | what tasks are required to run, and executes those tasks. |
170 | Similar to GNU Make, BitBake controls how software is | 169 | Similar to GNU Make, BitBake controls how software is |
171 | built. | 170 | built. |
172 | GNU Make does this using "makefiles". BitBake uses | 171 | GNU Make achieves its control through "makefiles". |
173 | "recipes". | 172 | BitBake uses "recipes". |
173 | </para> | ||
174 | |||
175 | <para> | ||
174 | BitBake extends the capabilities of a simple | 176 | BitBake extends the capabilities of a simple |
175 | tool like GNU make by allowing for much more complex tasks | 177 | tool like GNU Make by allowing for much more complex tasks |
176 | to be completed, such as assembling entire embedded Linux | 178 | to be completed, such as assembling entire embedded Linux |
177 | distributions. Several concepts must be understood to be able | 179 | distributions. |
178 | to leverage the power of the tool. | 180 | </para> |
181 | |||
182 | <para> | ||
183 | The remainder of this section introduces several concepts | ||
184 | that should be understood in order to better leverage | ||
185 | the power of BitBake. | ||
179 | </para> | 186 | </para> |
180 | 187 | ||
181 | <section id='recipes'> | 188 | <section id='recipes'> |
182 | <title>Recipes</title> | 189 | <title>Recipes</title> |
183 | 190 | ||
184 | <para> | 191 | <para> |
185 | A BitBake Recipe, denoted by the file extension | 192 | BitBake Recipes, which are denoted by the file extension |
186 | <filename>.bb</filename> is the most | 193 | <filename>.bb</filename>, are the most basic metadata files. |
187 | basic metadata file. | 194 | These recipe files provide BitBake the following: |
188 | These recipe files tell BitBake the following: | ||
189 | <itemizedlist> | 195 | <itemizedlist> |
190 | <listitem><para>Descriptive information about the package</para></listitem> | 196 | <listitem><para>Descriptive information about the package</para></listitem> |
191 | <listitem><para>The version of the recipe</para></listitem> | 197 | <listitem><para>The version of the recipe</para></listitem> |
@@ -193,19 +199,21 @@ | |||
193 | <listitem><para>Where the source code resides</para></listitem> | 199 | <listitem><para>Where the source code resides</para></listitem> |
194 | <listitem><para>Whether the source code requires any patches</para></listitem> | 200 | <listitem><para>Whether the source code requires any patches</para></listitem> |
195 | <listitem><para>How to compile the source code</para></listitem> | 201 | <listitem><para>How to compile the source code</para></listitem> |
196 | <listitem><para>Where on the target machine to install the package being compiled</para></listitem> | 202 | <listitem><para>Where on the target machine to install the |
203 | package being compiled</para></listitem> | ||
197 | </itemizedlist> | 204 | </itemizedlist> |
198 | </para> | 205 | </para> |
199 | 206 | ||
200 | <para> | 207 | <para> |
201 | Within the context of BitBake, or any project utilizing BitBake | 208 | Within the context of BitBake, or any project utilizing BitBake |
202 | as it's build system, files with the <filename>.bb</filename> | 209 | as it's build system, files with the <filename>.bb</filename> |
203 | extension are referred | 210 | extension are referred to as recipes. |
204 | to as recipes. | 211 | <note> |
205 | The term "package" is also commonly used to describe recipes. | 212 | The term "package" is also commonly used to describe recipes. |
206 | However, since the same word is used to describe packaged | 213 | However, since the same word is used to describe packaged |
207 | output from a project, it is best to maintain a single | 214 | output from a project, it is best to maintain a single |
208 | descriptive term, "recipes". | 215 | descriptive term, "recipes". |
216 | </note> | ||
209 | </para> | 217 | </para> |
210 | </section> | 218 | </section> |
211 | 219 | ||
@@ -213,18 +221,18 @@ | |||
213 | <title>Configuration Files</title> | 221 | <title>Configuration Files</title> |
214 | 222 | ||
215 | <para> | 223 | <para> |
216 | Configuration files, denoted by the | 224 | Configuration files, which are denoted by the |
217 | <filename>.conf</filename> extension define | 225 | <filename>.conf</filename> extension, define |
218 | various configuration variables that govern the project build | 226 | various configuration variables that govern the project's build |
219 | process. | 227 | process. |
220 | These files fall into several areas that define | 228 | These files fall into several areas that define |
221 | machine configuration options, distribution configuration | 229 | machine configuration options, distribution configuration |
222 | options, compiler tuning options, general common | 230 | options, compiler tuning options, general common |
223 | configuration options and user configuration options. | 231 | configuration options, and user configuration options. |
224 | The main configuration file is the sample | 232 | The main configuration file is the sample |
225 | <filename>bitbake.conf</filename> file, | 233 | <filename>bitbake.conf</filename> file, which is |
226 | located within the bitbake source tree | 234 | located within the BitBake source tree |
227 | <filename>/conf</filename> directory. | 235 | <filename>conf</filename> directory. |
228 | </para> | 236 | </para> |
229 | </section> | 237 | </section> |
230 | 238 | ||
@@ -232,20 +240,21 @@ | |||
232 | <title>Classes</title> | 240 | <title>Classes</title> |
233 | 241 | ||
234 | <para> | 242 | <para> |
235 | Class files, denoted by the | 243 | Class files, which are denoted by the |
236 | <filename>.bbclass</filename> extension contain | 244 | <filename>.bbclass</filename> extension, contain |
237 | information that is useful to share between metadata files. | 245 | information that is useful to share between metadata files. |
238 | The BitBake source tree comes with one class metadata file | 246 | The BitBake source tree currently comes with one class metadata file |
239 | currently, called <filename>base.bbclass</filename> and it is | 247 | called <filename>base.bbclass</filename>. |
240 | found in the <filename>/classes</filename> directory. | 248 | You can find this file in the |
249 | <filename>classes</filename> directory. | ||
241 | The <filename>base.bbclass</filename> is special in that any | 250 | The <filename>base.bbclass</filename> is special in that any |
242 | new classes that a developer adds to a project is required to | 251 | new classes that a developer adds to a project are required to |
243 | inherit it automatically. | 252 | inherit <filename>base.bbclass</filename> automatically. |
244 | This class contains definitions for standard basic tasks such | 253 | This class contains definitions for standard basic tasks such |
245 | as fetching, unpacking, configuring (empty by default), | 254 | as fetching, unpacking, configuring (empty by default), |
246 | compiling (runs any Makefile present), installing (empty by | 255 | compiling (runs any Makefile present), installing (empty by |
247 | default) and packaging (empty by default). | 256 | default) and packaging (empty by default). |
248 | These classes are often overridden or extended by other classes | 257 | These tasks are often overridden or extended by other classes |
249 | added during the project development process. | 258 | added during the project development process. |
250 | </para> | 259 | </para> |
251 | </section> | 260 | </section> |
@@ -255,82 +264,53 @@ | |||
255 | <title>Obtaining BitBake</title> | 264 | <title>Obtaining BitBake</title> |
256 | 265 | ||
257 | <para> | 266 | <para> |
258 | There are several ways to obtain BitBake. | 267 | You can obtain BitBake several different ways: |
259 | These include installing using your Linux distribution's | 268 | <itemizedlist> |
260 | package management system (not recommended), downloading | 269 | <listitem><para><emphasis>Installation using your Distribution |
261 | a snapshot from the BitBake source | 270 | Package Management System:</emphasis> |
262 | code repository, or using Git to clone the BitBake source | 271 | This method is not |
263 | code repository. | 272 | recommended because the BitBake version, in most |
264 | The recommended method for daily BitBake use is to download | 273 | cases provided by your distribution, is several |
265 | a stable release from the BitBake source code repository. | 274 | releases behind a snapshot of the BitBake repository. |
266 | Using your distribution's version as provided in the package | 275 | </para></listitem> |
267 | management system is generally not | 276 | <listitem><para><emphasis>Taking a snapshot of BitBake:</emphasis> |
268 | recommended as in most cases, such as with the Ubuntu and | 277 | Downloading a snapshot of BitBake from the |
269 | Fedora distributions, the version provided is several releases | 278 | source code repository is the recommended method |
270 | behind the repository snapshot version and is missing | 279 | as you are assured of having the most recent stable |
271 | important bug fixes and enhancements. Similarly, daily use | 280 | BitBake release.</para> |
272 | of the latest clone of the Git repository is not recommended | 281 | <para>The following example downloads a snapshot of |
273 | as it can be unstable. | 282 | BitBake version 1.17.0: |
274 | However, the Git repository clone will provide the User | 283 | <literallayout class='monospaced'> |
275 | with the absolute latest version of BitBake. | ||
276 | </para> | ||
277 | </section> | ||
278 | |||
279 | <section id='downloading-a-snapshot-from-the-bitbake-source-tree'> | ||
280 | <title>Downloading a Snapshot from the BitBake Source Tree</title> | ||
281 | |||
282 | <para> | ||
283 | The recommended method for obtaining and using BitBake on | ||
284 | a daily basis is to download the most | ||
285 | recent stable snapshot from the Git source code repository | ||
286 | as follows: | ||
287 | <literallayout class='monospaced'> | ||
288 | $ wget http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz | 284 | $ wget http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz |
289 | $ tar zxpvf bitbake-1.17.0.tar.gz | 285 | $ tar zxpvf bitbake-1.17.0.tar.gz |
290 | </literallayout> | 286 | </literallayout> |
291 | After extraction of the tarball using the tar utility, | 287 | After extraction of the tarball using the tar utility, |
292 | you will have a directory entitled | 288 | you have a directory entitled |
293 | <filename>bitbake-1.17.0</filename>. | 289 | <filename>bitbake-1.17.0</filename>. |
294 | </para> | 290 | </para></listitem> |
295 | </section> | 291 | <listitem><para><emphasis>Cloning BitBake:</emphasis> |
296 | 292 | Using Git to clone the BitBake source code repository | |
297 | <section id='cloning-the-bitbake-git-repository'> | 293 | is also a recommended method when you need the absolute latest |
298 | <title>Cloning the BitBake Git Repository</title> | 294 | BitBake source. |
299 | 295 | Realize that using this method could expose you to areas of | |
300 | <para> | 296 | BitBake that are under development.</para> |
301 | To obtain the latest BitBake source code from the | 297 | <para>Here is an example: |
302 | BitBake Git repository: | 298 | <literallayout class='monospaced'> |
303 | <literallayout class='monospaced'> | ||
304 | $ git clone git://git.openembedded.org/bitbake | 299 | $ git clone git://git.openembedded.org/bitbake |
305 | </literallayout> | 300 | </literallayout> |
306 | This will clone the BitBake Git repository into a | 301 | This command clones the BitBake Git repository into a |
307 | directory called <filename>bitbake</filename>. | 302 | directory called <filename>bitbake</filename>. |
308 | Alternatively, you can | 303 | Alternatively, you can |
309 | designate a directory after the git clone command | 304 | designate a directory after the |
310 | if you'd prefer to call the new directory something | 305 | <filename>git clone</filename> command |
311 | other than <filename>bitbake</filename>. | 306 | if you want to call the new directory something |
312 | For example: | 307 | other than <filename>bitbake</filename>. |
313 | <literallayout class='monospaced'> | 308 | Here is an example that names the directory |
309 | <filename>bbdev</filename>: | ||
310 | <literallayout class='monospaced'> | ||
314 | $ git clone git://git.openembedded.org/bitbake bbdev | 311 | $ git clone git://git.openembedded.org/bitbake bbdev |
315 | </literallayout> | 312 | </literallayout></para></listitem> |
316 | This would clone the Git repository into a local directory | 313 | </itemizedlist> |
317 | called <filename>bbdev</filename>. | ||
318 | Please note that although this method of obtaining the | ||
319 | source code will provide the absolute latest version, | ||
320 | it is under active development and may not be as stable | ||
321 | as a released snapshot. | ||
322 | </para> | ||
323 | </section> | ||
324 | |||
325 | <section id='summary'> | ||
326 | <title>Summary</title> | ||
327 | |||
328 | <para> | ||
329 | At this point you should have a general idea of the concepts | ||
330 | that BitBake was built on and how the | ||
331 | source code is organized. | ||
332 | You should have a working version of BitBake installed | ||
333 | and understand how to setup your environment. | ||
334 | </para> | 314 | </para> |
335 | </section> | 315 | </section> |
336 | </chapter> | 316 | </chapter> |