what is the 'd' variable in bitbake recipes?

This is proving incredibly hard to google for since searching for ‘d’ aliases to so many things. Do you guys know where I can find documentation about this variable?


The above documentation should clear your query

Do you mean -D or -d – Tells BitBake where to install the completed application and its files in preparation for packaging.

I’m not talking about an argument to bitbake, but a variable that seems to exist in the context of all .bb files execution.

It’s not documented in that manual either but I think it might be a shortcut to bb.data
I think it’s some ‘datasmart’ variable that aggregates passed in arguments from various other bitbake recipes.

example :

d.getVar('PN', True)

Maybe this is what you mean. Found in the manual
This is only supported in .bb and .bbclass files.
def get_depends(bb, d):
if bb.data.getVar('SOMECONDITION', d, 1):
return "dependencywithcond"
return "dependency"
= "1"
= "${@get_depends(bb, d)}"
This would result in

I would ask on the OpenEmbedded mailing list for the correct answer, the
other answers currently given are wrong. The bitbake manual will be the
best place to find the answer on your own, however it is significantly
dated at the moment.

I imagine d is an object which represents a recipe. As it is a variable
though, it could really be anything and possibly different depending on
the context.


Please do not give this link out, it refers to OpenEmbedded Classic and
as such is depreciated.

i'm pretty sure it's simply the global "data dictionary", which
keeps track of all of the relevant variables and their values.