Date   

Re: [PATCH 2/2] Created new target:kvm-image-minimal

Bruce Ashfield
 




On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@...> wrote:
Signed-off-by: Mihai Prica <mihai.prica@...>
---
 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.

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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization



--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Raymond Danks <ray.danks@...>
 

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@...>
---
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 \
"


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Bruce Ashfield
 




On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@...> 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@...>
---
  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"


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Raymond Danks <ray.danks@...>
 

On 01/07/2013 11:10 AM, Bruce Ashfield wrote:



On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@...> 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@...>
---
  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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization



--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"


Re: It seems my patch review doesn't deliver to this mail list

Matthew McClintock
 

On Sat, Jan 5, 2013 at 5:15 AM, David Nyström <david.c.nystrom@...> wrote:
Hi,

Please use a subscribed address to post to this list,
Messages from unsubscribed posters get put on hold and needs to be manually
accepted by maintainers, which may lag in time.
fyi, you can subscribe the other email and turn off mail delivery so
patches are accepted.

-M


Br,
David



On 01/05/2013 11:19 AM, lei yang wrote:

Hi list,

I send a patch, it seems blocked because I use my another mail which
doesn't subscribe this list, do I need to resend with this mail
account?

Lei
_______________________________________________
meta-virtualization mailing list
meta-virtualization@...
https://lists.yoctoproject.org/listinfo/meta-virtualization
_______________________________________________
meta-virtualization mailing list
meta-virtualization@...
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [meta-networking][PATCHV2] Add netcat-bsd into meta-networking for meta-virutalization libvirt virt-test

Joe MacDonald <Joe.MacDonald@...>
 

[Re: [meta-networking][PATCHV2] Add netcat-bsd into meta-networking for meta-virutalization libvirt virt-test] On 13.01.06 (Sun 21:15) Joe MacDonald wrote:

[[meta-networking][PATCHV2] Add netcat-bsd into meta-networking for meta-virutalization libvirt virt-test] On 13.01.07 (Mon 09:38) lei.yang@... wrote:

From: Lei Yang <lei.yang@...>

The netcat-openbsd in meta-virtualization layer has bugs.
This update version will fix "nc: Protocol no available." error.
As bruce point, we want to keep netcat in the meta-networking,
which meta-virtualization will depend on,and this patch will let
netcat-openbsd with low priority to install
Okay, I hadn't seen this version yet. Looks okay, I think. I'll
merge it anyway soon, unless there's further discussion.
Merged. Thanks, Lei.

-J.

The dependency on
meta-networking from meta-virtualization is probably out of scope. Ping
me any time if you've got any questions about the relationship between
meta-oe/meta-networking and my github meta-networking.

Thanks, Lei.

-J.


Lei

Signed-off-by: Lei Yang <lei.yang@...>
---
.../recipes-support/netcat/netcat-openbsd_1.89.bb | 30 ++++++++++++++++++++
meta-networking/recipes-support/netcat/netcat.inc | 5 +++
.../recipes-support/netcat/netcat_0.7.1.bb | 11 +++----
3 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd_1.89.bb
create mode 100644 meta-networking/recipes-support/netcat/netcat.inc

diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.89.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.89.bb
new file mode 100644
index 0000000..f83caee
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.89.bb
@@ -0,0 +1,30 @@
+require netcat.inc
+DESCRIPTION = "OpenBSD Netcat"
+HOMEPAGE = "http://ftp.debian.org"
+LICENSE = "BSD-3-Clause"
+PR = "r0"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_1.89.orig.tar.gz;name=netcat \
+ ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_1.89-4.diff.gz;name=netcat-patch"
+
+SRC_URI[netcat.md5sum] = "7238ce15aae43069e96ba7faf03f153e"
+SRC_URI[netcat.sha256sum] = "72e844dde8a2a7cba61971d493758dbea9ef0b164bccef15fd4a36490dc77f2b"
+SRC_URI[netcat-patch.md5sum] = "00c65aa22243b76998174c733cbb64cc"
+SRC_URI[netcat-patch.sha256sum] = "d5b6b2bd9788114bdcfbb71acad0263720b4fdc41529e287adf451b8610f84f1"
+
+S = "${WORKDIR}/${PN}-${PV}.orig"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ cd ${S}
+ while read line; do patch -p1 <debian/patches/$line; done <debian/patches/series
+ pkgrel=4
+ oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 ${S}/nc ${D}${bindir}/nc.${PN}
+}
+ALTERNATIVE_PRIORITY = "50"
diff --git a/meta-networking/recipes-support/netcat/netcat.inc b/meta-networking/recipes-support/netcat/netcat.inc
new file mode 100644
index 0000000..6c815d9
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat.inc
@@ -0,0 +1,5 @@
+SECTION = "console/network"
+inherit update-alternatives gettext
+
+ALTERNATIVE_${PN} = "nc"
+
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
index c5ab85d..c4f1f33 100644
--- a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
+++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -1,21 +1,20 @@
+require netcat.inc
DESCRIPTION = "GNU Netcat"
HOMEPAGE = "http://netcat.sourceforge.net"
-SECTION = "console/network"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

-PR = "r0"
+PR = "r1"

SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2"

SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb"

-inherit autotools update-alternatives gettext
+inherit autotools

do_install_append() {
- mv ${D}${bindir}/nc ${D}${bindir}/nc.${PN}
+ install -d ${D}${bindir}
+ mv ${D}${bindir}/nc ${D}${bindir}/nc.${PN}
}
-
-ALTERNATIVE_${PN} = "nc"
ALTERNATIVE_PRIORITY = "100"
--
-Joe MacDonald.
:wq


Re: [PATCH 2/2] Created new target:kvm-image-minimal

Matthew McClintock
 

On Mon, Jan 7, 2013 at 7:47 AM, Bruce Ashfield <bruce.ashfield@...> wrote:



On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@...> wrote:

Signed-off-by: Mihai Prica <mihai.prica@...>
---
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@...
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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Prica, Mihai <mihai.prica@...>
 

 

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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization



 

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

 


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Lei Yang
 

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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Bruce Ashfield
 




On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@...> 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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
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"


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Prica, Mihai <mihai.prica@...>
 

On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@...> 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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
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"


Re: [PATCH 2/2] Created new target:kvm-image-minimal

Prica, Mihai <mihai.prica@...>
 

-----Original Message-----
From: McClintock Matthew-B29882 [mailto:B29882@...]
Sent: Monday, January 07, 2013 10:27 PM
To: Bruce Ashfield
Cc: Prica, Mihai; meta-virtualization@...
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@...> wrote:



On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@...> wrote:

Signed-off-by: Mihai Prica <mihai.prica@...>
---
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@...
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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Lei Yang
 

On 01/10/2013 03:43 AM, Prica, Mihai wrote:

On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@...> 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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM

Bruce Ashfield
 




On Thu, Jan 10, 2013 at 2:32 AM, Lei Yang <lei.yang@...> wrote:
On 01/10/2013 03:43 AM, Prica, Mihai wrote:

On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@...> 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

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@... [mailto:meta-virtualization-bounces@...] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@...
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@...> 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@...>
---
  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@...
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@...
https://lists.yoctoproject.org/listinfo/meta-virtualization




--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"


[PATCH v2 1/2] linux-yocto: added kernel configuration for KVM

Mihai Prica <mihai.prica@...>
 

Signed-off-by: Mihai Prica <mihai.prica@...>
---
recipes-kernel/linux/linux-yocto_3.4.bbappend | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
index 5b163ff..6fa02e8 100644
--- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
@@ -6,3 +6,8 @@ SRC_URI += "file://xt-checksum.scc \
file://lxc.scc \
"

+KERNEL_FEATURES_append = " kvm/qemu-kvm-enable"
+
+module_autoload_kvm = "kvm"
+module_autoload_kvm-amd = "kvm-amd"
+module_autoload_kvm-intel = "kvm-intel"
--
1.7.9.5


[PATCH v2 2/2] Created new target:kvm-image-minimal

Mihai Prica <mihai.prica@...>
 

