[bitbake-devel] [yocto] KVM kernel modules missing from Yocto kernel

Maciej Pijanowski maciej.pijanowski at 3mdeb.com
Mon Nov 18 19:12:12 UTC 2019


On 18.11.2019 19:22, Wayne Li wrote:
> Dear Yocto Developers,
>
> I'm trying to incorporate KVM into a Yocto kernel me and my coworker 
> build for a T4240 RDB (which has a PowerPC CPU).  The problem is, no 
> matter what I do the KVM kernel module (I'm expecting a kvm.ko or any 
> .ko file along those lines) is not present in the image.
>
> First I tried adding the content of the .config file generated when 
> configuring the kernel for KVM support into the kernel configuration 
> file.  This resulted in KVM source directories appearing in the kernel 
> but no KVM related kernel modules are present.  I explain this in more 
> detail in a previous email conversation I had with the Yocto community 
> (saved in a Github gist for readability):
What is your kenel config? Is KVM built-in (y) or built as module (m)?
>
> https://gist.github.com/WayneZhenLi/d5d7a5e8c30e6d4b7cd4541d0c24cab5
>
> Since then I've tried a few things.  First, I added the following 
> lines to the local.conf file (found in build_t4240rdb-64b/conf folder):
>
> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kvm-image-minimal"
I din't know which image you are building. Those variables are tricky, since
they only applies when basing on the packagegroup-core-boot packagegroup.
Please refer to the documentation.
>
> But that didn't seem to work as there weren't any new .ko files in the 
> final image.  Next I tried adding the following lines to the same 
> local.conf file:
>
> CORE_IMAGE_EXTRA_INSTALL += "kernel-modules"
> CORE_IMAGE_EXTRA_INSTALL += "kvm-image-minimal"
>
Why trying to install the image into image? kvm-image-minimal is not a 
package, it is image recipe.
The build can definitely break in this case.
> This time I get an error saying "ERROR: kvm-image-minimal not found in 
> the base feeds (t4240rdb-64b ppc64e6500 powerpc64 noarch any all)".  
> Also if just run a "ERROR: bitbake kvm-image-minimal" to see what's 
> going on with that particular recipe I get an error saying 
> "kernel-module-kvm-intel" not found in the base feeds (t4240rdb-64b 
> ppc64e6500 powerpc64 noarch any all).
>
> Would I have to write recipes for the packages listed in 
> kvm-image-minimal such as kernel-module-kvm-intel or 
> kernel-module-kvm?  Note that I'm not even building the image for 
> intel; I'm building it for PowerPC.  Anyway, I just feel like writing 
> recipes for the KVM kernel modules isn't the correct step.  Like maybe 
> I just messed up my with my configuration somehow?  What are your 
> thoughts?
IMHO: Simply use IMAGE_INSTALL += "kernel-modules" (IMAGE_INSTALL += 
"kernel-module-kvm" will likely install just the KVM module)
in your local.conf to install all built kernel modules. If KVM module 
won't be present in the rootfs, it means it was not built.

Please inspect your kernel work dir (packages-split dir) to find out 
which packages were produced by
the kernel recipe. It will be something like 
build/tmp/work/XX/linux-yocto/XX/packages-split
>
> -Thanks!, Wayne Li
>
>
-- 
Maciej Pijanowski
Embedded Systems Engineer
https://3mdeb.com | @3mdeb_com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20191118/199a671f/attachment.html>


More information about the bitbake-devel mailing list