Optimizing the source code download
To improve the robustness of source code download, Poky provides a mirror mechanism that can provide the following:
- A centrally preferred server for download
- A set of fallback servers
To provide this robust download mechanism, BitBake follows defined logic steps. During the build, the first BitBake step is to search for the source code within the local download directory (specified by DL_DIR
). If this fails, the next step is to try the locations defined by the PREMIRRORS
variable. Finally, BitBake searches the locations specified in the MIRRORS
variable in a failure case. In summary, these steps are as follows:
DL_DIR
: Look for the download on the host machine.MIRRORS
: Search for the download in a list of mirrors.PREMIRRORS
: This is used to reduce the download from external servers and is usually used inside companies to reduce or forbid internet use.
For example, when configuring a local server, https...