diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2014-06-17 15:18:53 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-18 10:30:50 +0100 |
commit | d785a16dffd7788ea82ef71898b2f508fc15344c (patch) | |
tree | 2a03e6489adfc5085df7ed5001c22f25bd51ebce /documentation/dev-manual | |
parent | 45a1c42e7e1fd981027f0dcd9eae7a204a0d9f95 (diff) | |
download | poky-d785a16dffd7788ea82ef71898b2f508fc15344c.tar.gz |
dev-manual, yocto-project-qs: New section on working with source files.
Fixes [YOCTO #5566]
For the dev-manual, I created a new section called "Working
with Source Files." In the section, I cover how to set up mirrors
and also how to pre-fetch source using the bitbake -c fetchall
<target> command.
For the yocto-project-qs, I removed the mirror information in the
"Super User" section, which became redundant with the new section
now in the dev-manual. I also, removed the fetchall variation of
the bitbake command. Both areas reference into the new section of
the dev-manual now.
(From yocto-docs rev: f314061e3e752d35ea85ed16a60f7f9292180921)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 76f50345e3..0d16dbec15 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -6025,6 +6025,103 @@ Gateways via their Web Interfaces</ulink>"</emphasis> | |||
6025 | </section> | 6025 | </section> |
6026 | </section> | 6026 | </section> |
6027 | 6027 | ||
6028 | <section id='working-with-source-files'> | ||
6029 | <title>Working with Source Files</title> | ||
6030 | |||
6031 | <para> | ||
6032 | The OpenEmbedded build system works with source files located | ||
6033 | through the | ||
6034 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> | ||
6035 | variable. | ||
6036 | When you build something using BitBake, a big part of the operation | ||
6037 | is locating and downloading all the source tarballs. | ||
6038 | For images, downloading all the source for various packages can | ||
6039 | take a significant amount of time. | ||
6040 | </para> | ||
6041 | |||
6042 | <para> | ||
6043 | This section presents information for working with source | ||
6044 | files that can lead to more efficient use of resources and | ||
6045 | time. | ||
6046 | </para> | ||
6047 | |||
6048 | <section id='setting-up-effective-mirrors'> | ||
6049 | <title>Setting up Effective Mirrors</title> | ||
6050 | |||
6051 | <para> | ||
6052 | As mentioned, a good deal that goes into a Yocto Project | ||
6053 | build is simply downloading all of the source tarballs. | ||
6054 | Maybe you have been working with another build system | ||
6055 | (OpenEmbedded or Angstrom) for which you have built up a | ||
6056 | sizable directory of source tarballs. | ||
6057 | Or, perhaps someone else has such a directory for which you | ||
6058 | have read access. | ||
6059 | If so, you can save time by adding statements to your | ||
6060 | configuration file so that the build process checks local | ||
6061 | directories first for existing tarballs before checking the | ||
6062 | Internet. | ||
6063 | </para> | ||
6064 | |||
6065 | <para> | ||
6066 | Here is an efficient way to set it up in your | ||
6067 | <filename>local.conf</filename> file: | ||
6068 | <literallayout class='monospaced'> | ||
6069 | SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/" | ||
6070 | INHERIT += "own-mirrors" | ||
6071 | BB_GENERATE_MIRROR_TARBALLS = "1" | ||
6072 | # BB_NO_NETWORK = "1" | ||
6073 | </literallayout> | ||
6074 | </para> | ||
6075 | |||
6076 | <para> | ||
6077 | In the previous example, the | ||
6078 | <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink> | ||
6079 | variable causes the OpenEmbedded build system to generate | ||
6080 | tarballs of the Git repositories and store them in the | ||
6081 | <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink> | ||
6082 | directory. | ||
6083 | Due to performance reasons, generating and storing these | ||
6084 | tarballs is not the build system's default behavior. | ||
6085 | </para> | ||
6086 | |||
6087 | <para> | ||
6088 | You can also use the | ||
6089 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PREMIRRORS'><filename>PREMIRRORS</filename></ulink> | ||
6090 | variable. | ||
6091 | For an example, see the variable's glossary entry in the | ||
6092 | Yocto Project Reference Manual. | ||
6093 | </para> | ||
6094 | </section> | ||
6095 | |||
6096 | <section id='getting-source-files-and-suppressing-the-build'> | ||
6097 | <title>Getting Source Files and Suppressing the Build</title> | ||
6098 | |||
6099 | <para> | ||
6100 | Another technique you can use to ready yourself for a | ||
6101 | successive string of build operations, is to pre-fetch | ||
6102 | all the source files without actually starting a build. | ||
6103 | This technique lets you work through any download issues | ||
6104 | and ultimately gathers all the source files into your | ||
6105 | download directory | ||
6106 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-build-downloads'><filename>build/downloads</filename></ulink>, | ||
6107 | which is located with | ||
6108 | <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>. | ||
6109 | </para> | ||
6110 | |||
6111 | <para> | ||
6112 | Use the following BitBake command form to fetch all the | ||
6113 | necessary sources without starting the build: | ||
6114 | <literallayout class='monospaced'> | ||
6115 | $ bitbake -c fetchall <target> | ||
6116 | </literallayout> | ||
6117 | This variation of the BitBake command guarantees that you | ||
6118 | have all the sources for that BitBake target should you | ||
6119 | disconnect from the Internet and want to do the build | ||
6120 | later offline. | ||
6121 | </para> | ||
6122 | </section> | ||
6123 | </section> | ||
6124 | |||
6028 | <section id="building-software-from-an-external-source"> | 6125 | <section id="building-software-from-an-external-source"> |
6029 | <title>Building Software from an External Source</title> | 6126 | <title>Building Software from an External Source</title> |
6030 | 6127 | ||