All of lore.kernel.org
 help / color / mirror / Atom feed
* KVM kernel modules missing from Yocto kernel
@ 2019-11-18 18:22 Wayne Li
  2019-11-18 19:12   ` [yocto] " Maciej Pijanowski
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Li @ 2019-11-18 18:22 UTC (permalink / raw)
  To: bitbake-devel, Yocto Project Discussion

[-- Attachment #1: Type: text/plain, Size: 2086 bytes --]

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):

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"

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"

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?

-Thanks!, Wayne Li

[-- Attachment #2: Type: text/html, Size: 2567 bytes --]

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

* Re: KVM kernel modules missing from Yocto kernel
  2019-11-18 18:22 KVM kernel modules missing from Yocto kernel Wayne Li
@ 2019-11-18 19:12   ` Maciej Pijanowski
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej Pijanowski @ 2019-11-18 19:12 UTC (permalink / raw)
  To: Wayne Li, bitbake-devel, Yocto Project Discussion

[-- Attachment #1: Type: text/plain, Size: 3209 bytes --]


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


[-- Attachment #2: Type: text/html, Size: 5564 bytes --]

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

* Re: [yocto] KVM kernel modules missing from Yocto kernel
@ 2019-11-18 19:12   ` Maciej Pijanowski
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej Pijanowski @ 2019-11-18 19:12 UTC (permalink / raw)
  To: Wayne Li, bitbake-devel, Yocto Project Discussion

[-- Attachment #1: Type: text/plain, Size: 3209 bytes --]


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


[-- Attachment #2: Type: text/html, Size: 5564 bytes --]

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

* Re: KVM kernel modules missing from Yocto kernel
  2019-11-18 19:12   ` [yocto] " Maciej Pijanowski
@ 2019-11-18 21:21     ` Wayne Li
  -1 siblings, 0 replies; 5+ messages in thread
From: Wayne Li @ 2019-11-18 21:21 UTC (permalink / raw)
  To: Maciej Pijanowski; +Cc: Yocto Project Discussion, bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 4466 bytes --]

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:

https://gist.github.com/WayneZhenLi/4172cd4a819b71a11b85fc5aaa57ebd1

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 <
maciej.pijanowski@3mdeb.com> 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)?
>
>
> 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 Engineerhttps://3mdeb.com | @3mdeb_com
>
>

[-- Attachment #2: Type: text/html, Size: 6690 bytes --]

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

* Re: [yocto] KVM kernel modules missing from Yocto kernel
@ 2019-11-18 21:21     ` Wayne Li
  0 siblings, 0 replies; 5+ messages in thread
From: Wayne Li @ 2019-11-18 21:21 UTC (permalink / raw)
  To: Maciej Pijanowski; +Cc: Yocto Project Discussion, bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 4466 bytes --]

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:

https://gist.github.com/WayneZhenLi/4172cd4a819b71a11b85fc5aaa57ebd1

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 <
maciej.pijanowski@3mdeb.com> 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)?
>
>
> 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 Engineerhttps://3mdeb.com | @3mdeb_com
>
>

[-- Attachment #2: Type: text/html, Size: 6690 bytes --]

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

end of thread, other threads:[~2019-11-18 21:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18 18:22 KVM kernel modules missing from Yocto kernel Wayne Li
2019-11-18 19:12 ` Maciej Pijanowski
2019-11-18 19:12   ` [yocto] " Maciej Pijanowski
2019-11-18 21:21   ` Wayne Li
2019-11-18 21:21     ` [yocto] " Wayne Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.