Yocto BB_ENV_PASSTHROUGH_ADDITIONS

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_ADDITIONSto use common `DL_DIR` and `SSTATE_DIR` across all all your projects.

  1. 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"
  2. 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.

Written by

No Comment

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *