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 must be factored in when sharing your sstate cache with another user. The configuration of the second user can 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 and the original AMD 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-v2022/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 fetches 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 AMD provided sstate.
petalinux-build -c "petalinux-image-minimal --setscene-only"(bitbake petalinux-image-minimal --setsecene-only)