You can share DL_DIR
among all build directories and Yocto versions. Those are just tarballs of sources.
You can share SSTATE_DIR
among all build directories, though it is beneficial only for builds sharing the same Yocto version, otherwise no size or speed improvement at all. This makes sense because many native packages and "base" target packages of machines of the same architecture (in your case aarch64
) are identical for said machines and will make use of the shared SSTATE_DIR
. For non-matching cases, new entries will be added to your SSTATE_DIR
. When you have different Yocto versions, some package recipes have been updated and most often glibc, binutils and gcc are updated. Those are the packages used by almost all other package recipes, which effectively makes it impossible to re-use sstate-cache from earlier (or later) Yocto versions for package recipes that haven't changed since the package recipes they depend on are part of the sstate-cache for said recipes. Also, the Yocto version is in the filename of a sstate-cache entry so anyway they'll be rebuilt.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…