exliontamer
exliontamer

Reputation: 125

Understanding bitbake default task

I'm trying to familiarize myself with yocto for work, and I'm reading through "Embedded Linux Systems with The Yocto Project", which is a decent resource, but I think it fails to explain the bigger picture very well.

To familiarize myself with how bitbake works, I created a very simple layer with a recipe called condtest which simply prints out a variable:

LICENSE = "GPLv2+ & LGPLv2+"

VAR1 = "jumps over"
VAR2 = "${VAR1} the lazy dog. "
VAR1 = "falls on"
VAR3 = "The rain in spain ${VAR1} the plain."
VAR4 = "The quick brown fox ${VAR2}"

do_print() {

     echo VAR4: ${VAR4} 
}


addtask print

When I run bitbake -c print condtest bitbake just prints the variable as expected. My confusion comes from when I run bitbake condtest because this causes bitbake to start fetching and compiling a whole bunch of packages. I know that "build" is the default task when -c isn't specified, but since I never defined do_build in my recipe, and I never inherited any classes, what build task is bitbake running?

Upvotes: 1

Views: 242

Answers (1)

Richard Purdie
Richard Purdie

Reputation: 2328

There is always an implied:

INHERIT += "base"

which includes base.bbclass and conf/bitbake.conf is also included. These provide many of the defaults you're relying upon. Placing an empty bitbake.conf alongside local.conf would do something quite different (and break many things but proves how much it does).

Upvotes: 1

Related Questions