diff options
author | Dariusz Pelowski <dariusz.pelowski@gmail.com> | 2017-11-05 13:15:41 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-11-06 08:51:29 -0500 |
commit | 8cc50eae10a10f5aeaa681132889b2a6db8809bd (patch) | |
tree | 5bd519791a2207f2c8a102a651a9b4f7661f51bd /recipes-extended/kvmtool | |
parent | 71dc7faa0c7ceb9396e51bf7a77502c3781a54f2 (diff) | |
download | meta-virtualization-8cc50eae10a10f5aeaa681132889b2a6db8809bd.tar.gz |
kvmtool: fix compilation errors
Fixed issues:
Usage of makedev requires including <sys/sysmacros.h> otherwise
the error is raised due to multiple definition in <sys/types.h>.
Add include path to kernel headers required to get kvmtool
compilatioin successful.
Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/kvmtool')
3 files changed, 62 insertions, 1 deletions
diff --git a/recipes-extended/kvmtool/files/0001-kvmtool-9p-fixed-compilation-error.patch b/recipes-extended/kvmtool/files/0001-kvmtool-9p-fixed-compilation-error.patch new file mode 100644 index 00000000..63911fc2 --- /dev/null +++ b/recipes-extended/kvmtool/files/0001-kvmtool-9p-fixed-compilation-error.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From bcd954ffdb9383030e02d356b51e09e4e2a7105a Mon Sep 17 00:00:00 2001 | ||
2 | From: Dariusz Pelowski <dariusz.pelowski@gmail.com> | ||
3 | Date: Sun, 5 Nov 2017 12:39:52 +0100 | ||
4 | Subject: [PATCH 1/2] kvmtool: 9p: fixed compilation error | ||
5 | |||
6 | makedev is defined in sys/sysmacros.h | ||
7 | |||
8 | Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> | ||
9 | --- | ||
10 | virtio/9p.c | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/virtio/9p.c b/virtio/9p.c | ||
14 | index 6acbfdd..1dee2c2 100644 | ||
15 | --- a/virtio/9p.c | ||
16 | +++ b/virtio/9p.c | ||
17 | @@ -15,6 +15,7 @@ | ||
18 | #include <string.h> | ||
19 | #include <errno.h> | ||
20 | #include <sys/vfs.h> | ||
21 | +#include <sys/sysmacros.h> | ||
22 | |||
23 | #include <linux/virtio_ring.h> | ||
24 | #include <linux/virtio_9p.h> | ||
25 | -- | ||
26 | 2.15.0 | ||
27 | |||
diff --git a/recipes-extended/kvmtool/files/0002-kvmtool-add-EXTRA_CFLAGS-variable.patch b/recipes-extended/kvmtool/files/0002-kvmtool-add-EXTRA_CFLAGS-variable.patch new file mode 100644 index 00000000..262531ca --- /dev/null +++ b/recipes-extended/kvmtool/files/0002-kvmtool-add-EXTRA_CFLAGS-variable.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 977a4d41012d1814f5a5330cacc2e4944de387cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Dariusz Pelowski <dariusz.pelowski@gmail.com> | ||
3 | Date: Sun, 5 Nov 2017 12:39:21 +0100 | ||
4 | Subject: [PATCH 2/2] kvmtool: add EXTRA_CFLAGS variable | ||
5 | |||
6 | to avoid CFLAGS overriding introduce new EXTRA_CFLAGS variable | ||
7 | for setting via command argument | ||
8 | |||
9 | Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> | ||
10 | --- | ||
11 | Makefile | 2 ++ | ||
12 | 1 file changed, 2 insertions(+) | ||
13 | |||
14 | diff --git a/Makefile b/Makefile | ||
15 | index 64a0a16..bca1b26 100644 | ||
16 | --- a/Makefile | ||
17 | +++ b/Makefile | ||
18 | @@ -2,6 +2,8 @@ | ||
19 | # Define WERROR=0 to disable -Werror. | ||
20 | # | ||
21 | |||
22 | +CFLAGS += $(EXTRA_CFLAGS) | ||
23 | + | ||
24 | ifeq ($(strip $(V)),) | ||
25 | E = @echo | ||
26 | Q = @ | ||
27 | -- | ||
28 | 2.15.0 | ||
29 | |||
diff --git a/recipes-extended/kvmtool/kvmtool.bb b/recipes-extended/kvmtool/kvmtool.bb index b3bf2029..33fec311 100644 --- a/recipes-extended/kvmtool/kvmtool.bb +++ b/recipes-extended/kvmtool/kvmtool.bb | |||
@@ -5,10 +5,15 @@ LICENSE = "GPLv2" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" |
6 | 6 | ||
7 | DEPENDS = "dtc libaio zlib" | 7 | DEPENDS = "dtc libaio zlib" |
8 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
9 | |||
10 | inherit kernel-arch | ||
8 | 11 | ||
9 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \ | 12 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \ |
10 | file://external-crosscompiler.patch \ | 13 | file://external-crosscompiler.patch \ |
11 | file://0001-Avoid-pointers-for-address-of-packed-members.patch \ | 14 | file://0001-Avoid-pointers-for-address-of-packed-members.patch \ |
15 | file://0001-kvmtool-9p-fixed-compilation-error.patch \ | ||
16 | file://0002-kvmtool-add-EXTRA_CFLAGS-variable.patch \ | ||
12 | " | 17 | " |
13 | 18 | ||
14 | SRCREV = "3fea89a924511f9f8fe05a892098fad77c1eca0d" | 19 | SRCREV = "3fea89a924511f9f8fe05a892098fad77c1eca0d" |
@@ -16,7 +21,7 @@ PV = "3.18.0+git${SRCREV}" | |||
16 | 21 | ||
17 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
18 | 23 | ||
19 | EXTRA_OEMAKE='ARCH="${TARGET_ARCH}" V=1' | 24 | EXTRA_OEMAKE='V=1 EXTRA_CFLAGS="-I${STAGING_KERNEL_DIR}/arch/${ARCH}/include -I${STAGING_KERNEL_BUILDDIR}/arch/${ARCH}/include/generated/"' |
20 | 25 | ||
21 | do_install() { | 26 | do_install() { |
22 | install -d ${D}${bindir} | 27 | install -d ${D}${bindir} |