Embedded Linux Development Using Yocto Project Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

Getting ready

The build system runs a search for downloaded sources in a number of places:

Source download hierarchy
  • It tries the local downloads folder.
  • It looks into the configured pre-mirrors, which are usually local to your organization.
  • It then tries to fetch from the upstream source as configured in the package recipe.
  • Finally, it checks the configured mirrors. Mirrors are public alternate locations for the source.

If a package source is not found in any of these four sources, the package build will fail with an error. Build warnings are also issued when upstream fetching fails and mirrors are tried, so that the upstream problem can be looked at.

The Yocto Project, including BSP layers such as meta-freescale, maintains a set of mirrors to isolate the build system from problems with the upstream servers. However, when adding external layers, you could be adding support for packages that are not in the Yocto Project's mirror servers, or other configured mirrors, so it is recommended that you keep a local pre-mirror to avoid problems with source availability.

The default Poky setting for a new project is to store the downloaded package sources on the current build directory. This is the first place the build system will run a search for source downloads. This setting can be configured in your project's conf/local.conf file with the DL_DIR configuration variable.