Sharing your State Cache - 2020.2 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2020-11-24
Version
2020.2 English

If you want to share/use your previously build sstate cache, you can follow either of the following approaches.

As an optimization, the Yocto Project optimizes downloads of the sstate cache items to only the minimal items required for the current build. This needs to be factored in when sharing your sstate cache with another user. The second user's configuration may be different causing a different set of sstate cache items to be required. There are two approaches to optimizing your downstream user and their usage of the sstate cache. The first approach is that the second user should include both the sstate cache directory you provided as well as the original Xilinx sstate cache directory in <plnx-proj-root>/build/conf/plnxtool.conf.

SSTATE_MIRRORS = "  \
file://.* file://<your-sstate-cache>/PATH \n \
file://.* http://petalinux.xilinx.com/sswreleases/rel-v2020/aarch64/sstate-cache/PATH;downloadfilename=PATH \n \" 

The second approach is to fetch all of the sstate cache items that can be required for a particular build. This is required if you want to share your build sstate with the downstream user. There is an option called --setscene-only that will fetch all of the sstate objects that might be needed for a particular target recipe. For example, if you used petalinux-build (bitbake petalinux-image-minimal), you should run the following command first to fetch all the required sstate from Xilinx provided sstate.

petalinux-build -c "petalinux-image-minimal --setscene-only"(bitbake petalinux-image-minimal --setsecene-only)