1

I am new to bitbake. I am going through the user manual for learning and I got a doubt in the section quoted below

3.5.3. Passing Information Into the Build Task Environment

When running a task, BitBake tightly controls the execution environment of the build tasks to make sure unwanted contamination from the build machine cannot influence the build. Consequently, if you do want something to get passed into the build task environment, you must take these two steps:

  1. Tell BitBake to load what you want from the environment into the datastore. You can do so through the BB_ENV_EXTRAWHITE variable. For example, assume you want to prevent the build system from accessing your $HOME/.ccache directory. The following command tells BitBake to load CCACHE_DIR from the environment into the datastore:

    export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
    
  2. Tell BitBake to export what you have loaded into the datastore to the task environment of every running task. Loading something from the environment into the datastore (previous step) only makes it available in the datastore. To export it to the task environment of every running task, use a command similar to the following in your local configuration file local.conf or your distribution configuration file:

    export CCACHE_DIR
    

It says from external environment i have to load necessary values to datastore and from there export to task environment.

As per my understanding it is something like from my PC i have load in necessary data to a structure called datastore and that should be loaded in bitbake environment for it to get processed by bitbake.

But i am not able to get a clear overview.

Can you explain me (if possible with example) what are external environment variables, internal environment variable and datastore?

muru
  • 69,900
  • 13
  • 192
  • 292
jeyshree
  • 11
  • 1
  • You understood that a main goal of `bitbake` is to achieve the same results independent from the build host? Before you want to learn how to circumvent this rule, please let me ask you: What for? Why do you think this is necessary? Make sure this is really, really needed. I suggest to change the question to something like »I want to pass *xxx* to my build environment, because *yyy*. How do I do it correctly?« – Philippos May 24 '22 at 08:29
  • @Philippos sir.i am new to linux and bitbake too.the way i asked question might be wrong.please try to give a picture of what is datastore with example – jeyshree May 24 '22 at 09:12
  • Some people are already about to close this question, because it's more like a tutorial request, which is off topic on this site. My suggestion for someone new to yocto: Don't care about that. You will very likely never need it and don't need to understand it. Build your first yocto images, try to adapt them and come back with any issue you encounter. – Philippos May 24 '22 at 09:37

0 Answers0