Understanding the scope of a variable
The BitBake metadata has thousands of variables, but the scope where these variables are available depends on where it is defined. There are two kinds of variables, as follows:
- Variables defined in configuration files are global to every recipe, also referred to as configuration metadata. The parsing order of the main configuration files is shown as follows:
build/conf/local.conf
<
layer>/conf/machines/<machine>.conf
<
layer>/conf/distro/<distro>.conf
- Variables defined within recipe files have recipe visibility scope that is local to the specific recipe only during the execution of its tasks.