diff options
| -rw-r--r-- | recipes-extended/libvmi/files/0001-Build-vbd-only-when-xen-is-enabled.patch | 76 | ||||
| -rw-r--r-- | recipes-extended/libvmi/libvmi_git.bb | 1 |
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 @@ | |||
| 1 | From fb7a1493c7d4a30ae930d8cb7dcb84c83c0cacce Mon Sep 17 00:00:00 2001 | ||
| 2 | From: He Zhe <zhe.he@windriver.com> | ||
| 3 | Date: Wed, 13 Apr 2022 09:26:01 +0000 | ||
| 4 | Subject: [PATCH] Build vbd only when xen is enabled | ||
| 5 | |||
| 6 | vbd was added for xen based VMs since | ||
| 7 | bdee00fac9b4 ("Disk reading interface for Xen based VMs and example") | ||
| 8 | and should be built only when xen is enabled, otherwise there would not be | ||
| 9 | necessary xen headers and cause the following failure. | ||
| 10 | |||
| 11 | xen_private.h:38:10: fatal error: xenctrl.h: No such file or directory | ||
| 12 | |||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | Signed-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 | |||
| 21 | diff --git a/Makefile.am b/Makefile.am | ||
| 22 | index 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 | ||
| 54 | diff --git a/libvmi/CMakeLists.txt b/libvmi/CMakeLists.txt | ||
| 55 | index 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 | -- | ||
| 75 | 2.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}" | |||
| 9 | DEPENDS = "libvirt libcheck bison fuse byacc-native" | 9 | DEPENDS = "libvirt libcheck bison fuse byacc-native" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://github.com/libvmi/libvmi.git;branch=master;protocol=https \ | 11 | SRC_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 | ||
| 14 | SRCREV = "41600b602815a9c42620cd5a96c5b88739fc6d9b" | 15 | SRCREV = "41600b602815a9c42620cd5a96c5b88739fc6d9b" |
