[yocto] Path to current bb-file or layer

Svein Seldal sveinse at seldal.com
Thu Sep 21 13:00:24 PDT 2017


To determine a image version, I'd like to read a VERSION file which is 
located in the root of the layer. (Per our development procedure.) I'd 
like to read it from a bbclass file. However I seem to be unable to find 
any methods or variables to find a useful path to either the current 
bb-file or the root of the layer.

The only way I have found is to parse through BBLAYERS and guess at what 
my own layer is of those, and then use the found to access the file. But 
this feels very wacky.

Is there a reason why bitbake doesn't have a variable path reference to 
the current file?


Best regards,
Svein



More information about the yocto mailing list