[bitbake-devel] KVM Kernel Module not being built for Yocto Kernel

Wayne Li waynli329 at gmail.com
Mon Dec 2 21:23:46 UTC 2019


Dear KVM community,

First of all I'd like mention I've posted this question on the Yocto
mailing list as well as the KVM mailing list because my question has huge
ties to the bitbake process (a concept related to the Yocto project).
Though I believe I'm mainly addressing the KVM community because my problem
is more directly related to the intricacies of the KVM build process.

So I am trying to build the kvm-kmod from source and I'm running into an
issue where the compilation doesn't produce any kernel modules.  But before
I describe my issue and question any further, here's a little background
information on my current endeavour.

My goal right now is to get KVM to work on a T4240RDB running on a
Yocto-based kernel.  For those of you who don't know what a Yocto kernel
is, it is a kernel that you can build/customize yourself using a program
called bitbake.  Anyway, the KVM kernel modules are supposed to be included
in the Yocto kernel by default but they aren't there.  And no tweaking of
the configuration for the bitbake process to build the Yocto kernel has
made the KVM kernel modules appear in the kernel (I've tried pretty much
everything!  Just search my name in the Yocto mailing list archive
haha...).  So my final solution was to download the kvm-kmod source code
and write a custom recipe to bitbake it into the kernel module (in layman
terms this means I just download the code and write a "recipe" to tell
bitbake how to compile the kvm-kmod source code and insert the output files
into the kernel).  Here's the recipe that I wrote for this:

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c616d0e7924e9e78ee192d99a3b26fbd"

inherit module

SRC_URI =
"file:///homead/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-virtualization/recipes-kernel/kvm-kmodule/kvm-kmod-3.10.21.tar.bz2"

S = "${WORKDIR}/kvm-kmod-3.10.21"

do_configure() {
    ./configure --arch=ppc64
--kerneldir=/homead/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel
}

FILES_${PN} += "/lib/modules/4.1.8-rt8+gbd51baf"

Anyway when I run "bitbake kvm-kmod", it runs fine with no errors.  This
runs the recipe I wrote (I conveniently named my recipe kvm-kmod) which
runs the configure file present in the kvm-kmod source code and then runs
make.  In other words I ran make on the kvm-kmod source code with no
errors.  But the problem is there is no kvm.ko or anything like that
anywhere in my project code.

Compiling the kvm-kmod source code *is* supposed to produce kvm kernel
modules right?  I mean kvm-kmod literally stands for kvm kernel module?
Could I have forgotten to do something when building the kvm-kmod source
code?  Or maybe my problem has something to do with my recipe?  Let me know
your thoughts.

-Thanks!, Wayne Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20191202/1db61f5a/attachment.html>


More information about the bitbake-devel mailing list