summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2022-04-13 18:20:55 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-04-13 23:16:49 -0400
commit1f9c37e1a67a269833605a083e26538b130e4d8e (patch)
treea6c4c803db4afa5bd29b4aa4db935edb8154f520
parentbed7142c26c2bff1eb690c42eed07ac0ed535ba2 (diff)
downloadmeta-virtualization-1f9c37e1a67a269833605a083e26538b130e4d8e.tar.gz
libvmi: Fix out of box build failure with xen disabled
vbd was added for xen based VMs since bdee00fac9b4 ("Disk reading interface for Xen based VMs and example") and should be built only when xen is enabled, otherwise there would not be necessary xen headers and cause the following failure. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/libvmi/files/0001-Build-vbd-only-when-xen-is-enabled.patch76
-rw-r--r--recipes-extended/libvmi/libvmi_git.bb1
2 files changed, 77 insertions, 0 deletions
diff --git a/recipes-extended/libvmi/files/0001-Build-vbd-only-when-xen-is-enabled.patch b/recipes-extended/libvmi/files/0001-Build-vbd-only-when-xen-is-enabled.patch
new file mode 100644
index 00000000..bf6e9f0e
--- /dev/null
+++ b/recipes-extended/libvmi/files/0001-Build-vbd-only-when-xen-is-enabled.patch
@@ -0,0 +1,76 @@
1From fb7a1493c7d4a30ae930d8cb7dcb84c83c0cacce Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 13 Apr 2022 09:26:01 +0000
4Subject: [PATCH] Build vbd only when xen is enabled
5
6vbd was added for xen based VMs since
7bdee00fac9b4 ("Disk reading interface for Xen based VMs and example")
8and should be built only when xen is enabled, otherwise there would not be
9necessary xen headers and cause the following failure.
10
11xen_private.h:38:10: fatal error: xenctrl.h: No such file or directory
12
13Upstream-Status: Pending
14
15Signed-off-by: He Zhe <zhe.he@windriver.com>
16---
17 Makefile.am | 8 ++++----
18 libvmi/CMakeLists.txt | 2 +-
19 2 files changed, 5 insertions(+), 5 deletions(-)
20
21diff --git a/Makefile.am b/Makefile.am
22index 097c23c..c560a1d 100644
23--- a/Makefile.am
24+++ b/Makefile.am
25@@ -17,8 +17,7 @@ h_private = \
26 libvmi/os/os_interface.h \
27 libvmi/driver/driver_interface.h \
28 libvmi/driver/driver_wrapper.h \
29- libvmi/driver/memory_cache.h \
30- libvmi/disk/vbd_private.h
31+ libvmi/driver/memory_cache.h
32
33 c_sources = \
34 libvmi/accessors.c \
35@@ -39,8 +38,7 @@ c_sources = \
36 libvmi/arch/ept.c \
37 libvmi/driver/driver_interface.c \
38 libvmi/driver/memory_cache.c \
39- libvmi/os/os_interface.c \
40- libvmi/disk/vbd.c
41+ libvmi/os/os_interface.c
42
43 if ENABLE_ADDRESS_CACHE
44 c_sources += libvmi/cache.c
45@@ -104,6 +102,8 @@ if WITH_XEN
46 libvmi/driver/xen/libxc_wrapper.h \
47 libvmi/driver/xen/libxs_wrapper.c \
48 libvmi/driver/xen/libxs_wrapper.h
49+ h_private += libvmi/disk/vbd_private.h
50+ c_sources += libvmi/disk/vbd.c
51 endif
52
53 if WITH_BAREFLANK
54diff --git a/libvmi/CMakeLists.txt b/libvmi/CMakeLists.txt
55index ac57d79..7e87751 100644
56--- a/libvmi/CMakeLists.txt
57+++ b/libvmi/CMakeLists.txt
58@@ -18,7 +18,6 @@ set(libvmi_src
59 driver/driver_interface.c
60 driver/memory_cache.c
61 os/os_interface.c
62- disk/vbd.c
63 )
64
65 add_library(vmi OBJECT ${libvmi_src})
66@@ -169,6 +168,7 @@ add_subdirectory(os)
67
68
69 if (ENABLE_XEN)
70+ list(APPEND libvmi_src disk/vbd.c)
71 find_package(Xen REQUIRED)
72 list(APPEND VMI_PUBLIC_HEADERS events.h)
73 # CMAKE_DL_LIBS -> dlopen* lib
74--
752.32.0
76
diff --git a/recipes-extended/libvmi/libvmi_git.bb b/recipes-extended/libvmi/libvmi_git.bb
index d856256a..72069c68 100644
--- a/recipes-extended/libvmi/libvmi_git.bb
+++ b/recipes-extended/libvmi/libvmi_git.bb
@@ -9,6 +9,7 @@ PV = "0.14.0+git${SRCPV}"
9DEPENDS = "libvirt libcheck bison fuse byacc-native" 9DEPENDS = "libvirt libcheck bison fuse byacc-native"
10 10
11SRC_URI = "git://github.com/libvmi/libvmi.git;branch=master;protocol=https \ 11SRC_URI = "git://github.com/libvmi/libvmi.git;branch=master;protocol=https \
12 file://0001-Build-vbd-only-when-xen-is-enabled.patch \
12" 13"
13 14
14SRCREV = "41600b602815a9c42620cd5a96c5b88739fc6d9b" 15SRCREV = "41600b602815a9c42620cd5a96c5b88739fc6d9b"