From 64f66d78215b3725345f160fabb094ece2972ec7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 18 Jan 2014 16:05:00 +0000 Subject: bitbake: user-manual-bitbakecommand: Reform whitespace (Bitbake rev: f1a6d7029e7adc147655809dca71782a143c5ac5) Signed-off-by: Richard Purdie --- .../doc/user-manual/user-manual-bitbakecommand.xml | 353 ++++++++++++++------- 1 file changed, 245 insertions(+), 108 deletions(-) (limited to 'bitbake') diff --git a/bitbake/doc/user-manual/user-manual-bitbakecommand.xml b/bitbake/doc/user-manual/user-manual-bitbakecommand.xml index 3cf779b12c..d3f4595d84 100644 --- a/bitbake/doc/user-manual/user-manual-bitbakecommand.xml +++ b/bitbake/doc/user-manual/user-manual-bitbakecommand.xml @@ -1,16 +1,24 @@ - - - The BitBake command -
- Introduction - bitbake is the primary command in the system. It facilitates executing tasks in a single .bb file, or executing a given task on a set of multiple .bb files, accounting for interdependencies amongst them. -
-
- Usage and syntax - - $ bitbake --help +"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> + + + The BitBake command + +
+ Introduction + + + bitbake is the primary command in the system. + It facilitates executing tasks in a single .bb + file, or executing a given task on a set of multiple + .bb files, accounting for interdependencies + amongst them. + +
+
+ Usage and syntax + + $ bitbake --help Usage: bitbake [options] [recipename/target ...] Executes the specified task (default is 'build') for a given set of target recipes (.bb files). @@ -80,101 +88,230 @@ Options: -m, --kill-server Terminate the remote server. --observe-only Connect to a server as an observing-only client. --status-only Check the status of the remote bitbake server. - - - - - Executing a task against a single .bb - Executing tasks for a single file is relatively simple. You specify the file in question, and BitBake parses it and executes the specified task (or build by default). It obeys intertask dependencies when doing so. - clean task: - $ bitbake -b blah_1.0.bb -c clean - build task: - $ bitbake -b blah_1.0.bb - - + + + + + + + Executing a task against a single .bb + + + Executing tasks for a single file is relatively simple. + You specify the file in question, and BitBake parses + it and executes the specified task (or build by default). + It obeys intertask dependencies when doing so. + + + clean task: + $ bitbake -b blah_1.0.bb -c clean + build task: + $ bitbake -b blah_1.0.bb + + + + + Executing tasks against a set of .bb files + + There are a number of additional complexities introduced + when one wants to manage multiple .bb + files. + Clearly there needs to be a way to tell BitBake what + files are available, and of those, which we + want to execute at this time + There also needs to be a way for each .bb + to express its dependencies, both for build time and + runtime. + There must be a way for the user to express their preferences + when multiple .bb's provide the same functionality, or when + there are multiple versions of a .bb. + + + + The next section, Metadata, outlines how to specify such things. + + + + Note that the bitbake command, when not using + --buildfile, accepts a PROVIDER, not a filename or + anything else. + By default, a .bb generally PROVIDES its + packagename, packagename-version, and packagename-version-revision. + + $ bitbake blah + $ bitbake blah-1.0 + $ bitbake blah-1.0-r0 + $ bitbake -c clean blah + $ bitbake virtual/whatever + $ bitbake -c clean virtual/whatever + + + Generating dependency graphs - - Executing tasks against a set of .bb files - There are a number of additional complexities introduced when one wants to manage multiple .bb files. Clearly there needs to be a way to tell BitBake what files are available, and of those, which we want to execute at this time. There also needs to be a way for each .bb to express its dependencies, both for build time and runtime. There must be a way for the user to express their preferences when multiple .bb's provide the same functionality, or when there are multiple versions of a .bb. - The next section, Metadata, outlines how to specify such things. - Note that the bitbake command, when not using --buildfile, accepts a PROVIDER, not a filename or anything else. By default, a .bb generally PROVIDES its packagename, packagename-version, and packagename-version-revision. - $ bitbake blah - $ bitbake blah-1.0 - $ bitbake blah-1.0-r0 - $ bitbake -c clean blah - $ bitbake virtual/whatever - $ bitbake -c clean virtual/whatever - - - Generating dependency graphs - BitBake is able to generate dependency graphs using the dot syntax. These graphs can be converted -to images using the dot application from Graphviz. -Two files will be written into the current working directory, depends.dot containing dependency information at the package level and task-depends.dot containing a breakdown of the dependencies at the task level. To stop depending on common depends, one can use the -I depend to omit these from the graph. This can lead to more readable graphs. This way, DEPENDS from inherited classes such as base.bbclass can be removed from the graph. - $ bitbake -g blah - $ bitbake -g -I virtual/whatever -I bloom blah - - -
-
- Special variables - Certain variables affect BitBake operation: -
- <varname>BB_NUMBER_THREADS</varname> - The number of threads BitBake should run at once (default: 1). -
-
-
- Metadata - As you may have seen in the usage information, or in the information about .bb files, the BBFILES variable is how the BitBake tool locates its files. This variable is a space separated list of files that are available, and supports wildcards. - - Setting BBFILES - BBFILES = "/path/to/bbfiles/*.bb" - - With regard to dependencies, it expects the .bb to define a DEPENDS variable, which contains a space separated list of package names, which themselves are the PN variable. The PN variable is, in general, set to a component of the .bb filename by default. - - Depending on another .bb - a.bb: - PN = "package-a" + BitBake is able to generate dependency graphs using + the dot syntax. + These graphs can be converted to images using the dot + application from + Graphviz. + Two files will be written into the current working directory, + depends.dot containing dependency information + at the package level and task-depends.dot + containing a breakdown of the dependencies at the task level. + To stop depending on common depends, one can use the -I depend + to omit these from the graph. + This can lead to more readable graphs. + This way, DEPENDS from inherited classes + such as base.bbclass can be removed from the + graph. + + $ bitbake -g blah + $ bitbake -g -I virtual/whatever -I bloom blah + + +
+ +
+ Special variables + + + Certain variables affect BitBake operation: + + +
+ <varname>BB_NUMBER_THREADS</varname> + + + The number of threads BitBake should run at once (default: 1). + +
+
+ +
+ Metadata + + As you may have seen in the usage information, or in the + information about .bb files, the + BBFILES variable is how the BitBake + tool locates its files. + This variable is a space separated list of files + that are available, and supports wildcards. + + Setting BBFILES + + BBFILES = "/path/to/bbfiles/*.bb" + + + With regard to dependencies, it expects the + .bb to define a + DEPENDS variable, which contains a + space separated list of package names, which themselves + are the PN variable. The + PN variable is, in general, + set to a component of the .bb + filename by default. + + + + Depending on another .bb + + +a.bb: +PN = "package-a" DEPENDS += "package-b" - - b.bb: - PN = "package-b" - - - - Using PROVIDES - This example shows the usage of the PROVIDES variable, which allows a given .bb to specify what functionality it provides. - package1.bb: - PROVIDES += "virtual/package" - - package2.bb: - DEPENDS += "virtual/package" - - package3.bb: - PROVIDES += "virtual/package" - - As you can see, we have two different .bb's that provide the same functionality (virtual/package). Clearly, there needs to be a way for the person running BitBake to control which of those providers gets used. There is, indeed, such a way. - The following would go into a .conf file, to select package1: - PREFERRED_PROVIDER_virtual/package = "package1" - - - - Specifying version preference - When there are multiple versions of a given package, BitBake defaults to selecting the most recent version, unless otherwise specified. If the .bb in question has a DEFAULT_PREFERENCE set lower than the other .bb's (default is 0), then it will not be selected. This allows the person or persons maintaining the repository of .bb files to specify their preference for the default selected version. In addition, the user can specify their preferred version. - If the first .bb is named a_1.1.bb, then the PN variable will be set to a, and the PV variable will be set to 1.1. - If we then have an a_1.2.bb, BitBake will choose 1.2 by default. However, if we define the following variable in a .conf that BitBake parses, we can change that. - PREFERRED_VERSION_a = "1.1" - - - - Using <quote>bbfile collections</quote> - bbfile collections exist to allow the user to have multiple repositories of bbfiles that contain the same exact package. For example, one could easily use them to make one's own local copy of an upstream repository, but with custom modifications that one does not want upstream. Usage: - BBFILES = "/stuff/openembedded/*/*.bb /stuff/openembedded.modified/*/*.bb" -BBFILE_COLLECTIONS = "upstream local" -BBFILE_PATTERN_upstream = "^/stuff/openembedded/" -BBFILE_PATTERN_local = "^/stuff/openembedded.modified/" -BBFILE_PRIORITY_upstream = "5" -BBFILE_PRIORITY_local = "10" - -
-
+
+ +b.bb: +PN = "package-b" + + + + + Using PROVIDES + + +This example shows the usage of the PROVIDES variable, which allows a given .bb to specify what functionality it provides. + + +package1.bb: +PROVIDES += "virtual/package" + + +package2.bb: +DEPENDS += "virtual/package" + + +package3.bb: +PROVIDES += "virtual/package" + + + As you can see, we have two different + .bb's that provide the same functionality + (virtual/package). + Clearly, there needs to be a way for the person running + BitBake to control which of those providers + gets used. + There is, indeed, such a way. + + +The following would go into a .conf file, to select package1: +PREFERRED_PROVIDER_virtual/package = "package1" + + + + + Specifying version preference + + + When there are multiple versions of a given package, + BitBake defaults to selecting the most recent version, + unless otherwise specified. + If the .bb in question has a + DEFAULT_PREFERENCE set lower than + the other .bb's (default is 0), then it will not be + selected. + This allows the person or persons maintaining + the repository of .bb files to specify + their preference for the default selected version. + In addition, the user can specify their preferred version. + + + + If the first .bb is named + a_1.1.bb, then the + PN variable will be set to + a, and the PV variable will be + set to 1.1. + + + + If we then have an a_1.2.bb, BitBake + will choose 1.2 by default. + However, if we define the following variable in a + .conf that BitBake parses, we + can change that. + PREFERRED_VERSION_a = "1.1" + + + + + Using <quote>bbfile collections</quote> + + + bbfile collections exist to allow the user to + have multiple repositories of + bbfiles that contain the same + exact package. + For example, one could easily use them to make one's + own local copy of an upstream repository, but with + custom modifications that one does not want upstream. + Usage: + + BBFILES = "/stuff/openembedded/*/*.bb /stuff/openembedded.modified/*/*.bb" + BBFILE_COLLECTIONS = "upstream local" + BBFILE_PATTERN_upstream = "^/stuff/openembedded/" + BBFILE_PATTERN_local = "^/stuff/openembedded.modified/" + BBFILE_PRIORITY_upstream = "5" + BBFILE_PRIORITY_local = "10" + +
+
-- cgit v1.2.3-54-g00ecf