0
votes

I tend to build Yocto builds for various boards and versions(sumo, warrior, etc.,). To speedup the builds I use separate DL_DIR & SSTATE_DIR. The structure I followed is given below:

  • Single download dir for all the builds & boards (as most of the builds for different boards use same tool-chain)
  • Separate sstate cache dir for each board

enter image description here

My question is, Can I use single SSTATE_DIR to improve the performance and reducing the folder size? Have anyone tried it?

Suggestions and personal experiences are also appreciated.

1

1 Answers

1
votes

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.