From 222f8d486dceba3744dde79fd004292ea824124b Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 6 Sep 2016 11:51:40 -0700 Subject: 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. Signed-off-by: Stefan Agner Signed-off-by: Bruce Ashfield --- .../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 diff --git a/recipes-extended/kvmtool/files/external-crosscompiler.patch b/recipes-extended/kvmtool/files/external-crosscompiler.patch new file mode 100644 index 00000000..75cef3b1 --- /dev/null +++ b/recipes-extended/kvmtool/files/external-crosscompiler.patch @@ -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 diff --git a/recipes-extended/kvmtool/kvmtool.bb b/recipes-extended/kvmtool/kvmtool.bb new file mode 100644 index 00000000..3f299dd5 --- /dev/null +++ b/recipes-extended/kvmtool/kvmtool.bb @@ -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}/ +} -- cgit v1.2.3-54-g00ecf