BitBake's passthrough environment variables

From KoanSoftware Wiki
Revision as of 15:21, 1 December 2025 by Koan (talk | contribs) (Created page with "== BitBake's passthrough environment variables == When you need to manage custom variables in a script having an impact with Bitbake, it is possible to add custom environment variables to BitBake's passthrough mechanism. #!/bin/bash # # A script to demonstrate adding custom environment variables to BitBake's passthrough mechanism. # export CUSTOM="CustomValue" export MYVAR=$CUSTOM-$USER BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BitBake's passthrough environment variables

When you need to manage custom variables in a script having an impact with Bitbake, it is possible to add custom environment variables to BitBake's passthrough mechanism.

   #!/bin/bash
   #
   # A script to demonstrate adding custom environment variables to BitBake's passthrough mechanism.
   #
   
   export CUSTOM="CustomValue"
   export MYVAR=$CUSTOM-$USER
   BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS MYVAR"
   bitbake -e os-release | grep ^MYVAR=

Execution example

 $ ../bitbake-test-passthrough.sh
 MYVAR="custom_value-tux"