* [PATCH 0/2] KVM integration
@ 2013-01-07 12:08 Mihai Prica
2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Mihai Prica @ 2013-01-07 12:08 UTC (permalink / raw)
To: meta-virtualization
More details on building a KVM image can be found on the wiki page at:
https://wiki.yoctoproject.org/wiki/Virtualization_with_KVM
Mihai Prica (2):
linux-yocto: added kernel configuration for KVM
Created new target:kvm-image-minimal
recipes-extended/images/kvm-image-minimal.bb | 22 ++++++++++++++++++++++
recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++
recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++
recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 +
4 files changed, 31 insertions(+)
create mode 100644 recipes-extended/images/kvm-image-minimal.bb
create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc
create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg
--
1.7.9.5
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 12:08 [PATCH 0/2] KVM integration Mihai Prica @ 2013-01-07 12:08 ` Mihai Prica 2013-01-07 13:42 ` Bruce Ashfield 2013-01-07 17:26 ` Raymond Danks 2013-01-07 12:08 ` [PATCH 2/2] Created new target:kvm-image-minimal Mihai Prica 2013-01-07 12:14 ` [PATCH 0/2] KVM integration David Nyström 2 siblings, 2 replies; 18+ messages in thread From: Mihai Prica @ 2013-01-07 12:08 UTC (permalink / raw) To: meta-virtualization Signed-off-by: Mihai Prica <mihai.prica@intel.com> --- recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + 3 files changed, 9 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc b/recipes-kernel/linux/linux-yocto/kvm-enable.scc new file mode 100644 index 0000000..0b5f4fc --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable KVM host support" +define KFEATURE_COMPATIBILITY board + +kconf non-hardware kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/linux/linux-yocto/kvm.cfg new file mode 100644 index 0000000..0cfcf58 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg @@ -0,0 +1,4 @@ +CONFIG_KVM=y +CONFIG_KVM_INTEL=y +CONFIG_KVM_AMD=y +CONFIG_TUN=y diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend index 5b163ff..71bead2 100644 --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ file://ebtables.scc \ file://vswitch.scc \ file://lxc.scc \ + file://kvm-enable.scc \ " -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica @ 2013-01-07 13:42 ` Bruce Ashfield 2013-01-07 17:26 ` Raymond Danks 1 sibling, 0 replies; 18+ messages in thread From: Bruce Ashfield @ 2013-01-07 13:42 UTC (permalink / raw) To: Mihai Prica; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 2837 bytes --] On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@intel.com> wrote: > Signed-off-by: Mihai Prica <mihai.prica@intel.com> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg We already have an identical config fragment within the kernel tree itself: http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.4/tree/meta/cfg/kernel-cache/features/kvm/qemu-kvm-enable.scc?h=meta and http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.4/tree/meta/cfg/kernel-cache/features/kvm/qemu-kvm.cfg?h=meta If there's a reason why the in-tree version won't work, we should definitely fix it there first. Having a copy outside of the kernel itself is going to cause us maintenance issues down the road. Since at the moment, these fragments are targeted to linux-yocto, so there's no reason to avoid using the meta data that follows the tree, since we get re-use and the added benefit that I won't break any virtualization use cases when working on the kernel :) Cheers, Bruce > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > > -- > 1.7.9.5 > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 4573 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica 2013-01-07 13:42 ` Bruce Ashfield @ 2013-01-07 17:26 ` Raymond Danks 2013-01-07 18:10 ` Bruce Ashfield 1 sibling, 1 reply; 18+ messages in thread From: Raymond Danks @ 2013-01-07 17:26 UTC (permalink / raw) To: meta-virtualization I'm going to show my lack of knowledge in this area, but I know this is going to come up when I push a xen.cfg that I apparently never added. Is it possible to do something along the lines of PACKAGE_CONFIG in the linux-yocto.bbappend? For example, in the libvirt package one can use PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be the method for one to do the same in this package? Yes, I imagine that worst case there can be a SRC_URI_distro definition that includes only the .scc files required for that "minimal" image build, but it seems like we want to keep away from that as much as possible being that this isn't a distro layer. Thanks, Ray On 01/07/2013 05:08 AM, Mihai Prica wrote: > Signed-off-by: Mihai Prica <mihai.prica@intel.com> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 17:26 ` Raymond Danks @ 2013-01-07 18:10 ` Bruce Ashfield 2013-01-07 18:31 ` Raymond Danks 0 siblings, 1 reply; 18+ messages in thread From: Bruce Ashfield @ 2013-01-07 18:10 UTC (permalink / raw) To: Raymond Danks; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 3591 bytes --] On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com> wrote: > I'm going to show my lack of knowledge in this area, but I know this is > going to come up when I push a xen.cfg that I apparently never added. > > Is it possible to do something along the lines of PACKAGE_CONFIG in the > linux-yocto.bbappend? For example, in the libvirt package one can use > PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be > the method for one to do the same in this package? > kernel configuration fragment use are controlled via the KERNEL_FEATURES variable, and for anything pre-yocto 1.4 that means an in-tree kernel configuration fragment (I'm still pushing for the fragments to be maintained in tree, since that allows them to be reused and maintained more easily). KERNEL_FEATURES is managed like any other variable in the system, including updating it via optional/dynamic features as we see fit. > Yes, I imagine that worst case there can be a SRC_URI_distro definition > that includes only the .scc files required for that "minimal" image build, > but it seems like we want to keep away from that as much as possible being > that this isn't a distro layer. > > Typically we do this via a base KERNEL_FEATURES specification in the relevant recipe(s), and distros, or other configurations can override/extend it as required. Cheers, Buce > Thanks, > Ray > > > On 01/07/2013 05:08 AM, Mihai Prica wrote: > >> Signed-off-by: Mihai Prica <mihai.prica@intel.com> >> --- >> recipes-kernel/linux/linux-**yocto/kvm-enable.scc | 4 ++++ >> recipes-kernel/linux/linux-**yocto/kvm.cfg | 4 ++++ >> recipes-kernel/linux/linux-**yocto_3.4.bbappend | 1 + >> 3 files changed, 9 insertions(+) >> create mode 100644 recipes-kernel/linux/linux-**yocto/kvm-enable.scc >> create mode 100644 recipes-kernel/linux/linux-**yocto/kvm.cfg >> >> diff --git a/recipes-kernel/linux/linux-**yocto/kvm-enable.scc >> b/recipes-kernel/linux/linux-**yocto/kvm-enable.scc >> new file mode 100644 >> index 0000000..0b5f4fc >> --- /dev/null >> +++ b/recipes-kernel/linux/linux-**yocto/kvm-enable.scc >> @@ -0,0 +1,4 @@ >> +define KFEATURE_DESCRIPTION "Enable KVM host support" >> +define KFEATURE_COMPATIBILITY board >> + >> +kconf non-hardware kvm.cfg >> diff --git a/recipes-kernel/linux/linux-**yocto/kvm.cfg >> b/recipes-kernel/linux/linux-**yocto/kvm.cfg >> new file mode 100644 >> index 0000000..0cfcf58 >> --- /dev/null >> +++ b/recipes-kernel/linux/linux-**yocto/kvm.cfg >> @@ -0,0 +1,4 @@ >> +CONFIG_KVM=y >> +CONFIG_KVM_INTEL=y >> +CONFIG_KVM_AMD=y >> +CONFIG_TUN=y >> diff --git a/recipes-kernel/linux/linux-**yocto_3.4.bbappend >> b/recipes-kernel/linux/linux-**yocto_3.4.bbappend >> index 5b163ff..71bead2 100644 >> --- a/recipes-kernel/linux/linux-**yocto_3.4.bbappend >> +++ b/recipes-kernel/linux/linux-**yocto_3.4.bbappend >> @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ >> file://ebtables.scc \ >> file://vswitch.scc \ >> file://lxc.scc \ >> + file://kvm-enable.scc \ >> " >> >> > > ______________________________**_________________ > meta-virtualization mailing list > meta-virtualization@**yoctoproject.org<meta-virtualization@yoctoproject.org> > https://lists.yoctoproject.**org/listinfo/meta-**virtualization<https://lists.yoctoproject.org/listinfo/meta-virtualization> > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 4873 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 18:10 ` Bruce Ashfield @ 2013-01-07 18:31 ` Raymond Danks 2013-01-08 18:45 ` Prica, Mihai 0 siblings, 1 reply; 18+ messages in thread From: Raymond Danks @ 2013-01-07 18:31 UTC (permalink / raw) To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 4211 bytes --] On 01/07/2013 11:10 AM, Bruce Ashfield wrote: > > > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com > <mailto:ray.danks@se-eng.com>> wrote: > > I'm going to show my lack of knowledge in this area, but I know > this is going to come up when I push a xen.cfg that I apparently > never added. > > Is it possible to do something along the lines of PACKAGE_CONFIG > in the linux-yocto.bbappend? For example, in the libvirt package > one can use PACKAGE_CONFIG to construct a "minimal" build of > libvirt. What would be the method for one to do the same in this > package? > > > kernel configuration fragment use are controlled via the > KERNEL_FEATURES variable, and > for anything pre-yocto 1.4 that means an in-tree kernel configuration > fragment (I'm still pushing > for the fragments to be maintained in tree, since that allows them to > be reused and maintained > more easily). > > KERNEL_FEATURES is managed like any other variable in the system, > including updating > it via optional/dynamic features as we see fit. Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I believe. I'm seeing some references and examples for this now. Ray > > > Yes, I imagine that worst case there can be a SRC_URI_distro > definition that includes only the .scc files required for that > "minimal" image build, but it seems like we want to keep away from > that as much as possible being that this isn't a distro layer. > > > Typically we do this via a base KERNEL_FEATURES specification in the > relevant recipe(s), and > distros, or other configurations can override/extend it as required. > > Cheers, > > Buce > > Thanks, > Ray > > > On 01/07/2013 05:08 AM, Mihai Prica wrote: > > Signed-off-by: Mihai Prica <mihai.prica@intel.com > <mailto:mihai.prica@intel.com>> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 > recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > <mailto:meta-virtualization@yoctoproject.org> > https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" [-- Attachment #2: Type: text/html, Size: 8693 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-07 18:31 ` Raymond Danks @ 2013-01-08 18:45 ` Prica, Mihai 2013-01-09 2:20 ` Lei Yang 2013-01-09 3:44 ` Bruce Ashfield 0 siblings, 2 replies; 18+ messages in thread From: Prica, Mihai @ 2013-01-08 18:45 UTC (permalink / raw) To: ray.danks@se-eng.com, Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 4498 bytes --] I didn't know about the configuration fragments from the kernel tree. I'll redo the patch to use those. I see that the .cfg from the kernel tree enables kvm as modules. In this situation, I think I need to add an extra RRECOMMENDS with the necessary kernel-module-kvm to bring the necessary modules to the sysroot. Where would be the best places to add this, considering there is no specific recipe for kvm? I tried to add them to the image recipe but it didn't worked. Thanks, Mihai From: meta-virtualization-bounces@yoctoproject.org [mailto:meta-virtualization-bounces@yoctoproject.org] On Behalf Of Raymond Danks Sent: Monday, January 07, 2013 8:32 PM To: Bruce Ashfield Cc: meta-virtualization@yoctoproject.org Subject: Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added kernel configuration for KVM On 01/07/2013 11:10 AM, Bruce Ashfield wrote: On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com<mailto:ray.danks@se-eng.com>> wrote: I'm going to show my lack of knowledge in this area, but I know this is going to come up when I push a xen.cfg that I apparently never added. Is it possible to do something along the lines of PACKAGE_CONFIG in the linux-yocto.bbappend? For example, in the libvirt package one can use PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be the method for one to do the same in this package? kernel configuration fragment use are controlled via the KERNEL_FEATURES variable, and for anything pre-yocto 1.4 that means an in-tree kernel configuration fragment (I'm still pushing for the fragments to be maintained in tree, since that allows them to be reused and maintained more easily). KERNEL_FEATURES is managed like any other variable in the system, including updating it via optional/dynamic features as we see fit. Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I believe. I'm seeing some references and examples for this now. Ray Yes, I imagine that worst case there can be a SRC_URI_distro definition that includes only the .scc files required for that "minimal" image build, but it seems like we want to keep away from that as much as possible being that this isn't a distro layer. Typically we do this via a base KERNEL_FEATURES specification in the relevant recipe(s), and distros, or other configurations can override/extend it as required. Cheers, Buce Thanks, Ray On 01/07/2013 05:08 AM, Mihai Prica wrote: Signed-off-by: Mihai Prica <mihai.prica@intel.com<mailto:mihai.prica@intel.com>> --- recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + 3 files changed, 9 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc b/recipes-kernel/linux/linux-yocto/kvm-enable.scc new file mode 100644 index 0000000..0b5f4fc --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable KVM host support" +define KFEATURE_COMPATIBILITY board + +kconf non-hardware kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/linux/linux-yocto/kvm.cfg new file mode 100644 index 0000000..0cfcf58 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg @@ -0,0 +1,4 @@ +CONFIG_KVM=y +CONFIG_KVM_INTEL=y +CONFIG_KVM_AMD=y +CONFIG_TUN=y diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend index 5b163ff..71bead2 100644 --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc<file:///\\xt-checksum.scc> \ file://ebtables.scc<file:///\\ebtables.scc> \ file://vswitch.scc<file:///\\vswitch.scc> \ file://lxc.scc<file:///\\lxc.scc> \ + file://kvm-enable.scc<file:///\\kvm-enable.scc> \ " _______________________________________________ meta-virtualization mailing list meta-virtualization@yoctoproject.org<mailto:meta-virtualization@yoctoproject.org> https://lists.yoctoproject.org/listinfo/meta-virtualization -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 10772 bytes --] ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-08 18:45 ` Prica, Mihai @ 2013-01-09 2:20 ` Lei Yang 2013-01-09 3:44 ` Bruce Ashfield 1 sibling, 0 replies; 18+ messages in thread From: Lei Yang @ 2013-01-09 2:20 UTC (permalink / raw) To: Prica, Mihai, Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 5586 bytes --] On 01/09/2013 02:45 AM, Prica, Mihai wrote: > > I didn't know about the configuration fragments from the kernel tree. > I'll redo the patch to use those. > > I see that the .cfg from the kernel tree enables kvm as modules. In > this situation, I think I need to add an extra RRECOMMENDS with the > necessary kernel-module-kvm to bring the necessary modules to the > sysroot. Where would be the best places to add this, considering > there is no specific recipe for kvm? I tried to add them to the image > recipe but it didn't worked. > It often to add below line in conf/machine/**.conf, I don't see it in meta-virt, Bruce may give some better comments MACHINE_EXTRA_RRECOMMENDS = "kernel-module-kvm" and need to make sure the kvm moudles built with "M" first Lei > Thanks, > > Mihai > > *From:*meta-virtualization-bounces@yoctoproject.org > [mailto:meta-virtualization-bounces@yoctoproject.org] *On Behalf Of > *Raymond Danks > *Sent:* Monday, January 07, 2013 8:32 PM > *To:* Bruce Ashfield > *Cc:* meta-virtualization@yoctoproject.org > *Subject:* Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added > kernel configuration for KVM > > On 01/07/2013 11:10 AM, Bruce Ashfield wrote: > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks > <ray.danks@se-eng.com <mailto:ray.danks@se-eng.com>> wrote: > > I'm going to show my lack of knowledge in this area, but I know > this is going to come up when I push a xen.cfg that I apparently > never added. > > Is it possible to do something along the lines of PACKAGE_CONFIG > in the linux-yocto.bbappend? For example, in the libvirt package > one can use PACKAGE_CONFIG to construct a "minimal" build of > libvirt. What would be the method for one to do the same in this > package? > > kernel configuration fragment use are controlled via the > KERNEL_FEATURES variable, and > > for anything pre-yocto 1.4 that means an in-tree kernel > configuration fragment (I'm still pushing > > for the fragments to be maintained in tree, since that allows them > to be reused and maintained > > more easily). > > KERNEL_FEATURES is managed like any other variable in the system, > including updating > > it via optional/dynamic features as we see fit. > > > Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I > believe. I'm seeing some references and examples for this now. > > Ray > > > > Yes, I imagine that worst case there can be a SRC_URI_distro > definition that includes only the .scc files required for that > "minimal" image build, but it seems like we want to keep away from > that as much as possible being that this isn't a distro layer. > > Typically we do this via a base KERNEL_FEATURES specification in the > relevant recipe(s), and > > distros, or other configurations can override/extend it as required. > > Cheers, > > Buce > > Thanks, > Ray > > > > On 01/07/2013 05:08 AM, Mihai Prica wrote: > > Signed-off-by: Mihai Prica <mihai.prica@intel.com > <mailto:mihai.prica@intel.com>> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc > <file:///%5C%5Cxt-checksum.scc> \ > file://ebtables.scc <file:///%5C%5Cebtables.scc> \ > file://vswitch.scc <file:///%5C%5Cvswitch.scc> \ > file://lxc.scc <file:///%5C%5Clxc.scc> \ > + file://kvm-enable.scc <file:///%5C%5Ckvm-enable.scc> \ > " > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > <mailto:meta-virtualization@yoctoproject.org> > https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" > > > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization [-- Attachment #2: Type: text/html, Size: 17278 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-08 18:45 ` Prica, Mihai 2013-01-09 2:20 ` Lei Yang @ 2013-01-09 3:44 ` Bruce Ashfield 2013-01-09 19:43 ` Prica, Mihai 1 sibling, 1 reply; 18+ messages in thread From: Bruce Ashfield @ 2013-01-09 3:44 UTC (permalink / raw) To: Prica, Mihai; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 5450 bytes --] On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@intel.com> wrote: > ** ** > > I didn’t know about the configuration fragments from the kernel tree. I’ll > redo the patch to use those. **** > > I see that the .cfg from the kernel tree enables kvm as modules. In this > situation, I think I need to add an extra RRECOMMENDS with the necessary > kernel-module-kvm to bring the necessary modules to the sysroot. Where > would be the best places to add this, considering there is no specific > recipe for kvm? I tried to add them to the image recipe but it didn’t > worked. > You are presumably going to enable the in tree fragments by appending to KERNEL_FEATURES in the linux-yocto_3.4.bbappend. Which to me, seems like the right place to also add the RRECOMMENDS. Or had you tried this and it didn't work for some reason I'm missing at the moment (it's late here, and I've spent all day hunting autobuilder breakage) :) Cheers, Bruce > **** > > ** ** > > Thanks,**** > > Mihai**** > > ** ** > > *From:* meta-virtualization-bounces@yoctoproject.org [mailto: > meta-virtualization-bounces@yoctoproject.org] *On Behalf Of *Raymond Danks > *Sent:* Monday, January 07, 2013 8:32 PM > *To:* Bruce Ashfield > *Cc:* meta-virtualization@yoctoproject.org > *Subject:* Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added > kernel configuration for KVM**** > > ** ** > > On 01/07/2013 11:10 AM, Bruce Ashfield wrote:**** > > ** ** > > ** ** > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com> > wrote:**** > > I'm going to show my lack of knowledge in this area, but I know this is > going to come up when I push a xen.cfg that I apparently never added. > > Is it possible to do something along the lines of PACKAGE_CONFIG in the > linux-yocto.bbappend? For example, in the libvirt package one can use > PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be > the method for one to do the same in this package?**** > > ** ** > > kernel configuration fragment use are controlled via the KERNEL_FEATURES > variable, and**** > > for anything pre-yocto 1.4 that means an in-tree kernel configuration > fragment (I'm still pushing**** > > for the fragments to be maintained in tree, since that allows them to be > reused and maintained**** > > more easily).**** > > ** ** > > KERNEL_FEATURES is managed like any other variable in the system, > including updating**** > > it via optional/dynamic features as we see fit.**** > > > Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I believe. > I'm seeing some references and examples for this now. > > Ray > > > **** > > ** ** > > > Yes, I imagine that worst case there can be a SRC_URI_distro definition > that includes only the .scc files required for that "minimal" image build, > but it seems like we want to keep away from that as much as possible being > that this isn't a distro layer.**** > > ** ** > > Typically we do this via a base KERNEL_FEATURES specification in the > relevant recipe(s), and**** > > distros, or other configurations can override/extend it as required.**** > > ** ** > > Cheers,**** > > ** ** > > Buce**** > > **** > > Thanks, > Ray **** > > > > On 01/07/2013 05:08 AM, Mihai Prica wrote:**** > > Signed-off-by: Mihai Prica <mihai.prica@intel.com> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > **** > > ** ** > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization**** > > > > **** > > ** ** > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" **** > > ** ** > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 10436 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-09 3:44 ` Bruce Ashfield @ 2013-01-09 19:43 ` Prica, Mihai 2013-01-10 7:32 ` Lei Yang 0 siblings, 1 reply; 18+ messages in thread From: Prica, Mihai @ 2013-01-09 19:43 UTC (permalink / raw) To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 5792 bytes --] On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@intel.com<mailto:mihai.prica@intel.com>> wrote: I didn't know about the configuration fragments from the kernel tree. I'll redo the patch to use those. I see that the .cfg from the kernel tree enables kvm as modules. In this situation, I think I need to add an extra RRECOMMENDS with the necessary kernel-module-kvm to bring the necessary modules to the sysroot. Where would be the best places to add this, considering there is no specific recipe for kvm? I tried to add them to the image recipe but it didn't worked. You are presumably going to enable the in tree fragments by appending to KERNEL_FEATURES in the linux-yocto_3.4.bbappend. Which to me, seems like the right place to also add the RRECOMMENDS. Or had you tried this and it didn't work for some reason I'm missing at the moment (it's late here, and I've spent all day hunting autobuilder breakage) :) It doesn't work in the kernel recipe. I've talked with Richard and he said PACKAGE_INSTALL_ATTEMPTONLY can be used for this in the image recipe. He said he will add a new IMAGE_INSTALL_RECOMMEND option for this. There is however one more thing. Which is the best way to configure the modules to be loaded at boot-time? I saw some discussion on the mailing list about update-modules becoming obsolete. Thanks, Mihai Cheers, Bruce Thanks, Mihai From: meta-virtualization-bounces@yoctoproject.org<mailto:meta-virtualization-bounces@yoctoproject.org> [mailto:meta-virtualization-bounces@yoctoproject.org<mailto:meta-virtualization-bounces@yoctoproject.org>] On Behalf Of Raymond Danks Sent: Monday, January 07, 2013 8:32 PM To: Bruce Ashfield Cc: meta-virtualization@yoctoproject.org<mailto:meta-virtualization@yoctoproject.org> Subject: Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added kernel configuration for KVM On 01/07/2013 11:10 AM, Bruce Ashfield wrote: On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com<mailto:ray.danks@se-eng.com>> wrote: I'm going to show my lack of knowledge in this area, but I know this is going to come up when I push a xen.cfg that I apparently never added. Is it possible to do something along the lines of PACKAGE_CONFIG in the linux-yocto.bbappend? For example, in the libvirt package one can use PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be the method for one to do the same in this package? kernel configuration fragment use are controlled via the KERNEL_FEATURES variable, and for anything pre-yocto 1.4 that means an in-tree kernel configuration fragment (I'm still pushing for the fragments to be maintained in tree, since that allows them to be reused and maintained more easily). KERNEL_FEATURES is managed like any other variable in the system, including updating it via optional/dynamic features as we see fit. Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I believe. I'm seeing some references and examples for this now. Ray Yes, I imagine that worst case there can be a SRC_URI_distro definition that includes only the .scc files required for that "minimal" image build, but it seems like we want to keep away from that as much as possible being that this isn't a distro layer. Typically we do this via a base KERNEL_FEATURES specification in the relevant recipe(s), and distros, or other configurations can override/extend it as required. Cheers, Buce Thanks, Ray On 01/07/2013 05:08 AM, Mihai Prica wrote: Signed-off-by: Mihai Prica <mihai.prica@intel.com<mailto:mihai.prica@intel.com>> --- recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + 3 files changed, 9 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc b/recipes-kernel/linux/linux-yocto/kvm-enable.scc new file mode 100644 index 0000000..0b5f4fc --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable KVM host support" +define KFEATURE_COMPATIBILITY board + +kconf non-hardware kvm.cfg diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/linux/linux-yocto/kvm.cfg new file mode 100644 index 0000000..0cfcf58 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg @@ -0,0 +1,4 @@ +CONFIG_KVM=y +CONFIG_KVM_INTEL=y +CONFIG_KVM_AMD=y +CONFIG_TUN=y diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend index 5b163ff..71bead2 100644 --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ file://ebtables.scc \ file://vswitch.scc \ file://lxc.scc \ + file://kvm-enable.scc \ <file:///\\xt-checksum.scc%20\%0b %20 %20 %20 %20 %20 %20 %20file:\ebtables.scc%20\%0b %20 %20 %20 %20 %20 %20file:\vswitch.scc%20\%0b %20 %20 %20 %20 %20 %20file:\lxc.scc%20\%0b+%20 %20 %20 %20 %20 %20 file:\kvm-enable.scc%20\%0b %20 %20 %20 %20 %20 %20> " _______________________________________________ meta-virtualization mailing list meta-virtualization@yoctoproject.org<mailto:meta-virtualization@yoctoproject.org> https://lists.yoctoproject.org/listinfo/meta-virtualization -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 44455 bytes --] ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-09 19:43 ` Prica, Mihai @ 2013-01-10 7:32 ` Lei Yang 2013-01-10 13:39 ` Bruce Ashfield 0 siblings, 1 reply; 18+ messages in thread From: Lei Yang @ 2013-01-10 7:32 UTC (permalink / raw) To: Prica, Mihai; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 7319 bytes --] On 01/10/2013 03:43 AM, Prica, Mihai wrote: > > On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@intel.com > <mailto:mihai.prica@intel.com>> wrote: > > I didn't know about the configuration fragments from the kernel tree. > I'll redo the patch to use those. > > I see that the .cfg from the kernel tree enables kvm as modules. In > this situation, I think I need to add an extra RRECOMMENDS with the > necessary kernel-module-kvm to bring the necessary modules to the > sysroot. Where would be the best places to add this, considering > there is no specific recipe for kvm? I tried to add them to the image > recipe but it didn't worked. > > You are presumably going to enable the in tree fragments by appending > to KERNEL_FEATURES > > in the linux-yocto_3.4.bbappend. Which to me, seems like the right > place to also add the > > RRECOMMENDS. Or had you tried this and it didn't work for some reason > I'm missing at the > > moment (it's late here, and I've spent all day hunting autobuilder > breakage) :) > > It doesn't work in the kernel recipe. I've talked with Richard and he > said PACKAGE_INSTALL_ATTEMPTONLY can > > be used for this in the image recipe. He said he will add a new > IMAGE_INSTALL_RECOMMEND option for this. > > There is however one more thing. Which is the best way to configure > the modules to be loaded at boot-time? I > > saw some discussion on the mailing list about update-modules becoming > obsolete. > I think "module_autoload_iwlwifi = "iwlwifi" " is your choice Lei > Thanks, > > Mihai > > Cheers, > > Bruce > > Thanks, > > Mihai > > *From:*meta-virtualization-bounces@yoctoproject.org > <mailto:meta-virtualization-bounces@yoctoproject.org> > [mailto:meta-virtualization-bounces@yoctoproject.org > <mailto:meta-virtualization-bounces@yoctoproject.org>] *On Behalf > Of *Raymond Danks > *Sent:* Monday, January 07, 2013 8:32 PM > *To:* Bruce Ashfield > *Cc:* meta-virtualization@yoctoproject.org > <mailto:meta-virtualization@yoctoproject.org> > *Subject:* Re: [meta-virtualization] [PATCH 1/2] linux-yocto: > added kernel configuration for KVM > > On 01/07/2013 11:10 AM, Bruce Ashfield wrote: > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks > <ray.danks@se-eng.com <mailto:ray.danks@se-eng.com>> wrote: > > I'm going to show my lack of knowledge in this area, but I > know this is going to come up when I push a xen.cfg that I > apparently never added. > > Is it possible to do something along the lines of > PACKAGE_CONFIG in the linux-yocto.bbappend? For example, in > the libvirt package one can use PACKAGE_CONFIG to construct a > "minimal" build of libvirt. What would be the method for one > to do the same in this package? > > kernel configuration fragment use are controlled via the > KERNEL_FEATURES variable, and > > for anything pre-yocto 1.4 that means an in-tree kernel > configuration fragment (I'm still pushing > > for the fragments to be maintained in tree, since that allows > them to be reused and maintained > > more easily). > > KERNEL_FEATURES is managed like any other variable in the > system, including updating > > it via optional/dynamic features as we see fit. > > > Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I > believe. I'm seeing some references and examples for this now. > > Ray > > > Yes, I imagine that worst case there can be a SRC_URI_distro > definition that includes only the .scc files required for that > "minimal" image build, but it seems like we want to keep away > from that as much as possible being that this isn't a distro > layer. > > Typically we do this via a base KERNEL_FEATURES specification in > the relevant recipe(s), and > > distros, or other configurations can override/extend it as required. > > Cheers, > > Buce > > Thanks, > Ray > > > > On 01/07/2013 05:08 AM, Mihai Prica wrote: > > Signed-off-by: Mihai Prica <mihai.prica@intel.com > <mailto:mihai.prica@intel.com>> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 > recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > <file:///%5C%5Cxt-checksum.scc%20%5C%0b%A0%20%A0%20%A0%20%A0%20%A0%20%A0%20%A0%20file:%5Cebtables.scc%20%5C%0b%A0%20%A0%20%A0%20%A0%20%A0%20%A0%20file:%5Cvswitch.scc%20%5C%0b%A0%20%A0%20%A0%20%A0%20%A0%20%A0%20file:%5Clxc.scc%20%5C%0b+%20%A0%20%A0%20%A0%20%A0%20%A0%20%A0file:%5Ckvm-enable.scc%20%5C%0b%A0%20%A0%20%A0%20%A0%20%A0%20%A0%20>" > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > <mailto:meta-virtualization@yoctoproject.org> > https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness > await thee at its end" > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" > > > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization [-- Attachment #2: Type: text/html, Size: 64944 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM 2013-01-10 7:32 ` Lei Yang @ 2013-01-10 13:39 ` Bruce Ashfield 0 siblings, 0 replies; 18+ messages in thread From: Bruce Ashfield @ 2013-01-10 13:39 UTC (permalink / raw) To: lei.yang; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 6798 bytes --] On Thu, Jan 10, 2013 at 2:32 AM, Lei Yang <lei.yang@windriver.com> wrote: > On 01/10/2013 03:43 AM, Prica, Mihai wrote: > > On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@intel.com> > wrote:**** > > **** > > I didn’t know about the configuration fragments from the kernel tree. I’ll > redo the patch to use those. **** > > I see that the .cfg from the kernel tree enables kvm as modules. In this > situation, I think I need to add an extra RRECOMMENDS with the necessary > kernel-module-kvm to bring the necessary modules to the sysroot. Where > would be the best places to add this, considering there is no specific > recipe for kvm? I tried to add them to the image recipe but it didn’t > worked.**** > > ** ** > > ** ** > > You are presumably going to enable the in tree fragments by appending to > KERNEL_FEATURES**** > > in the linux-yocto_3.4.bbappend. Which to me, seems like the right place > to also add the**** > > RRECOMMENDS. Or had you tried this and it didn't work for some reason I'm > missing at the**** > > moment (it's late here, and I've spent all day hunting autobuilderbreakage) :) > **** > > ** ** > > It doesn’t work in the kernel recipe. I’ve talked with Richard and he said > PACKAGE_INSTALL_ATTEMPTONLY can **** > > be used for this in the image recipe. He said he will add a new > IMAGE_INSTALL_RECOMMEND option for this. **** > > ** ** > > There is however one more thing. Which is the best way to configure the > modules to be loaded at boot-time? I**** > > saw some discussion on the mailing list about update-modules becoming > obsolete.**** > > ** ** > > > I think "module_autoload_iwlwifi = "iwlwifi" " is your choice > That's the method that use as well, but it is tied into update-modules. I remember the other thread as well, I'll follow up there. Cheers, Bruce > > Lei > > > > > Thanks,**** > > Mihai**** > > ** ** > > Cheers,**** > > ** ** > > Bruce**** > > **** > > **** > > Thanks,**** > > Mihai**** > > **** > > *From:*meta-virtualization-bounces@yoctoproject.org [mailto: > meta-virtualization-bounces@yoctoproject.org] *On Behalf Of *Raymond Danks > *Sent:* Monday, January 07, 2013 8:32 PM > *To:* Bruce Ashfield > *Cc:* meta-virtualization@yoctoproject.org > *Subject:* Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added > kernel configuration for KVM**** > > **** > > On 01/07/2013 11:10 AM, Bruce Ashfield wrote:**** > > **** > > **** > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com> > wrote:**** > > I'm going to show my lack of knowledge in this area, but I know this is > going to come up when I push a xen.cfg that I apparently never added. > > Is it possible to do something along the lines of PACKAGE_CONFIG in the > linux-yocto.bbappend? For example, in the libvirt package one can use > PACKAGE_CONFIG to construct a "minimal" build of libvirt. What would be > the method for one to do the same in this package?**** > > **** > > kernel configuration fragment use are controlled via the KERNEL_FEATURES > variable, and**** > > for anything pre-yocto 1.4 that means an in-tree kernel configuration > fragment (I'm still pushing**** > > for the fragments to be maintained in tree, since that allows them to be > reused and maintained**** > > more easily).**** > > **** > > KERNEL_FEATURES is managed like any other variable in the system, > including updating**** > > it via optional/dynamic features as we see fit.**** > > > Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I believe. > I'm seeing some references and examples for this now. > > Ray > > **** > > **** > > > Yes, I imagine that worst case there can be a SRC_URI_distro definition > that includes only the .scc files required for that "minimal" image > build, but it seems like we want to keep away from that as much as possible > being that this isn't a distro layer.**** > > **** > > Typically we do this via a base KERNEL_FEATURES specification in the > relevant recipe(s), and**** > > distros, or other configurations can override/extend it as required.**** > > **** > > Cheers,**** > > **** > > Buce**** > > **** > > Thanks, > Ray **** > > > > On 01/07/2013 05:08 AM, Mihai Prica wrote:**** > > Signed-off-by: Mihai Prica <mihai.prica@intel.com> > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.sccb/recipes-kernel/ > linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/ > linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > **** > > **** > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization**** > > > > **** > > **** > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" **** > > **** > > > > **** > > ** ** > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" **** > > > _______________________________________________ > meta-virtualization mailing listmeta-virtualization@yoctoproject.orghttps://lists.yoctoproject.org/listinfo/meta-virtualization > > > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 32770 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/2] Created new target:kvm-image-minimal 2013-01-07 12:08 [PATCH 0/2] KVM integration Mihai Prica 2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica @ 2013-01-07 12:08 ` Mihai Prica 2013-01-07 13:47 ` Bruce Ashfield 2013-01-07 12:14 ` [PATCH 0/2] KVM integration David Nyström 2 siblings, 1 reply; 18+ messages in thread From: Mihai Prica @ 2013-01-07 12:08 UTC (permalink / raw) To: meta-virtualization Signed-off-by: Mihai Prica <mihai.prica@intel.com> --- recipes-extended/images/kvm-image-minimal.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes-extended/images/kvm-image-minimal.bb diff --git a/recipes-extended/images/kvm-image-minimal.bb b/recipes-extended/images/kvm-image-minimal.bb new file mode 100644 index 0000000..486cd9c --- /dev/null +++ b/recipes-extended/images/kvm-image-minimal.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "A minimal kvm image" + +IMAGE_INSTALL = " \ + packagegroup-core-boot \ + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ + qemu \ + libvirt \ + libvirt-libvirtd \ + libvirt-virsh \ + " + +IMAGE_FEATURES += "ssh-server-openssh" + +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" + +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] Created new target:kvm-image-minimal 2013-01-07 12:08 ` [PATCH 2/2] Created new target:kvm-image-minimal Mihai Prica @ 2013-01-07 13:47 ` Bruce Ashfield 2013-01-07 20:26 ` McClintock Matthew-B29882 0 siblings, 1 reply; 18+ messages in thread From: Bruce Ashfield @ 2013-01-07 13:47 UTC (permalink / raw) To: Mihai Prica; +Cc: meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 1853 bytes --] On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@intel.com> wrote: > Signed-off-by: Mihai Prica <mihai.prica@intel.com> > --- > recipes-extended/images/kvm-image-minimal.bb | 22 > ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > create mode 100644 recipes-extended/images/kvm-image-minimal.bb > > diff --git a/recipes-extended/images/kvm-image-minimal.bbb/recipes-extended/images/ > kvm-image-minimal.bb > new file mode 100644 > index 0000000..486cd9c > --- /dev/null > +++ b/recipes-extended/images/kvm-image-minimal.bb > @@ -0,0 +1,22 @@ > +DESCRIPTION = "A minimal kvm image" > + > +IMAGE_INSTALL = " \ > + packagegroup-core-boot \ > Have you thought about an image variant that isn't actually bootable ? There are quite a few use cases where having the build not depend on a kernel, but instead simply creates a userspace that can be booted via feeding an external kernel directly to qemu on the command line. Not having the kernel decadency turns out to be quite useful when you want to build a KVM host and KVM guest kernel with different configurations, in a single build. Cheers, Bruce > + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ > + qemu \ > + libvirt \ > + libvirt-libvirtd \ > + libvirt-virsh \ > + " > + > +IMAGE_FEATURES += "ssh-server-openssh" > + > +IMAGE_LINGUAS = " " > + > +LICENSE = "MIT" > + > +inherit core-image > + > +IMAGE_ROOTFS_SIZE = "8192" > + > +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " > -- > 1.7.9.5 > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 3229 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] Created new target:kvm-image-minimal 2013-01-07 13:47 ` Bruce Ashfield @ 2013-01-07 20:26 ` McClintock Matthew-B29882 2013-01-09 19:57 ` Prica, Mihai 0 siblings, 1 reply; 18+ messages in thread From: McClintock Matthew-B29882 @ 2013-01-07 20:26 UTC (permalink / raw) To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org On Mon, Jan 7, 2013 at 7:47 AM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote: > > > > On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@intel.com> wrote: >> >> Signed-off-by: Mihai Prica <mihai.prica@intel.com> >> --- >> recipes-extended/images/kvm-image-minimal.bb | 22 >> ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) >> create mode 100644 recipes-extended/images/kvm-image-minimal.bb >> >> diff --git a/recipes-extended/images/kvm-image-minimal.bb >> b/recipes-extended/images/kvm-image-minimal.bb >> new file mode 100644 >> index 0000000..486cd9c >> --- /dev/null >> +++ b/recipes-extended/images/kvm-image-minimal.bb >> @@ -0,0 +1,22 @@ >> +DESCRIPTION = "A minimal kvm image" >> + >> +IMAGE_INSTALL = " \ >> + packagegroup-core-boot \ > > > Have you thought about an image variant that isn't actually bootable ? There > are > quite a few use cases where having the build not depend on a kernel, but > instead > simply creates a userspace that can be booted via feeding an external kernel > directly to qemu on the command line. > > Not having the kernel decadency turns out to be quite useful when you want > to > build a KVM host and KVM guest kernel with different configurations, in a > single > build. I've shared this with Bruce before so I thought I would share on this list also. It's hacky and possibly not the way to go but we have been doing this in a kvm image. Not the depends, and the post process addition. fsl-image-kvm.bb: # # Copyright (C) 2007 OpenedHand Ltd. # IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" IMAGE_LINGUAS = " " PR = "r1" LICENSE = "MIT" inherit core-image IMAGE_ROOTFS_SIZE = "8192" # remove not needed ipkg informations ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; mkdir ${IMAGE_ROOTFS}/images; cp ${DEPLOY_DIR_IMAGE}/fsl-image-minimal-${MACHINE}.ext2.gz.u-boot ${IMAGE_ROOTFS}/images" IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" # pkgconfig is here for qemu, and it's not in DEPENDS because of multilib # build issues. to fix later IMAGE_INSTALL += "pkgconfig qemu kernel-image" do_rootfs[depends] += "fsl-image-minimal:do_rootfs" > > Cheers, > > Bruce > >> >> + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ >> + qemu \ >> + libvirt \ >> + libvirt-libvirtd \ >> + libvirt-virsh \ >> + " >> + >> +IMAGE_FEATURES += "ssh-server-openssh" >> + >> +IMAGE_LINGUAS = " " >> + >> +LICENSE = "MIT" >> + >> +inherit core-image >> + >> +IMAGE_ROOTFS_SIZE = "8192" >> + >> +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " >> -- >> 1.7.9.5 >> >> _______________________________________________ >> meta-virtualization mailing list >> meta-virtualization@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee at > its end" > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] Created new target:kvm-image-minimal 2013-01-07 20:26 ` McClintock Matthew-B29882 @ 2013-01-09 19:57 ` Prica, Mihai 2013-01-11 21:19 ` Bruce Ashfield 0 siblings, 1 reply; 18+ messages in thread From: Prica, Mihai @ 2013-01-09 19:57 UTC (permalink / raw) To: McClintock Matthew-B29882, Bruce Ashfield Cc: meta-virtualization@yoctoproject.org -----Original Message----- From: McClintock Matthew-B29882 [mailto:B29882@freescale.com] Sent: Monday, January 07, 2013 10:27 PM To: Bruce Ashfield Cc: Prica, Mihai; meta-virtualization@yoctoproject.org Subject: Re: [meta-virtualization] [PATCH 2/2] Created new target:kvm-image-minimal On Mon, Jan 7, 2013 at 7:47 AM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote: > > > > On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@intel.com> wrote: >> >> Signed-off-by: Mihai Prica <mihai.prica@intel.com> >> --- >> recipes-extended/images/kvm-image-minimal.bb | 22 >> ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) >> create mode 100644 recipes-extended/images/kvm-image-minimal.bb >> >> diff --git a/recipes-extended/images/kvm-image-minimal.bb >> b/recipes-extended/images/kvm-image-minimal.bb >> new file mode 100644 >> index 0000000..486cd9c >> --- /dev/null >> +++ b/recipes-extended/images/kvm-image-minimal.bb >> @@ -0,0 +1,22 @@ >> +DESCRIPTION = "A minimal kvm image" >> + >> +IMAGE_INSTALL = " \ >> + packagegroup-core-boot \ > > > Have you thought about an image variant that isn't actually bootable ? > There are quite a few use cases where having the build not depend on a > kernel, but instead simply creates a userspace that can be booted via > feeding an external kernel directly to qemu on the command line. > > Not having the kernel decadency turns out to be quite useful when you > want to build a KVM host and KVM guest kernel with different > configurations, in a single build. I don't exactly understand what you mean by " an image variant that isn't actually bootable ?". I just used core-image-minimal as a starting point. Using this recipe you just get the ext3 and the kernel, you don't get an hddimg.. > I've shared this with Bruce before so I thought I would share on this list also. It's hacky and possibly not the way to go but we have been doing this in a kvm image. Not the depends, and the post process addition. > > fsl-image-kvm.bb: > > # > # Copyright (C) 2007 OpenedHand Ltd. > # > IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} u-boot" > IMAGE_LINGUAS = " " > > PR = "r1" > > LICENSE = "MIT" > > inherit core-image > > IMAGE_ROOTFS_SIZE = "8192" > > # remove not needed ipkg informations > ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; mkdir ${IMAGE_ROOTFS}/images; cp ${DEPLOY_DIR_IMAGE}/fsl-image-minimal-${MACHINE}.ext2.gz.u-boot > ${IMAGE_ROOTFS}/images" > > IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" > > # pkgconfig is here for qemu, and it's not in DEPENDS because of multilib # build issues. to fix later IMAGE_INSTALL += "pkgconfig qemu kernel-image" > > do_rootfs[depends] += "fsl-image-minimal:do_rootfs" Thanks for the recipe. I'll see what I can use from it. Mihai > > > Cheers, > > Bruce > >> >> + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ >> + qemu \ >> + libvirt \ >> + libvirt-libvirtd \ >> + libvirt-virsh \ >> + " >> + >> +IMAGE_FEATURES += "ssh-server-openssh" >> + >> +IMAGE_LINGUAS = " " >> + >> +LICENSE = "MIT" >> + >> +inherit core-image >> + >> +IMAGE_ROOTFS_SIZE = "8192" >> + >> +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " >> -- >> 1.7.9.5 >> >> _______________________________________________ >> meta-virtualization mailing list >> meta-virtualization@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] Created new target:kvm-image-minimal 2013-01-09 19:57 ` Prica, Mihai @ 2013-01-11 21:19 ` Bruce Ashfield 0 siblings, 0 replies; 18+ messages in thread From: Bruce Ashfield @ 2013-01-11 21:19 UTC (permalink / raw) To: Prica, Mihai Cc: McClintock Matthew-B29882, meta-virtualization@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 5204 bytes --] On Wed, Jan 9, 2013 at 2:57 PM, Prica, Mihai <mihai.prica@intel.com> wrote: > -----Original Message----- > From: McClintock Matthew-B29882 [mailto:B29882@freescale.com] > Sent: Monday, January 07, 2013 10:27 PM > To: Bruce Ashfield > Cc: Prica, Mihai; meta-virtualization@yoctoproject.org > Subject: Re: [meta-virtualization] [PATCH 2/2] Created new > target:kvm-image-minimal > > On Mon, Jan 7, 2013 at 7:47 AM, Bruce Ashfield <bruce.ashfield@gmail.com> > wrote: > > > > > > > > On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@intel.com> > wrote: > >> > >> Signed-off-by: Mihai Prica <mihai.prica@intel.com> > >> --- > >> recipes-extended/images/kvm-image-minimal.bb | 22 > >> ++++++++++++++++++++++ > >> 1 file changed, 22 insertions(+) > >> create mode 100644 recipes-extended/images/kvm-image-minimal.bb > >> > >> diff --git a/recipes-extended/images/kvm-image-minimal.bb > >> b/recipes-extended/images/kvm-image-minimal.bb > >> new file mode 100644 > >> index 0000000..486cd9c > >> --- /dev/null > >> +++ b/recipes-extended/images/kvm-image-minimal.bb > >> @@ -0,0 +1,22 @@ > >> +DESCRIPTION = "A minimal kvm image" > >> + > >> +IMAGE_INSTALL = " \ > >> + packagegroup-core-boot \ > > > > > > Have you thought about an image variant that isn't actually bootable ? > > There are quite a few use cases where having the build not depend on a > > kernel, but instead simply creates a userspace that can be booted via > > feeding an external kernel directly to qemu on the command line. > > > > Not having the kernel decadency turns out to be quite useful when you > > want to build a KVM host and KVM guest kernel with different > > configurations, in a single build. > > I don't exactly understand what you mean by " an image variant that isn't > actually bootable ?". I just used core-image-minimal as a starting point. > Using this recipe you just get the ext3 and the kernel, you don't get an > hddimg.. > > What I mean is that a "bootable" image typically depends on virtual/kernel to configure and build a kernel, and then possibly assemble parts of the kernel output into the image itself. We often want to build a rootfs, but have no kernel build as part of that rootfs, since the kernel is built separately and then passed to qemu-kvm during the launch phase. Not having that dependency means that you can just build userspace, assemble a rootfs and then launch the guest. If you have a dependency on virtual/kernel it turns out that you can end up with a circular dependency if you use a method like Matthew showed, the nested rootfs depend has it's own kernel dependency, and you have an image that depends on a kernel, that depends on an image that depends on a kernel .. etc, and you continue looping. Having an image that doesn't depend on virtual/kernel at any point, breaks that loop. Cheers, Bruce > > I've shared this with Bruce before so I thought I would share on this > list also. It's hacky and possibly not the way to go but we have been doing > this in a kvm image. Not the depends, and the post process addition. > > > > fsl-image-kvm.bb: > > > > # > > # Copyright (C) 2007 OpenedHand Ltd. > > # > > IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} > u-boot" > > IMAGE_LINGUAS = " " > > > > PR = "r1" > > > > LICENSE = "MIT" > > > > inherit core-image > > > > IMAGE_ROOTFS_SIZE = "8192" > > > > # remove not needed ipkg informations > > ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; mkdir > ${IMAGE_ROOTFS}/images; cp > ${DEPLOY_DIR_IMAGE}/fsl-image-minimal-${MACHINE}.ext2.gz.u-boot > > ${IMAGE_ROOTFS}/images" > > > > IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot" > > > > # pkgconfig is here for qemu, and it's not in DEPENDS because of > multilib # build issues. to fix later IMAGE_INSTALL += "pkgconfig qemu > kernel-image" > > > > do_rootfs[depends] += "fsl-image-minimal:do_rootfs" > > Thanks for the recipe. I'll see what I can use from it. > > > Mihai > > > > > > Cheers, > > > > Bruce > > > >> > >> + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ > >> + qemu \ > >> + libvirt \ > >> + libvirt-libvirtd \ > >> + libvirt-virsh \ > >> + " > >> + > >> +IMAGE_FEATURES += "ssh-server-openssh" > >> + > >> +IMAGE_LINGUAS = " " > >> + > >> +LICENSE = "MIT" > >> + > >> +inherit core-image > >> + > >> +IMAGE_ROOTFS_SIZE = "8192" > >> + > >> +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " > >> -- > >> 1.7.9.5 > >> > >> _______________________________________________ > >> meta-virtualization mailing list > >> meta-virtualization@yoctoproject.org > >> https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > > > > > > > -- > > "Thou shalt not follow the NULL pointer, for chaos and madness await > > thee at its end" > > > > _______________________________________________ > > meta-virtualization mailing list > > meta-virtualization@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/meta-virtualization > > > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" [-- Attachment #2: Type: text/html, Size: 7966 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/2] KVM integration 2013-01-07 12:08 [PATCH 0/2] KVM integration Mihai Prica 2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica 2013-01-07 12:08 ` [PATCH 2/2] Created new target:kvm-image-minimal Mihai Prica @ 2013-01-07 12:14 ` David Nyström 2 siblings, 0 replies; 18+ messages in thread From: David Nyström @ 2013-01-07 12:14 UTC (permalink / raw) To: Mihai Prica; +Cc: meta-virtualization On 01/07/2013 01:08 PM, Mihai Prica wrote: > More details on building a KVM image can be found on the wiki page at: > https://wiki.yoctoproject.org/wiki/Virtualization_with_KVM > > Mihai Prica (2): > linux-yocto: added kernel configuration for KVM > Created new target:kvm-image-minimal > > recipes-extended/images/kvm-image-minimal.bb | 22 ++++++++++++++++++++++ > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 4 files changed, 31 insertions(+) > create mode 100644 recipes-extended/images/kvm-image-minimal.bb > create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > Reviewed-by: David Nyström <david.nystrom@enea.com> ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-01-11 21:19 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-07 12:08 [PATCH 0/2] KVM integration Mihai Prica 2013-01-07 12:08 ` [PATCH 1/2] linux-yocto: added kernel configuration for KVM Mihai Prica 2013-01-07 13:42 ` Bruce Ashfield 2013-01-07 17:26 ` Raymond Danks 2013-01-07 18:10 ` Bruce Ashfield 2013-01-07 18:31 ` Raymond Danks 2013-01-08 18:45 ` Prica, Mihai 2013-01-09 2:20 ` Lei Yang 2013-01-09 3:44 ` Bruce Ashfield 2013-01-09 19:43 ` Prica, Mihai 2013-01-10 7:32 ` Lei Yang 2013-01-10 13:39 ` Bruce Ashfield 2013-01-07 12:08 ` [PATCH 2/2] Created new target:kvm-image-minimal Mihai Prica 2013-01-07 13:47 ` Bruce Ashfield 2013-01-07 20:26 ` McClintock Matthew-B29882 2013-01-09 19:57 ` Prica, Mihai 2013-01-11 21:19 ` Bruce Ashfield 2013-01-07 12:14 ` [PATCH 0/2] KVM integration David Nyström
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.