[yocto] Selecting different kernel inside an image recipe

Trevor Woerner twoerner at gmail.com
Tue Aug 4 06:29:45 PDT 2015


Hi Klaus,

On 08/04/15 00:15, Klaus Knopper wrote:
> So, can you confirm that it is not possible to set
> PREFERRED_PROVIDER_virtual/kernel inside an image recipe?

Confirmed, this is not possible.

I too thought it would make sense to choose one's kernel based on which
image you want to build. I was trying this a couple weeks ago and ran
into the exact same issue.

The way it was explained to me is as follows: your choice of kernel
affects a great many other "downstream" choices, therefore it needs to
be known early in the process of bitbake parsing your metadata. As a
result, there are only a few, select places where you can select your
kernel. Some of these include conf/local.conf, your distro.conf, and
your <machine>.conf. Unfortunately your <image>.conf is not one of them.

Also, if your distro or machine set the preferred kernel with an equals
sign, it is harder to override in your local.conf. In this case you
would need to try appending "_forcevariable" to your choice.

Best regards,
	Trevor



More information about the yocto mailing list