[yocto] How to specify a default value for a variable in a recipe

Patrick Doyle wpdster at gmail.com
Fri Jun 13 07:07:00 PDT 2014


On Fri, Jun 13, 2014 at 9:47 AM, Gary Thomas <gary at mlbassoc.com> wrote:
> If this is in the gstxbac recipe itself, use the much simpler
>   SRCREV ?= "${AUTOREV}"

Even better!  While I like that solution best of all, that opens up a
whole new world of hurt for me.

How does

SRCREV_default_pn-gstxbac = "${AUTOREV}"

work?  When would I use that over the much simpler solution you proposed?

I am thinking that if I used your solution, I might place

SRCREV_pn-gstxbac = "123" (or a git hash, or whatever)

in my local.conf?  in my BSP layer.conf?

I guess I could put

SRCREV_default_pn-gstxbac = "123" in my BSP layer.conf, and then,
later on, on some other project that used the same board, I might put

SRCREV_pn-gstxbac = "${AUTOREV}" in my local.conf, or maybe in a
.bbappend file for my BSP?

How/where does the _pn suffix (middlex?) come into play?

At this point, I like your solution tremendously, as it makes sense to
me.  But I sure would like to understand more about all the myriad
capabilities offered by bitbake.

--wpd



More information about the yocto mailing list