Optimizing Build Time
Optimizing Build Time in Yocto
Yocto supports smart caching through the use of shared download and sstate (shared state) directories. This significantly reduces build times, especially when reusing previously built artifacts with the same configuration.
To take advantage of this, configure builds to pull prebuilt sources and build artifacts from centralized mirrors:
Source mirrors: Fetch source files from a pre-populated mirror instead of downloading them individually from the Internet.
Sstate mirrors: Use cached build results for previously built components, skipping the need to rebuild them locally.
By pointing to AMD’s hosted mirrors (configured in
local.conf), the build system can reuse existing outputs,
dramatically speeding up the build process.
EDF configures both mirrors out of the box, so a
build machine with a working connection to the Internet already
benefits from them without any edit to local.conf.
See Source Downloads and Shared State Cache for the defaults, the order in
which BitBake consults each source, and what changes for an
offline build.