So it looks like KVM is built in (at least it's supposed to be).  I'm
pretty sure that is the case after looking at my kernel configuration file:

I then changed the CONFIG_KVM=y line to CONFIG_KVM=m and also added the
IMAGE_INSTALL += "kernel-modules" line to my local.conf file.
Unfortunately, again nothing seemed to have changed and there are no new
KVM-related .ko files in the image.  However, this does bring up some
questions.  I have a kernel loaded onto the SD card from that was built
right after we added the content from the KVM .config file to the kernel
configuration file. This kernel is currently up and running on my T4240 RDB
board.  The KVM kernel module doesn't show up when I run lsmod nor does it
show up in the file /lib/modules/4.1.8-rt8+gdb51baf/modules.builtin (a file
that is supposed to list all built-in modules).  However, if I go into the
/sys/module folder, there is a kvm folder in there.  So I guess this means
the kvm module can potentially be built into the system but for whatever
reason it isn't being built in?

On Mon, Nov 18, 2019 at 1:12 PM Maciej Pijanowski <> wrote:

> 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)?
> 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):
> 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 | @3mdeb_com
yocto mailing list

Reply via email to