diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /documentation/dev-manual/efficiently-fetching-sources.rst | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/efficiently-fetching-sources.rst')
| -rw-r--r-- | documentation/dev-manual/efficiently-fetching-sources.rst | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/documentation/dev-manual/efficiently-fetching-sources.rst b/documentation/dev-manual/efficiently-fetching-sources.rst deleted file mode 100644 index a3366226c0..0000000000 --- a/documentation/dev-manual/efficiently-fetching-sources.rst +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Efficiently Fetching Source Files During a Build | ||
| 4 | ************************************************ | ||
| 5 | |||
| 6 | The OpenEmbedded build system works with source files located through | ||
| 7 | the :term:`SRC_URI` variable. When | ||
| 8 | you build something using BitBake, a big part of the operation is | ||
| 9 | locating and downloading all of the source code. For images, | ||
| 10 | downloading all the source for various packages can take a significant | ||
| 11 | amount of time. | ||
| 12 | |||
| 13 | This section shows you how you can use mirrors to speed up fetching | ||
| 14 | source files and how you can pre-fetch files all of which leads to more | ||
| 15 | efficient use of resources and time. | ||
| 16 | |||
| 17 | Setting up Effective Mirrors | ||
| 18 | ============================ | ||
| 19 | |||
| 20 | A good deal that goes into a Yocto Project build is simply downloading | ||
| 21 | source code. Maybe you have been working with another | ||
| 22 | build system for which you have built up a | ||
| 23 | sizable directory of source tarballs. Or, perhaps someone else has such | ||
| 24 | a directory for which you have read access. If so, you can save time by | ||
| 25 | adding statements to your configuration file so that the build process | ||
| 26 | checks local directories first for existing tarballs before checking the | ||
| 27 | Internet. | ||
| 28 | |||
| 29 | Here is an efficient way to set it up in your ``local.conf`` file:: | ||
| 30 | |||
| 31 | SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/" | ||
| 32 | INHERIT += "own-mirrors" | ||
| 33 | BB_GENERATE_MIRROR_TARBALLS = "1" | ||
| 34 | # BB_NO_NETWORK = "1" | ||
| 35 | |||
| 36 | In the previous example, the | ||
| 37 | :term:`BB_GENERATE_MIRROR_TARBALLS` | ||
| 38 | variable causes the OpenEmbedded build system to generate tarballs of | ||
| 39 | the Git repositories and store them in the | ||
| 40 | :term:`DL_DIR` directory. Due to | ||
| 41 | performance reasons, generating and storing these tarballs is not the | ||
| 42 | build system's default behavior. | ||
| 43 | |||
| 44 | You can also use the | ||
| 45 | :term:`PREMIRRORS` variable. For | ||
| 46 | an example, see the variable's glossary entry in the Yocto Project | ||
| 47 | Reference Manual. | ||
| 48 | |||
| 49 | Getting Source Files and Suppressing the Build | ||
| 50 | ============================================== | ||
| 51 | |||
| 52 | Another technique you can use to ready yourself for a successive string | ||
| 53 | of build operations, is to pre-fetch all the source files without | ||
| 54 | actually starting a build. This technique lets you work through any | ||
| 55 | download issues and ultimately gathers all the source files into your | ||
| 56 | download directory :ref:`structure-build-downloads`, | ||
| 57 | which is located with :term:`DL_DIR`. | ||
| 58 | |||
| 59 | Use the following BitBake command form to fetch all the necessary | ||
| 60 | sources without starting the build:: | ||
| 61 | |||
| 62 | $ bitbake target --runall=fetch | ||
| 63 | |||
| 64 | This | ||
| 65 | variation of the BitBake command guarantees that you have all the | ||
| 66 | sources for that BitBake target should you disconnect from the Internet | ||
| 67 | and want to do the build later offline. | ||
| 68 | |||
