'Where yocto assign default kernel?

There are many kernel *.bb in

~/poky/meta/recipes-kernel/linux

I don't have PREFERRED_PROVIDER_virtual/kernel defined in local.conf

I also include meta-intel layer, I think meta-intel has it's kernel recipe also.

After built the yocto image, boot, and login, type 'uname -a' result is

Linux genericx86-64 5.4.20-yocto-standard xxxxx

I think yocto select it's poky kernel, but I can't find where this default setting located. ( which file setting this kernel )



Solution 1:[1]

Usually you can find it in the machine conf in :

meta-yourmeta/conf/machine/yourmachine.conf

The list of supported kernels by your machine is in recipes-kernel of your BSP.

Solution 2:[2]

It's set by MACHINE, if I'm not wrong.

Solution 3:[3]

If you are unsure of your setting of PREFERRED_PROVIDER_virtual/kernel you can also use bitbake -e <recipe> to see how it is set.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Z.Zakaria
Solution 2 Ilya S
Solution 3 Sunme