How to specify which kernel to build with bitbake/yocto

旧巷老猫 提交于 2019-12-22 04:09:08

问题


I am working on generating a new BSP using yocto daisy. When I build my image I get these warnings:

NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for virtual/kernel (my-kernel, linux-dummy)
NOTE: consider defining a PREFERRED_PROVIDER entry to match virtual/kernel
NOTE: multiple providers are available for runtime kernel-modules (my-kernel, linux-dummy)
NOTE: consider defining a PREFERRED_PROVIDER entry to match kernel-modules

I can't understand how to define my preferred provider for the kernel. From what I have read I should just need to add it to the meta-myLayer/conf/machine/myMachine.conf Which I did, as such:

KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE = "${S}/arch/arm/boot/dts/myTree.dtb"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
#  use this kernel and version
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto = "3.14%"

Yocto/bitbake seem to be ignoring these lines.
Also, to be clear I also have the machine name set correctly in build/conf/local.conf

Is there something else I need to change to get this to work? Or is Yocto just that broken?


回答1:


Like E-rich wrote, the build system does only see my-kernel and linux-dummy as available providers for virtual/kernel. Thus, I'd guess that you'd actually want to build one of them?

The reason that linux-yocto isn't available is likely that your machine isn't in the COMPATIBLE_MACHINE regexp in linux-yocto_3.14.bb. Thus, if you want to use linux-yocto, you should bbappend that recipe in your own layer, and add your machine to COMPATIBLE_MACHINE. (You will also likely need to supply some more parameters, SRCREV, KBRANCH, etc.)



来源:https://stackoverflow.com/questions/26761635/how-to-specify-which-kernel-to-build-with-bitbake-yocto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!