summaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-qemu
diff options
context:
space:
mode:
Diffstat (limited to 'meta-egvirt/recipes-qemu')
-rw-r--r--meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices.bb48
-rw-r--r--meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices/0001-Add-NULL-array-terminate-entry-for-arg-parsing-optio.patch23
2 files changed, 71 insertions, 0 deletions
diff --git a/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices.bb b/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices.bb
new file mode 100644
index 00000000..2e7eeef5
--- /dev/null
+++ b/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices.bb
@@ -0,0 +1,48 @@
+BBCLASSEXTEND = ""
+SUMMARY = "Fast open source processor emulator"
+DESCRIPTION = "Recipe for vhost-user-rng -blk and -input"
+HOMEPAGE = "http://qemu.org"
+LICENSE = "GPL-2.0-only & LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
+
+inherit pkgconfig
+
+DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native"
+SRC_URI = "git://git.virtualopensystems.com/virtio-loopback/qemu.git;protocol=https;branch=beta-release \
+ file://0001-Add-NULL-array-terminate-entry-for-arg-parsing-optio.patch \
+ "
+SRCREV = "bf75006d5415b4e485f0bc30b8d7461b3616e9ca"
+S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
+
+# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
+# upstream states qemu doesn't work without optimization
+DEBUG_BUILD = "0"
+
+export LIBTOOL="${HOST_SYS}-libtool"
+
+B = "${WORKDIR}/build"
+
+do_configure() {
+ unset bindir libdir mandir datadir includedir libexecdir
+ # Pass empty --cross-prefix to suspend errors due to build configurations
+ # on different architectures. CC/CXX and other build variables are set by Yocto
+ # itself correct.
+ ${S}/configure --cross-prefix=
+}
+do_configure[cleandirs] += "${B}"
+
+do_install() {
+ mkdir ${D}/usr/bin/ -p
+ install -m 0755 ${S}/../build/contrib/vhost-user-input/vhost-user-input ${D}/usr/bin/
+ install -m 0755 ${S}/../build/contrib/vhost-user-blk/vhost-user-blk ${D}/usr/bin/
+ install -m 0755 ${S}/../build/tools/vhost-user-rng/vhost-user-rng ${D}/usr/bin/
+}
+
+FILES:${PN} += "/usr/bin"
+RDEPENDS:${PN}:class-target += "bash"
+
+DISABLE_STATIC = ""
+
diff --git a/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices/0001-Add-NULL-array-terminate-entry-for-arg-parsing-optio.patch b/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices/0001-Add-NULL-array-terminate-entry-for-arg-parsing-optio.patch
new file mode 100644
index 00000000..a7af1b68
--- /dev/null
+++ b/meta-egvirt/recipes-qemu/qemu-vhost-user-devices/qemu-vhost-user-devices/0001-Add-NULL-array-terminate-entry-for-arg-parsing-optio.patch
@@ -0,0 +1,23 @@
+From 729065c67520aed4ded15092fd394e2841dc2e0c Mon Sep 17 00:00:00 2001
+From: Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com>
+Date: Thu, 1 Dec 2022 22:07:07 +0100
+Subject: [PATCH] Add NULL array-terminate entry for arg-parsing options
+
+---
+ contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
+index 725583ec4d..f8833e52d1 100644
+--- a/contrib/vhost-user-blk/vhost-user-blk.c
++++ b/contrib/vhost-user-blk/vhost-user-blk.c
+@@ -627,7 +627,8 @@ static GOptionEntry entries[] = {
+ {"blk-file", 'b', 0, G_OPTION_ARG_FILENAME, &opt_blk_file,
+ "block device or file path", "PATH"},
+ { "read-only", 'r', 0, G_OPTION_ARG_NONE, &opt_read_only,
+- "Enable read-only", NULL }
++ "Enable read-only", NULL },
++ { NULL },
+ };
+
+ int main(int argc, char **argv)