[yocto] How to set SRC_URI in local.conf / how to set any variable of a specific recipe in local.conf

Andre McCurdy armccurdy at gmail.com
Mon Apr 9 14:06:51 PDT 2018


On Sat, Apr 7, 2018 at 8:04 AM, Jakob Hasse <jakob.hasse at qiio.com> wrote:
>
> how can I set a another branch, i.e., the SRC_URI variable for a specific
> recipe in conf/local.conf? Or more general: how can I change the variable of
> any recipe in local.conf temporarily? I tried something like this already:
> SRC_<recipe-name> = "..."
> SRC-<recipe-name> = "..."
> SRC_pn-<recipe-name> = "..."
>
> I would like to switch a recipe to a testing branch temporarily via
> local.conf without playing around in the actual recipes.

For your own temporary testing, modifying the actual recipes would be fine.

However, if you need to make the change via local.conf, then the
procedure would be something like:

1) Capture output of "bitbake -e recipe-name" into a file

2) From the bitbake environment for recipe-name, check what the
original value of SRC_URI is. For example, it may be something like:

  SRC_URI="git://git.project.com/foo file://fixes.patch"

3) Also from the bitbake environment for recipe-name, check which
over-rides are active. For example, it maybe something like:

  OVERRIDES="linux:i586:build-linux:pn-recipe-name:x86:qemuall:qemux86:spooky:class-target:forcevariable:libc-glibc"

4) Pick an over-ride. Since you want to use a global config file to
make a recipe specific change, you need to use the recipe specific
over-ride, ie "pn-recipe-name".

5) Update the SRC_URI from step 2 as you want and then define it in
local.conf using the over-ride you found in step 3. For example:

  SRC_URI_pn-recipe-name = "git://git.project.com/foo2 file://fixes.patch"



More information about the yocto mailing list