Signed-off-by: Mihai Prica <mihai.prica@...>
---
recipes-extended/images/kvm-image-minimal.bb | 28 ++++++++++++++++++++++++++
1 file changed, 28 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..275c43b
--- /dev/null
+++ b/recipes-extended/images/kvm-image-minimal.bb
@@ -0,0 +1,28 @@
+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 ; "
+
+PACKAGE_INSTALL_ATTEMPTONLY = "\
+ kernel-module-kvm \
+ kernel-module-kvm-intel \
+ kernel-module-kvm-amd \
+ "
--
1.7.9.5


[PATCH] ebtables: Fixed typo in RRECOMMENDS

Mihai Prica <mihai.prica@...>
 

Signed-off-by: Mihai Prica <mihai.prica@...>
---
recipes-extended/ebtables/ebtables_2.0.9-2.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-extended/ebtables/ebtables_2.0.9-2.bb b/recipes-extended/ebtables/ebtables_2.0.9-2.bb
index 15213cb..66c7b95 100644
--- a/recipes-extended/ebtables/ebtables_2.0.9-2.bb
+++ b/recipes-extended/ebtables/ebtables_2.0.9-2.bb
@@ -23,7 +23,7 @@ S = "${WORKDIR}/ebtables-v${PV}"
ASNEEDED_pn-${PN} = ""

#Load the necessary kernel modules
-RECOMMENDS_${PN} += "kernel-module-ebtables \
+RRECOMMENDS_${PN} += "kernel-module-ebtables \
kernel-module-ebtable-nat \
kernel-module-ebtable-filter \
kernel-module-ebtable_broute \
--
1.7.9.5


Re: [PATCH v2 2/2] Created new target:kvm-image-minimal

Lei Yang
 

On 01/12/2013 12:27 AM, Mihai Prica wrote:
Signed-off-by: Mihai Prica<mihai.prica@...>
---
recipes-extended/images/kvm-image-minimal.bb | 28 ++++++++++++++++++++++++++
1 file changed, 28 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..275c43b
--- /dev/null
+++ b/recipes-extended/images/kvm-image-minimal.bb
@@ -0,0 +1,28 @@
+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 ; "
+
+PACKAGE_INSTALL_ATTEMPTONLY = "\
Hi Mibai

can you explain "PACKAGE_INSTALL_ATTEMPTONLY " to me, I just see this variable first time

Lei
:-)

+ kernel-module-kvm \
+ kernel-module-kvm-intel \
+ kernel-module-kvm-amd \
+ "


Re: [PATCH v2 1/2] linux-yocto: added kernel configuration for KVM

Bruce Ashfield
 

On Fri, Jan 11, 2013 at 11:27 AM, Mihai Prica <mihai.prica@...> wrote:
Signed-off-by: Mihai Prica <mihai.prica@...>
---
 recipes-kernel/linux/linux-yocto_3.4.bbappend |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
index 5b163ff..6fa02e8 100644
--- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
@@ -6,3 +6,8 @@ SRC_URI += "file://xt-checksum.scc \
            file://lxc.scc \
            "

+KERNEL_FEATURES_append = " kvm/qemu-kvm-enable"

Have you confirmed that this is adding the option you want ? I would have
expected this to be:

KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"

 
+
+module_autoload_kvm = "kvm"
+module_autoload_kvm-amd = "kvm-amd"
+module_autoload_kvm-intel = "kvm-intel"

This part looks fine though.

Cheers,

Bruce
 
--
1.7.9.5

_______________________________________________
meta-virtualization mailing list
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"


Re: [PATCH 2/2] Created new target:kvm-image-minimal

Bruce Ashfield
 




On Wed, Jan 9, 2013 at 2:57 PM, Prica, Mihai <mihai.prica@...> wrote:
-----Original Message-----
From: McClintock Matthew-B29882 [mailto:B29882@...]
Sent: Monday, January 07, 2013 10:27 PM
To: Bruce Ashfield
Cc: Prica, Mihai; meta-virtualization@...
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@...> wrote:
>
>
>
> On Mon, Jan 7, 2013 at 7:08 AM, Mihai Prica <mihai.prica@...> wrote:
>>
>> Signed-off-by: Mihai Prica <mihai.prica@...>
>> ---
>>  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@...
>> 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@...
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

161 - 180 of 7515