Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between do_compile[noexec] and empty function in bitbake recipe?

Tags:

yocto

bitbake

If I want to disable a particular build step, I can use either of these:

do_configure[noexec] = "1"

OR

do_configure() {
}

What is the difference between these alternatives? I have heard there can be raise conditions when using noexec.

like image 936
ATOzTOA Avatar asked May 31 '15 20:05

ATOzTOA


People also ask

How does BitBake work?

Bitbake reads the entire set of recipe files that are specified by the local configuration, and parses them all into a global task namespace. This includes all the class files and include files as well. These are specified by the BBFILES and BBLAYERS variables in the conf/bblayers.

What does BitBake command do?

The bitbake command builds platform projects, application source, and packages. BitBake is the overall control program, which manages builds of all the packages and of the overall system. It builds platform projects, application source, and packages.

What is BitBake in yocto?

Bitbake is a task scheduler that parses Python and Shell script mixed code, which we called Recipes. The code parsed generates and runs tasks. They are a set of steps orders according to the code's dependencies. Metadata is where all the Recipes are located.

What is .BB file in yocto?

bb , are the most basic metadata files. These recipe files provide BitBake with the following: Descriptive information about the package. The version of the recipe. Existing Dependencies.

How does BitBake execute a recipe file task?

Executing tasks for a single recipe file is relatively simple. You specify the file in question, and BitBake parses it and executes the specified task. If you do not specify a task, BitBake executes the default task, which is "build”. BitBake obeys inter-task dependencies when doing so.

How does BitBake work?

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.

Can I use BitBake for something other than programming?

Configuration, tasks and recipes are written in a kind of BitBake DSL (Domain Specific Language) which contain variables and executable shell or python code. So in theory, since BitBake executes code, someone could use BitBake for something else than building software, but this would possibly be not the best idea.

Is BitBake able to figure out dependencies?

Consider a case with in-line Python, for example, where BitBake is not able to figure out dependencies. When running in debug mode (i.e. using -DDD), BitBake produces output when it discovers something for which it cannot figure out dependencies.


1 Answers

Well, there's normally 3 ways of removing a task:

  1. deltask This completely removes the task and also it's dependencies. Thus, the tasks that might depend on the removed task won't get an automatic dependeny on the removed tasks dependencies. (A->B->C, and removing B doesn't create A->C). Thus, this should only be used if you know what you're doing.
  2. Setting the task to empty do_task() { : }. This is the old way of disabling a task. The task will still be executed, but there's nothing in it do to. Thus, the execution overhead will remain.
  3. do_task[noexec], the newer way of disabling a task. Pretty similar to 2., but won't keep the execution overhead (as the task will never execute at all).
like image 59
Anders Avatar answered Oct 20 '22 16:10

Anders