Skip to contentSkip to conversation

kvmtool: add lightweight hypervisor native Linux KVM tool

PATCH In review Stefan Agner 2 participants 2 messages Sep 6, 2016 – Sep 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvmtool: add lightweight hypervisor native Linux KVM tool

Add Native Linux KVM tool, a lightweight tool for hosting KVM guests maintained by the Linux kernel community.

---
 .../kvmtool/files/external-crosscompiler.patch     | 31 ++++++++++++++++++++++
 recipes-extended/kvmtool/kvmtool.bb                | 23 ++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 recipes-extended/kvmtool/files/external-crosscompiler.patch
 create mode 100644 recipes-extended/kvmtool/kvmtool.bb
recipes-extended/kvmtool/files/external-crosscompiler.patch new file +31 -0
new file mode 100644
index 0000000..75cef3b
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+This allows OpenEmbedded to pass in cross compiler configuration using
+the default envirnment variables. It is required so that kvmtool can
+be linked against the cross-compiled libfdt library.
+
+diff --git a/Makefile b/Makefile
+index 1f0196f..8bfb068 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,11 +14,6 @@ export E Q
+ include config/utilities.mak
+ include config/feature-tests.mak
+ 
+-CC	:= $(CROSS_COMPILE)gcc
+-CFLAGS	:=
+-LD	:= $(CROSS_COMPILE)ld
+-LDFLAGS	:=
+-
+ FIND	:= find
+ CSCOPE	:= cscope
+ TAGS	:= ctags
+@@ -297,7 +292,7 @@ $(warning No static libc found. Skipping guest init)
+ endif
+ 
+ ifeq (y,$(ARCH_WANT_LIBFDT))
+-	ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
++	ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS) $(CFLAGS),-lfdt),y)
+           $(error No libfdt found. Please install libfdt-dev package)
+ 	else
+ 		CFLAGS_DYNOPT	+= -DCONFIG_HAS_LIBFDT
recipes-extended/kvmtool/kvmtool.bb new file +23 -0
new file mode 100644
index 0000000..3f299dd
@@ -0,0 +1,23 @@
+SUMMARY = "Native Linux KVM tool"
+DESCRIPTION = "kvmtool is a lightweight tool for hosting KVM guests."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+
+DEPENDS = "dtc libaio zlib"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \
+           file://external-crosscompiler.patch \
+    "
+
+SRCREV = "0093df80d754e1a05b016e5a4ccd4b51a00c562c"
+PV = "3.18.0+git${SRCREV}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE='ARCH="${TARGET_ARCH}" V=1'
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/lkvm ${D}${bindir}/
+}
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Stefan Agner

Add Native Linux KVM tool, a lightweight tool for hosting KVM guests maintained by the Linux kernel community.

A nice addition to the layer. Thanks!

merged.

Bruce

Quoted 89 lines
---
 .../kvmtool/files/external-crosscompiler.patch     | 31
++++++++++++++++++++++
 recipes-extended/kvmtool/kvmtool.bb                | 23 ++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 recipes-extended/kvmtool/files/external-crosscompiler.
patch
 create mode 100644 recipes-extended/kvmtool/kvmtool.bb
recipes-extended/kvmtool/files/external-crosscompiler.patch new file +28 -0
new file mode 100644
index 0000000..75cef3b
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+This allows OpenEmbedded to pass in cross compiler configuration using
+the default envirnment variables. It is required so that kvmtool can
+be linked against the cross-compiled libfdt library.
+
+diff --git a/Makefile b/Makefile
+index 1f0196f..8bfb068 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,11 +14,6 @@ export E Q
+ include config/utilities.mak
+ include config/feature-tests.mak
+
+-CC    := $(CROSS_COMPILE)gcc
+-CFLAGS        :=
+-LD    := $(CROSS_COMPILE)ld
+-LDFLAGS       :=
+-
+ FIND  := find
+ CSCOPE        := cscope
+ TAGS  := ctags
+@@ -297,7 +292,7 @@ $(warning No static libc found. Skipping guest init)
+ endif
+
+ ifeq (y,$(ARCH_WANT_LIBFDT))
+-      ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
++      ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS)

$(CFLAGS),-lfdt),y)

recipes-extended/kvmtool/files/external-crosscompiler.patch new file +3 -0
+           $(error No libfdt found. Please install libfdt-dev package)
+       else
+               CFLAGS_DYNOPT   += -DCONFIG_HAS_LIBFDT
recipes-extended/kvmtool/kvmtool.bb new file +9 -0
new file mode 100644
index 0000000..3f299dd
@@ -0,0 +1,23 @@
+SUMMARY = "Native Linux KVM tool"
+DESCRIPTION = "kvmtool is a lightweight tool for hosting KVM guests."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+
+DEPENDS = "dtc libaio zlib"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git

\

recipes-extended/kvmtool/kvmtool.bb new file +14 -1
+           file://external-crosscompiler.patch \
+    "
+
+SRCREV = "0093df80d754e1a05b016e5a4ccd4b51a00c562c"
+PV = "3.18.0+git${SRCREV}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE='ARCH="${TARGET_ARCH}" V=1'
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/lkvm ${D}${bindir}/
+}
--

1.9.1

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"