kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wayne Li <waynli329@gmail.com>
To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: KVM Kernel Module not being built for Yocto Kernel
Date: Mon, 2 Dec 2019 21:47:50 +0000	[thread overview]
Message-ID: <CAM2K0nqWjaPB3gFD4m6DjciJUCpix4MaGr0hZkp20PxObtL1Zw@mail.gmail.com> (raw)

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

             reply	other threads:[~2019-12-02 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 21:47 Wayne Li [this message]
2019-12-03  2:01 ` KVM Kernel Module not being built for Yocto Kernel Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM2K0nqWjaPB3gFD4m6DjciJUCpix4MaGr0hZkp20PxObtL1Zw@mail.gmail.com \
    --to=waynli329@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).