Kernel selection using yocto
I am creating images for an IMX board using Yocto. My requirement is to build a specific core for the board. After downloading freescale yocto, I could see recipes for multiple kernels. Can you advise me on how yocto will decide which core to build. I mean, where is yocto configured to collect specific kerenle from available kernel recipes?
source to share
You choose which kernel to build in your machine config, see the BSP manual and for example fooobar.com/questions/819530 / ...
Basically, you add
PREFERRED_PROVIDER_virtual/kernel = "my-kernel-recipe"
to your mymachine.conf
.
source to share
You must have or create a kernel bb layer for the kernel source.
Once you have the kernel source, add the following to your local.conf file.
PREFERRED_PROVIDER_virtual/kernel ?= "<bb_layer_name>"
PREFERRED_VERSION_<bb_layer_name> ?= "<version>"
eg.
mkdir -p meta-imx/recipes-kernel/linux/linux-imx_4.11.bb
add whatever you want in bb file.
vi build/local.conf
# kernel preference
PREFERRED_PROVIDER_virtual/kernel ?= "linux-imx"
PREFERRED_VERSION_linux-imx ?= "4.11%"
Once you get it over with, you can bundle build / local.conf into your target like local.conf.sample or whatever ever given a name.
source to share