In Yocto Project, BB_ENV_PASSTHROUGH_ADDITIONS
is a variable used to specify additional environment variables that should be passed through to the bitbake build environment. This is useful when you have environment variables in your host system that you want to make available to your bitbake recipes or configuration files.
Here’s a short guide on how to use BB_ENV_PASSTHROUGH_ADDITIONS
to use common `DL_DIR` and `SSTATE_DIR` across all all your projects.
- Add Environment Variables: Add the
BB_ENV_PASSTHROUGH_ADDITIONS
line and specify the environment variables you want to pass through. For example:BB_ENV_PASSTHROUGH_ADDITIONS="DL_DIR SSTATE_DIR"
- Set Environment Variables:
export DL_DIR="${HOME}/build/downloads" export SSTATE_DIR="${HOME}/build/sstate-cache-yp"
Optionally one can specify all three in `.bashrc` to export across all builds.
No Comment