KVM Archive on lore.kernel.org
 help / color / Atom feed
* KVM Kernel Module not being built for Yocto Kernel
@ 2019-12-02 21:47 Wayne Li
  2019-12-03  2:01 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Wayne Li @ 2019-12-02 21:47 UTC (permalink / raw)
  To: kvm, kvm-ppc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: KVM Kernel Module not being built for Yocto Kernel
  2019-12-02 21:47 KVM Kernel Module not being built for Yocto Kernel Wayne Li
@ 2019-12-03  2:01 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2019-12-03  2:01 UTC (permalink / raw)
  To: Wayne Li; +Cc: kvm, kvm-ppc

On Mon, Dec 02, 2019 at 09:47:50PM +0000, Wayne Li wrote:
> 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.

So... what kernel version are you using?

What sub-architecture is the T4240RDB?

What kernel config options are you trying to turn on?

Paul.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 21:47 KVM Kernel Module not being built for Yocto Kernel Wayne Li
2019-12-03  2:01 ` Paul Mackerras

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git