summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulators/qemu-riscv/CVS/Entries (renamed from emulators/qemu/CVS/Entries)0
-rw-r--r--emulators/qemu-riscv/CVS/Repository (renamed from emulators/qemu/CVS/Repository)0
-rw-r--r--emulators/qemu-riscv/CVS/Root (renamed from emulators/qemu/CVS/Root)0
-rw-r--r--emulators/qemu-riscv/CVS/Tag (renamed from emulators/qemu/CVS/Tag)0
-rw-r--r--emulators/qemu-riscv/Makefile130
-rw-r--r--emulators/qemu-riscv/distinfo2
-rw-r--r--emulators/qemu-riscv/files/CVS/Entries (renamed from emulators/qemu/files/CVS/Entries)0
-rw-r--r--emulators/qemu-riscv/files/CVS/Repository (renamed from emulators/qemu/files/CVS/Repository)0
-rw-r--r--emulators/qemu-riscv/files/CVS/Root (renamed from emulators/qemu/files/CVS/Root)0
-rw-r--r--emulators/qemu-riscv/files/CVS/Tag (renamed from emulators/qemu/files/CVS/Tag)0
-rw-r--r--emulators/qemu-riscv/files/qemu-ga.conf (renamed from emulators/qemu/files/qemu-ga.conf)0
-rw-r--r--emulators/qemu-riscv/files/qemu-ifdown (renamed from emulators/qemu/files/qemu-ifdown)0
-rw-r--r--emulators/qemu-riscv/files/qemu-ifup (renamed from emulators/qemu/files/qemu-ifup)0
-rw-r--r--emulators/qemu-riscv/pkg/CVS/Entries (renamed from emulators/qemu/pkg/CVS/Entries)0
-rw-r--r--emulators/qemu-riscv/pkg/CVS/Repository (renamed from emulators/qemu/pkg/CVS/Repository)0
-rw-r--r--emulators/qemu-riscv/pkg/CVS/Root (renamed from emulators/qemu/patches/CVS/Root)0
-rw-r--r--emulators/qemu-riscv/pkg/CVS/Tag (renamed from emulators/qemu/patches/CVS/Tag)0
-rw-r--r--emulators/qemu-riscv/pkg/DESCR (renamed from emulators/qemu/pkg/DESCR-main)2
-rw-r--r--emulators/qemu-riscv/pkg/PLIST97
-rw-r--r--emulators/qemu-riscv/pkg/README (renamed from emulators/qemu/pkg/README-main)0
-rw-r--r--emulators/qemu/Makefile139
-rw-r--r--emulators/qemu/distinfo2
-rw-r--r--emulators/qemu/patches/CVS/Entries10
-rw-r--r--emulators/qemu/patches/CVS/Repository1
-rw-r--r--emulators/qemu/patches/patch-audio_audio_c13
-rw-r--r--emulators/qemu/patches/patch-audio_audio_template_h14
-rw-r--r--emulators/qemu/patches/patch-audio_meson_build13
-rw-r--r--emulators/qemu/patches/patch-audio_sndioaudio_c572
-rw-r--r--emulators/qemu/patches/patch-configure97
-rw-r--r--emulators/qemu/patches/patch-meson_build56
-rw-r--r--emulators/qemu/patches/patch-meson_mesonbuild_compilers_cpp_py21
-rw-r--r--emulators/qemu/patches/patch-meson_options_txt23
-rw-r--r--emulators/qemu/patches/patch-plugins_meson_build26
-rw-r--r--emulators/qemu/patches/patch-qapi_audio_json50
-rw-r--r--emulators/qemu/patches/patch-qemu-options_hx35
-rw-r--r--emulators/qemu/patches/patch-qga_commands-bsd_c16
-rw-r--r--emulators/qemu/patches/patch-qga_commands-posix_c576
-rw-r--r--emulators/qemu/patches/patch-qga_main_c37
-rw-r--r--emulators/qemu/patches/patch-util_cacheflush_c19
-rw-r--r--emulators/qemu/patches/patch-util_qemu-thread-posix_c35
-rw-r--r--emulators/qemu/pkg/CVS/Root1
-rw-r--r--emulators/qemu/pkg/CVS/Tag1
-rw-r--r--emulators/qemu/pkg/DESCR-ga3
-rw-r--r--emulators/qemu/pkg/PFRAG.plugins-main1
-rw-r--r--emulators/qemu/pkg/PLIST-ga14
-rw-r--r--emulators/qemu/pkg/PLIST-main465
-rw-r--r--emulators/qemu/pkg/README-ga25
-rw-r--r--emulators/qemu/pkg/qemu_ga.rc14
48 files changed, 231 insertions, 2279 deletions
diff --git a/emulators/qemu/CVS/Entries b/emulators/qemu-riscv/CVS/Entries
index e40f1c4..e40f1c4 100644
--- a/emulators/qemu/CVS/Entries
+++ b/emulators/qemu-riscv/CVS/Entries
diff --git a/emulators/qemu/CVS/Repository b/emulators/qemu-riscv/CVS/Repository
index 452518b..452518b 100644
--- a/emulators/qemu/CVS/Repository
+++ b/emulators/qemu-riscv/CVS/Repository
diff --git a/emulators/qemu/CVS/Root b/emulators/qemu-riscv/CVS/Root
index 3811072..3811072 100644
--- a/emulators/qemu/CVS/Root
+++ b/emulators/qemu-riscv/CVS/Root
diff --git a/emulators/qemu/CVS/Tag b/emulators/qemu-riscv/CVS/Tag
index b1c2a73..b1c2a73 100644
--- a/emulators/qemu/CVS/Tag
+++ b/emulators/qemu-riscv/CVS/Tag
diff --git a/emulators/qemu-riscv/Makefile b/emulators/qemu-riscv/Makefile
new file mode 100644
index 0000000..b47052b
--- /dev/null
+++ b/emulators/qemu-riscv/Makefile
@@ -0,0 +1,130 @@
1DPB_PROPERTIES= parallel
2
3COMMENT= multi system emulator
4
5VERSION= 2.12.1
6PKGNAME= qemu-riscv-${VERSION}
7DISTNAME= qemu-${VERSION}
8REVISION= 0
9CATEGORIES= emulators
10MASTER_SITES= https://download.qemu.org/
11EXTRACT_SUFX= .tar.xz
12
13HOMEPAGE= https://www.qemu.org/
14
15MAINTAINER= Brad Smith <brad@comstyle.com>
16
17# GPLv2, LGPLv2 and BSD
18PERMIT_PACKAGE= Yes
19
20WANTLIB= c pthread fdt m util
21
22DEBUG_PACKAGES= ${BUILD_PACKAGES}
23
24# Using TLS emulation layer
25COMPILER= base-clang ports-gcc
26
27LIB_DEPENDS= devel/dtc
28
29MAKE_ENV= V=1
30FAKE_FLAGS= qemu_confdir=${PREFIX}/share/examples/qemu
31
32CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
33LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
34
35# until the system headers are fixed properly.
36CFLAGS+= -Wno-redundant-decls
37
38MODULES= lang/python
39MODPY_RUN_DEPENDS= No
40
41SEPARATE_BUILD= Yes
42USE_GMAKE= Yes
43CONFIGURE_STYLE=simple
44CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
45CONFIGURE_ARGS= --localstatedir=${LOCALSTATEDIR} \
46 --prefix=${PREFIX} \
47 --sysconfdir=${SYSCONFDIR} \
48 --mandir=${PREFIX}/man \
49 --cc="${CC}" \
50 --cxx=/dev/null \
51 --host-cc="${CC}" \
52 --target-list=riscv32-softmmu,riscv64-softmmu \
53 --audio-drv-list= \
54 --disable-user \
55 --disable-linux-user \
56 --disable-bsd-user \
57 --disable-docs \
58 --disable-guest-agent \
59 --disable-modules \
60 --disable-gnutls \
61 --disable-nettle \
62 --disable-gcrypt \
63 --disable-sdl \
64 --disable-gtk \
65 --disable-vte \
66 --disable-vnc \
67 --disable-virtfs \
68 --disable-mpath \
69 --disable-xen \
70 --disable-brlapi \
71 --disable-curl \
72 --disable-bluez \
73 --disable-rdma \
74 --disable-vde \
75 --disable-netmap \
76 --disable-cap-ng \
77 --disable-attr \
78 --disable-vhost-net \
79 --disable-vhost-crypto \
80 --disable-spice \
81 --disable-rbd \
82 --disable-libiscsi \
83 --disable-libnfs \
84 --disable-smartcard \
85 --disable-libusb \
86 --disable-live-block-migration \
87 --disable-usb-redir \
88 --disable-lzo \
89 --disable-snappy \
90 --disable-bzip2 \
91 --disable-glusterfs \
92 --disable-tpm \
93 --disable-libssh2 \
94 --disable-numa \
95 --disable-libxml2 \
96 --disable-replication \
97 --disable-vhost-vsock \
98 --disable-opengl \
99 --disable-virglrenderer \
100 --disable-xfsctl \
101 --disable-qom-cast-debug \
102 --disable-vxhs \
103 --disable-crypto-afalg \
104 --disable-vhost-user \
105 --disable-capstone
106
107FLAVORS= debug
108FLAVOR?=
109
110.if ${FLAVOR:Mdebug}
111CFLAGS+= -O0
112CONFIGURE_ARGS+=--enable-debug
113INSTALL_STRIP=
114.else
115CONFIGURE_ARGS+=--disable-debug-info
116.endif
117
118TEST_TARGET= check
119
120# XXX Optimizer bug, using -O2 causes segfaults, -O1 linking errors
121.if ${MACHINE_ARCH:Mpowerpc}
122CFLAGS+= -O0
123.endif
124
125.include <bsd.port.arch.mk>
126
127post-install:
128 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/qemu
129
130.include <bsd.port.mk>
diff --git a/emulators/qemu-riscv/distinfo b/emulators/qemu-riscv/distinfo
new file mode 100644
index 0000000..828a566
--- /dev/null
+++ b/emulators/qemu-riscv/distinfo
@@ -0,0 +1,2 @@
1SHA256 (qemu-2.12.1.tar.xz) = M1g4AOAAbNALeCJrhb5aJ8jjsVa+0uYOg+y+t7m4Nk8=
2SIZE (qemu-2.12.1.tar.xz) = 35416404
diff --git a/emulators/qemu/files/CVS/Entries b/emulators/qemu-riscv/files/CVS/Entries
index 8a3bf7a..8a3bf7a 100644
--- a/emulators/qemu/files/CVS/Entries
+++ b/emulators/qemu-riscv/files/CVS/Entries
diff --git a/emulators/qemu/files/CVS/Repository b/emulators/qemu-riscv/files/CVS/Repository
index a9a1732..a9a1732 100644
--- a/emulators/qemu/files/CVS/Repository
+++ b/emulators/qemu-riscv/files/CVS/Repository
diff --git a/emulators/qemu/files/CVS/Root b/emulators/qemu-riscv/files/CVS/Root
index 3811072..3811072 100644
--- a/emulators/qemu/files/CVS/Root
+++ b/emulators/qemu-riscv/files/CVS/Root
diff --git a/emulators/qemu/files/CVS/Tag b/emulators/qemu-riscv/files/CVS/Tag
index b1c2a73..b1c2a73 100644
--- a/emulators/qemu/files/CVS/Tag
+++ b/emulators/qemu-riscv/files/CVS/Tag
diff --git a/emulators/qemu/files/qemu-ga.conf b/emulators/qemu-riscv/files/qemu-ga.conf
index 184885a..184885a 100644
--- a/emulators/qemu/files/qemu-ga.conf
+++ b/emulators/qemu-riscv/files/qemu-ga.conf
diff --git a/emulators/qemu/files/qemu-ifdown b/emulators/qemu-riscv/files/qemu-ifdown
index fbd5789..fbd5789 100644
--- a/emulators/qemu/files/qemu-ifdown
+++ b/emulators/qemu-riscv/files/qemu-ifdown
diff --git a/emulators/qemu/files/qemu-ifup b/emulators/qemu-riscv/files/qemu-ifup
index 1207696..1207696 100644
--- a/emulators/qemu/files/qemu-ifup
+++ b/emulators/qemu-riscv/files/qemu-ifup
diff --git a/emulators/qemu/pkg/CVS/Entries b/emulators/qemu-riscv/pkg/CVS/Entries
index d41c45d..d41c45d 100644
--- a/emulators/qemu/pkg/CVS/Entries
+++ b/emulators/qemu-riscv/pkg/CVS/Entries
diff --git a/emulators/qemu/pkg/CVS/Repository b/emulators/qemu-riscv/pkg/CVS/Repository
index 64f210f..64f210f 100644
--- a/emulators/qemu/pkg/CVS/Repository
+++ b/emulators/qemu-riscv/pkg/CVS/Repository
diff --git a/emulators/qemu/patches/CVS/Root b/emulators/qemu-riscv/pkg/CVS/Root
index 3811072..3811072 100644
--- a/emulators/qemu/patches/CVS/Root
+++ b/emulators/qemu-riscv/pkg/CVS/Root
diff --git a/emulators/qemu/patches/CVS/Tag b/emulators/qemu-riscv/pkg/CVS/Tag
index b1c2a73..b1c2a73 100644
--- a/emulators/qemu/patches/CVS/Tag
+++ b/emulators/qemu-riscv/pkg/CVS/Tag
diff --git a/emulators/qemu/pkg/DESCR-main b/emulators/qemu-riscv/pkg/DESCR
index 73ae431..b0e0aad 100644
--- a/emulators/qemu/pkg/DESCR-main
+++ b/emulators/qemu-riscv/pkg/DESCR
@@ -2,3 +2,5 @@ QEMU is an open source machine emulator. It can run OSes and programs
2made for one machine (e.g. an ARM board) on a different machine (e.g. 2made for one machine (e.g. an ARM board) on a different machine (e.g.
3your own PC). By using dynamic translation, it achieves very good 3your own PC). By using dynamic translation, it achieves very good
4performance. 4performance.
5
6This is a minimal build for only the RISC-V 32bit and 64bit targets.
diff --git a/emulators/qemu-riscv/pkg/PLIST b/emulators/qemu-riscv/pkg/PLIST
new file mode 100644
index 0000000..6b66e86
--- /dev/null
+++ b/emulators/qemu-riscv/pkg/PLIST
@@ -0,0 +1,97 @@
1@bin bin/qemu-img
2@bin bin/qemu-io
3@bin bin/qemu-keymap
4@bin bin/qemu-nbd
5@bin bin/qemu-system-riscv32
6@bin bin/qemu-system-riscv64
7share/doc/pkg-readmes/${PKGSTEM}
8share/examples/qemu/
9share/qemu/
10share/qemu/QEMU,cgthree.bin
11share/qemu/QEMU,tcx.bin
12share/qemu/bamboo.dtb
13share/qemu/bios-256k.bin
14share/qemu/bios.bin
15share/qemu/canyonlands.dtb
16share/qemu/efi-e1000.rom
17share/qemu/efi-e1000e.rom
18share/qemu/efi-eepro100.rom
19share/qemu/efi-ne2k_pci.rom
20share/qemu/efi-pcnet.rom
21share/qemu/efi-rtl8139.rom
22share/qemu/efi-virtio.rom
23share/qemu/efi-vmxnet3.rom
24share/qemu/hppa-firmware.img
25share/qemu/keymaps/
26share/qemu/keymaps/ar
27share/qemu/keymaps/bepo
28share/qemu/keymaps/common
29share/qemu/keymaps/cz
30share/qemu/keymaps/da
31share/qemu/keymaps/de
32share/qemu/keymaps/de-ch
33share/qemu/keymaps/en-gb
34share/qemu/keymaps/en-us
35share/qemu/keymaps/es
36share/qemu/keymaps/et
37share/qemu/keymaps/fi
38share/qemu/keymaps/fo
39share/qemu/keymaps/fr
40share/qemu/keymaps/fr-be
41share/qemu/keymaps/fr-ca
42share/qemu/keymaps/fr-ch
43share/qemu/keymaps/hr
44share/qemu/keymaps/hu
45share/qemu/keymaps/is
46share/qemu/keymaps/it
47share/qemu/keymaps/ja
48share/qemu/keymaps/lt
49share/qemu/keymaps/lv
50share/qemu/keymaps/mk
51share/qemu/keymaps/modifiers
52share/qemu/keymaps/nl
53share/qemu/keymaps/nl-be
54share/qemu/keymaps/no
55share/qemu/keymaps/pl
56share/qemu/keymaps/pt
57share/qemu/keymaps/pt-br
58share/qemu/keymaps/ru
59share/qemu/keymaps/sl
60share/qemu/keymaps/sv
61share/qemu/keymaps/th
62share/qemu/keymaps/tr
63share/qemu/kvmvapic.bin
64share/qemu/linuxboot.bin
65share/qemu/linuxboot_dma.bin
66share/qemu/multiboot.bin
67share/qemu/openbios-ppc
68share/qemu/openbios-sparc32
69share/qemu/openbios-sparc64
70share/qemu/palcode-clipper
71share/qemu/petalogix-ml605.dtb
72share/qemu/petalogix-s3adsp1800.dtb
73share/qemu/ppc_rom.bin
74share/qemu/pxe-e1000.rom
75share/qemu/pxe-eepro100.rom
76share/qemu/pxe-ne2k_pci.rom
77share/qemu/pxe-pcnet.rom
78share/qemu/pxe-rtl8139.rom
79share/qemu/pxe-virtio.rom
80share/qemu/qemu-icon.bmp
81share/qemu/qemu_logo_no_text.svg
82share/qemu/qemu_vga.ndrv
83share/qemu/s390-ccw.img
84share/qemu/s390-netboot.img
85share/qemu/sgabios.bin
86share/qemu/skiboot.lid
87share/qemu/slof.bin
88share/qemu/spapr-rtas.bin
89share/qemu/trace-events-all
90share/qemu/u-boot-sam460-20100605.bin
91share/qemu/u-boot.e500
92share/qemu/vgabios-cirrus.bin
93share/qemu/vgabios-qxl.bin
94share/qemu/vgabios-stdvga.bin
95share/qemu/vgabios-virtio.bin
96share/qemu/vgabios-vmware.bin
97share/qemu/vgabios.bin
diff --git a/emulators/qemu/pkg/README-main b/emulators/qemu-riscv/pkg/README
index 09221d2..09221d2 100644
--- a/emulators/qemu/pkg/README-main
+++ b/emulators/qemu-riscv/pkg/README
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
deleted file mode 100644
index 3775eb6..0000000
--- a/emulators/qemu/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
1ONLY_FOR_ARCHS= aarch64 amd64 arm i386 powerpc powerpc64 riscv64 sparc64
2DPB_PROPERTIES= parallel
3
4COMMENT-main= multi system emulator
5COMMENT-ga= QEMU guest agent
6
7VERSION= 7.2.0
8DISTNAME= qemu-${VERSION}
9REVISION-ga= 0
10REVISION-main= 1
11CATEGORIES= emulators
12MASTER_SITES= https://download.qemu.org/
13EXTRACT_SUFX= .tar.xz
14
15HOMEPAGE= https://www.qemu.org/
16
17MAINTAINER= Brad Smith <brad@comstyle.com>
18
19# GPLv2, LGPLv2 and BSD
20PERMIT_PACKAGE= Yes
21
22WANTLIB= c glib-2.0 pthread
23WANTLIB-main= ${COMPILER_LIBCXX} ${WANTLIB} SDL2 X11 bz2 cairo capstone curl \
24 curses epoxy fdt gbm gdk-3 gdk_pixbuf-2.0 gio-2.0 gnutls \
25 gobject-2.0 gtk-3 iconv intl iscsi jpeg lzo2 m nfs pixman-1 \
26 png slirp sndio ssh usb-1.0 util vte-2.91 xkbcommon z zstd
27WANTLIB-ga= ${WANTLIB}
28
29MULTI_PACKAGES= -main -ga
30DEBUG_PACKAGES= ${BUILD_PACKAGES}
31
32# Using TLS emulation layer
33COMPILER= base-clang ports-gcc
34
35MODULES= lang/python
36MODPY_RUNDEP= No
37
38BUILD_DEPENDS= devel/gettext,-tools \
39 devel/ninja \
40 shells/bash \
41 textproc/py-sphinx${MODPY_FLAVOR}>=4.0.2 \
42 textproc/py-sphinx_rtd_theme${MODPY_FLAVOR}
43
44RUN_DEPENDS-main= ${BUILD_PKGPATH}-ga
45LIB_DEPENDS= devel/glib2
46LIB_DEPENDS-main= ${LIB_DEPENDS} \
47 archivers/bzip2 \
48 archivers/lzo2 \
49 archivers/zstd \
50 converters/libiconv \
51 devel/capstone/main \
52 devel/dtc \
53 devel/gettext,-runtime \
54 devel/libiscsi \
55 devel/libnfs \
56 devel/libusb1 \
57 devel/sdl2 \
58 devel/vte3 \
59 graphics/jpeg \
60 graphics/png \
61 net/curl \
62 net/libslirp \
63 security/gnutls \
64 security/libssh \
65 x11/gtk+3 \
66 x11/xkbcommon
67LIB_DEPENDS-ga= ${LIB_DEPENDS}
68
69MAKE_ENV= V=1
70FAKE_FLAGS= qemu_confdir=${PREFIX}/share/examples/qemu
71
72CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
73LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
74
75# until the system headers are fixed properly.
76CFLAGS+= -Wno-redundant-decls
77
78SEPARATE_BUILD= Yes
79USE_GMAKE= Yes
80CONFIGURE_STYLE=simple
81CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
82CONFIGURE_ARGS= --localstatedir=${LOCALSTATEDIR} \
83 --prefix=${PREFIX} \
84 --sysconfdir=${SYSCONFDIR} \
85 --mandir=${PREFIX}/man \
86 --python=${MODPY_BIN} \
87 --smbd=${LOCALBASE}/sbin/smbd \
88 --cc="${CC}" \
89 --cxx="${CXX}" \
90 --host-cc="${CC}" \
91 --enable-capstone \
92 --disable-auth-pam \
93 --disable-bsd-user \
94 --disable-jack \
95 --disable-sdl-image \
96 --disable-smartcard \
97 --disable-snappy \
98 --disable-spice \
99 --disable-usb-redir \
100 --disable-vnc-sasl
101
102FLAVORS= debug
103FLAVOR?=
104
105.if ${FLAVOR:Mdebug}
106CFLAGS+= -O0
107CONFIGURE_ARGS+=--enable-debug
108INSTALL_STRIP=
109.else
110CONFIGURE_ARGS+=--disable-debug-info
111.endif
112
113TEST_TARGET= check
114
115# XXX Optimizer bug, using -O2 causes segfaults, -O1 linking errors
116.if ${MACHINE_ARCH:Mpowerpc}
117CFLAGS+= -O0
118.endif
119
120.include <bsd.port.arch.mk>
121
122# Only lld has --dynamic-list
123.if ${PROPERTIES:Mlld}
124WANTLIB-main+= gmodule-2.0
125PKG_ARGS+= -Dplugins=1
126.else
127PKG_ARGS+= -Dplugins=0
128.endif
129
130post-install:
131 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/qemu
132 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup \
133 ${PREFIX}/share/examples/qemu
134 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown \
135 ${PREFIX}/share/examples/qemu
136 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ga.conf \
137 ${PREFIX}/share/examples/qemu
138
139.include <bsd.port.mk>
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
deleted file mode 100644
index 2af259a..0000000
--- a/emulators/qemu/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
1SHA256 (qemu-7.2.0.tar.xz) = W0nOJod0Ta1JSukKiYxSIEo0BuhNBySCoeG+hU7rIVc=
2SIZE (qemu-7.2.0.tar.xz) = 122408576
diff --git a/emulators/qemu/patches/CVS/Entries b/emulators/qemu/patches/CVS/Entries
deleted file mode 100644
index f5fb771..0000000
--- a/emulators/qemu/patches/CVS/Entries
+++ /dev/null
@@ -1,10 +0,0 @@
1/patch-configure/1.75/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
2/patch-meson_build/1.9/Mon Jan 9 14:26:00 2023//TOPENBSD_7_3
3/patch-meson_mesonbuild_compilers_cpp_py/1.4/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
4/patch-plugins_meson_build/1.3/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
5/patch-qga_commands-bsd_c/1.1/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
6/patch-qga_commands-posix_c/1.7/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
7/patch-qga_main_c/1.6/Wed Jan 4 21:33:42 2023//TOPENBSD_7_3
8/patch-util_cacheflush_c/1.1/Tue Sep 13 20:11:35 2022//TOPENBSD_7_3
9/patch-util_qemu-thread-posix_c/1.1/Mon Jan 9 14:26:00 2023//TOPENBSD_7_3
10D
diff --git a/emulators/qemu/patches/CVS/Repository b/emulators/qemu/patches/CVS/Repository
deleted file mode 100644
index ddd2435..0000000
--- a/emulators/qemu/patches/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
1ports/emulators/qemu/patches
diff --git a/emulators/qemu/patches/patch-audio_audio_c b/emulators/qemu/patches/patch-audio_audio_c
deleted file mode 100644
index 9d89265..0000000
--- a/emulators/qemu/patches/patch-audio_audio_c
+++ /dev/null
@@ -1,13 +0,0 @@
1sndio module
2
3Index: audio/audio.c
4--- audio/audio.c.orig
5+++ audio/audio.c
6@@ -2025,6 +2025,7 @@ void audio_create_pdos(Audiodev *dev)
7 CASE(OSS, oss, Oss);
8 CASE(PA, pa, Pa);
9 CASE(SDL, sdl, Sdl);
10+ CASE(SNDIO, sndio, );
11 CASE(SPICE, spice, );
12 CASE(WAV, wav, );
13
diff --git a/emulators/qemu/patches/patch-audio_audio_template_h b/emulators/qemu/patches/patch-audio_audio_template_h
deleted file mode 100644
index 97fd008..0000000
--- a/emulators/qemu/patches/patch-audio_audio_template_h
+++ /dev/null
@@ -1,14 +0,0 @@
1sndio module
2
3Index: audio/audio_template.h
4--- audio/audio_template.h.orig
5+++ audio/audio_template.h
6@@ -336,6 +336,8 @@ AudiodevPerDirectionOptions *glue(audio_get_pdo_, TYPE
7 return qapi_AudiodevPaPerDirectionOptions_base(dev->u.pa.TYPE);
8 case AUDIODEV_DRIVER_SDL:
9 return qapi_AudiodevSdlPerDirectionOptions_base(dev->u.sdl.TYPE);
10+ case AUDIODEV_DRIVER_SNDIO:
11+ return dev->u.sndio.TYPE;
12 case AUDIODEV_DRIVER_SPICE:
13 return dev->u.spice.TYPE;
14 case AUDIODEV_DRIVER_WAV:
diff --git a/emulators/qemu/patches/patch-audio_meson_build b/emulators/qemu/patches/patch-audio_meson_build
deleted file mode 100644
index 842fcf8..0000000
--- a/emulators/qemu/patches/patch-audio_meson_build
+++ /dev/null
@@ -1,13 +0,0 @@
1sndio module
2
3Index: audio/meson.build
4--- audio/meson.build.orig
5+++ audio/meson.build
6@@ -17,6 +17,7 @@ foreach m : [
7 ['pa', pulse, files('paaudio.c')],
8 ['sdl', sdl, files('sdlaudio.c')],
9 ['jack', jack, files('jackaudio.c')],
10+ ['sndio', sndio, files('sndioaudio.c')],
11 ['spice', spice, files('spiceaudio.c')]
12 ]
13 if m[1].found()
diff --git a/emulators/qemu/patches/patch-audio_sndioaudio_c b/emulators/qemu/patches/patch-audio_sndioaudio_c
deleted file mode 100644
index 68b4c2e..0000000
--- a/emulators/qemu/patches/patch-audio_sndioaudio_c
+++ /dev/null
@@ -1,572 +0,0 @@
1sndio module
2
3Index: audio/sndioaudio.c
4--- audio/sndioaudio.c.orig
5+++ audio/sndioaudio.c
6@@ -0,0 +1,566 @@
7+/*
8+ * SPDX-License-Identifier: ISC
9+ *
10+ * Copyright (c) 2019 Alexandre Ratchov <alex@caoua.org>
11+ */
12+
13+/*
14+ * TODO :
15+ *
16+ * Use a single device and open it in full-duplex rather than
17+ * opening it twice (once for playback once for recording).
18+ *
19+ * This is the only way to ensure that playback doesn't drift with respect
20+ * to recording, which is what guest systems expect.
21+ */
22+
23+#include <poll.h>
24+#include <sndio.h>
25+#include "qemu/osdep.h"
26+#include "qemu/help-texts.h"
27+#include "qemu/main-loop.h"
28+#include "audio.h"
29+#include "trace.h"
30+
31+#define AUDIO_CAP "sndio"
32+#include "audio_int.h"
33+
34+/* default latency in microseconds if no option is set */
35+#define SNDIO_LATENCY_US 50000
36+
37+typedef struct SndioVoice {
38+ union {
39+ HWVoiceOut out;
40+ HWVoiceIn in;
41+ } hw;
42+ struct sio_par par;
43+ struct sio_hdl *hdl;
44+ struct pollfd *pfds;
45+ struct pollindex {
46+ struct SndioVoice *self;
47+ int index;
48+ } *pindexes;
49+ unsigned char *buf;
50+ size_t buf_size;
51+ size_t sndio_pos;
52+ size_t qemu_pos;
53+ unsigned int mode;
54+ unsigned int nfds;
55+ bool enabled;
56+} SndioVoice;
57+
58+typedef struct SndioConf {
59+ const char *devname;
60+ unsigned int latency;
61+} SndioConf;
62+
63+/* needed for forward reference */
64+static void sndio_poll_in(void *arg);
65+static void sndio_poll_out(void *arg);
66+
67+/*
68+ * stop polling descriptors
69+ */
70+static void sndio_poll_clear(SndioVoice *self)
71+{
72+ struct pollfd *pfd;
73+ int i;
74+
75+ for (i = 0; i < self->nfds; i++) {
76+ pfd = &self->pfds[i];
77+ qemu_set_fd_handler(pfd->fd, NULL, NULL, NULL);
78+ }
79+
80+ self->nfds = 0;
81+}
82+
83+/*
84+ * write data to the device until it blocks or
85+ * all of our buffered data is written
86+ */
87+static void sndio_write(SndioVoice *self)
88+{
89+ size_t todo, n;
90+
91+ todo = self->qemu_pos - self->sndio_pos;
92+
93+ /*
94+ * transfer data to device, until it blocks
95+ */
96+ while (todo > 0) {
97+ n = sio_write(self->hdl, self->buf + self->sndio_pos, todo);
98+ if (n == 0) {
99+ break;
100+ }
101+ self->sndio_pos += n;
102+ todo -= n;
103+ }
104+
105+ if (self->sndio_pos == self->buf_size) {
106+ /*
107+ * we complete the block
108+ */
109+ self->sndio_pos = 0;
110+ self->qemu_pos = 0;
111+ }
112+}
113+
114+/*
115+ * read data from the device until it blocks or
116+ * there no room any longer
117+ */
118+static void sndio_read(SndioVoice *self)
119+{
120+ size_t todo, n;
121+
122+ todo = self->buf_size - self->sndio_pos;
123+
124+ /*
125+ * transfer data from the device, until it blocks
126+ */
127+ while (todo > 0) {
128+ n = sio_read(self->hdl, self->buf + self->sndio_pos, todo);
129+ if (n == 0) {
130+ break;
131+ }
132+ self->sndio_pos += n;
133+ todo -= n;
134+ }
135+}
136+
137+/*
138+ * Set handlers for all descriptors libsndio needs to
139+ * poll
140+ */
141+static void sndio_poll_wait(SndioVoice *self)
142+{
143+ struct pollfd *pfd;
144+ int events, i;
145+
146+ events = 0;
147+ if (self->mode == SIO_PLAY) {
148+ if (self->sndio_pos < self->qemu_pos) {
149+ events |= POLLOUT;
150+ }
151+ } else {
152+ if (self->sndio_pos < self->buf_size) {
153+ events |= POLLIN;
154+ }
155+ }
156+
157+ /*
158+ * fill the given array of descriptors with the events sndio
159+ * wants, they are different from our 'event' variable because
160+ * sndio may use descriptors internally.
161+ */
162+ self->nfds = sio_pollfd(self->hdl, self->pfds, events);
163+
164+ for (i = 0; i < self->nfds; i++) {
165+ pfd = &self->pfds[i];
166+ if (pfd->fd < 0) {
167+ continue;
168+ }
169+ qemu_set_fd_handler(pfd->fd,
170+ (pfd->events & POLLIN) ? sndio_poll_in : NULL,
171+ (pfd->events & POLLOUT) ? sndio_poll_out : NULL,
172+ &self->pindexes[i]);
173+ pfd->revents = 0;
174+ }
175+}
176+
177+/*
178+ * call-back called when one of the descriptors
179+ * became readable or writable
180+ */
181+static void sndio_poll_event(SndioVoice *self, int index, int event)
182+{
183+ int revents;
184+
185+ /*
186+ * ensure we're not called twice this cycle
187+ */
188+ sndio_poll_clear(self);
189+
190+ /*
191+ * make self->pfds[] look as we're returning from poll syscal,
192+ * this is how sio_revents expects events to be.
193+ */
194+ self->pfds[index].revents = event;
195+
196+ /*
197+ * tell sndio to handle events and return whether we can read or
198+ * write without blocking.
199+ */
200+ revents = sio_revents(self->hdl, self->pfds);
201+ if (self->mode == SIO_PLAY) {
202+ if (revents & POLLOUT) {
203+ sndio_write(self);
204+ }
205+
206+ if (self->qemu_pos < self->buf_size) {
207+ audio_run(self->hw.out.s, "sndio_out");
208+ }
209+ } else {
210+ if (revents & POLLIN) {
211+ sndio_read(self);
212+ }
213+
214+ if (self->qemu_pos < self->sndio_pos) {
215+ audio_run(self->hw.in.s, "sndio_in");
216+ }
217+ }
218+
219+ /*
220+ * audio_run() may have changed state
221+ */
222+ if (self->enabled) {
223+ sndio_poll_wait(self);
224+ }
225+}
226+
227+/*
228+ * return the upper limit of the amount of free play buffer space
229+ */
230+static size_t sndio_buffer_get_free(HWVoiceOut *hw)
231+{
232+ SndioVoice *self = (SndioVoice *) hw;
233+
234+ return self->buf_size - self->qemu_pos;
235+}
236+
237+/*
238+ * return a buffer where data to play can be stored,
239+ * its size is stored in the location pointed by the size argument.
240+ */
241+static void *sndio_get_buffer_out(HWVoiceOut *hw, size_t *size)
242+{
243+ SndioVoice *self = (SndioVoice *) hw;
244+
245+ *size = self->buf_size - self->qemu_pos;
246+ return self->buf + self->qemu_pos;
247+}
248+
249+/*
250+ * return a buffer where data to play can be stored
251+ */
252+static size_t sndio_put_buffer_out(HWVoiceOut *hw, void *buf, size_t size)
253+{
254+ SndioVoice *self = (SndioVoice *) hw;
255+
256+ self->qemu_pos += size;
257+ sndio_poll_wait(self);
258+ return size;
259+}
260+
261+/*
262+ * return a buffer from where recorded data is available,
263+ * its size is stored in the location pointed by the size argument.
264+ * it may not exceed the initial value of "*size".
265+ */
266+static void *sndio_get_buffer_in(HWVoiceIn *hw, size_t *size)
267+{
268+ SndioVoice *self = (SndioVoice *) hw;
269+ size_t todo, max_todo;
270+
271+ /*
272+ * unlike the get_buffer_out() method, get_buffer_in()
273+ * must return a buffer of at most the given size, see audio.c
274+ */
275+ max_todo = *size;
276+
277+ todo = self->sndio_pos - self->qemu_pos;
278+ if (todo > max_todo) {
279+ todo = max_todo;
280+ }
281+
282+ *size = todo;
283+ return self->buf + self->qemu_pos;
284+}
285+
286+/*
287+ * discard the given amount of recorded data
288+ */
289+static void sndio_put_buffer_in(HWVoiceIn *hw, void *buf, size_t size)
290+{
291+ SndioVoice *self = (SndioVoice *) hw;
292+
293+ self->qemu_pos += size;
294+ if (self->qemu_pos == self->buf_size) {
295+ self->qemu_pos = 0;
296+ self->sndio_pos = 0;
297+ }
298+ sndio_poll_wait(self);
299+}
300+
301+/*
302+ * call-back called when one of our descriptors becomes writable
303+ */
304+static void sndio_poll_out(void *arg)
305+{
306+ struct pollindex *pindex = (struct pollindex *) arg;
307+
308+ sndio_poll_event(pindex->self, pindex->index, POLLOUT);
309+}
310+
311+/*
312+ * call-back called when one of our descriptors becomes readable
313+ */
314+static void sndio_poll_in(void *arg)
315+{
316+ struct pollindex *pindex = (struct pollindex *) arg;
317+
318+ sndio_poll_event(pindex->self, pindex->index, POLLIN);
319+}
320+
321+static void sndio_fini(SndioVoice *self)
322+{
323+ if (self->hdl) {
324+ sio_close(self->hdl);
325+ self->hdl = NULL;
326+ }
327+
328+ g_free(self->pfds);
329+ g_free(self->pindexes);
330+ g_free(self->buf);
331+}
332+
333+static int sndio_init(SndioVoice *self,
334+ struct audsettings *as, int mode, Audiodev *dev)
335+{
336+ AudiodevSndioOptions *opts = &dev->u.sndio;
337+ unsigned long long latency;
338+ const char *dev_name;
339+ struct sio_par req;
340+ unsigned int nch;
341+ int i, nfds;
342+
343+ dev_name = opts->has_dev ? opts->dev : SIO_DEVANY;
344+ latency = opts->has_latency ? opts->latency : SNDIO_LATENCY_US;
345+
346+ /* open the device in non-blocking mode */
347+ self->hdl = sio_open(dev_name, mode, 1);
348+ if (self->hdl == NULL) {
349+ dolog("failed to open device\n");
350+ return -1;
351+ }
352+
353+ self->mode = mode;
354+
355+ sio_initpar(&req);
356+
357+ switch (as->fmt) {
358+ case AUDIO_FORMAT_S8:
359+ req.bits = 8;
360+ req.sig = 1;
361+ break;
362+ case AUDIO_FORMAT_U8:
363+ req.bits = 8;
364+ req.sig = 0;
365+ break;
366+ case AUDIO_FORMAT_S16:
367+ req.bits = 16;
368+ req.sig = 1;
369+ break;
370+ case AUDIO_FORMAT_U16:
371+ req.bits = 16;
372+ req.sig = 0;
373+ break;
374+ case AUDIO_FORMAT_S32:
375+ req.bits = 32;
376+ req.sig = 1;
377+ break;
378+ case AUDIO_FORMAT_U32:
379+ req.bits = 32;
380+ req.sig = 0;
381+ break;
382+ default:
383+ dolog("unknown audio sample format\n");
384+ return -1;
385+ }
386+
387+ if (req.bits > 8) {
388+ req.le = as->endianness ? 0 : 1;
389+ }
390+
391+ req.rate = as->freq;
392+ if (mode == SIO_PLAY) {
393+ req.pchan = as->nchannels;
394+ } else {
395+ req.rchan = as->nchannels;
396+ }
397+
398+ /* set on-device buffer size */
399+ req.appbufsz = req.rate * latency / 1000000;
400+
401+ if (!sio_setpar(self->hdl, &req)) {
402+ dolog("failed set audio params\n");
403+ goto fail;
404+ }
405+
406+ if (!sio_getpar(self->hdl, &self->par)) {
407+ dolog("failed get audio params\n");
408+ goto fail;
409+ }
410+
411+ nch = (mode == SIO_PLAY) ? self->par.pchan : self->par.rchan;
412+
413+ /*
414+ * With the default setup, sndio supports any combination of parameters
415+ * so these checks are mostly to catch configuration errors.
416+ */
417+ if (self->par.bits != req.bits || self->par.bps != req.bits / 8 ||
418+ self->par.sig != req.sig || (req.bits > 8 && self->par.le != req.le) ||
419+ self->par.rate != as->freq || nch != as->nchannels) {
420+ dolog("unsupported audio params\n");
421+ goto fail;
422+ }
423+
424+ /*
425+ * we use one block as buffer size; this is how
426+ * transfers get well aligned
427+ */
428+ self->buf_size = self->par.round * self->par.bps * nch;
429+
430+ self->buf = g_malloc(self->buf_size);
431+ if (self->buf == NULL) {
432+ dolog("failed to allocate audio buffer\n");
433+ goto fail;
434+ }
435+
436+ nfds = sio_nfds(self->hdl);
437+
438+ self->pfds = g_malloc_n(nfds, sizeof(struct pollfd));
439+ if (self->pfds == NULL) {
440+ dolog("failed to allocate pollfd structures\n");
441+ goto fail;
442+ }
443+
444+ self->pindexes = g_malloc_n(nfds, sizeof(struct pollindex));
445+ if (self->pindexes == NULL) {
446+ dolog("failed to allocate pollindex structures\n");
447+ goto fail;
448+ }
449+
450+ for (i = 0; i < nfds; i++) {
451+ self->pindexes[i].self = self;
452+ self->pindexes[i].index = i;
453+ }
454+
455+ return 0;
456+fail:
457+ sndio_fini(self);
458+ return -1;
459+}
460+
461+static void sndio_enable(SndioVoice *self, bool enable)
462+{
463+ if (enable) {
464+ sio_start(self->hdl);
465+ self->enabled = true;
466+ sndio_poll_wait(self);
467+ } else {
468+ self->enabled = false;
469+ sndio_poll_clear(self);
470+ sio_stop(self->hdl);
471+ }
472+}
473+
474+static void sndio_enable_out(HWVoiceOut *hw, bool enable)
475+{
476+ SndioVoice *self = (SndioVoice *) hw;
477+
478+ sndio_enable(self, enable);
479+}
480+
481+static void sndio_enable_in(HWVoiceIn *hw, bool enable)
482+{
483+ SndioVoice *self = (SndioVoice *) hw;
484+
485+ sndio_enable(self, enable);
486+}
487+
488+static int sndio_init_out(HWVoiceOut *hw, struct audsettings *as, void *opaque)
489+{
490+ SndioVoice *self = (SndioVoice *) hw;
491+
492+ if (sndio_init(self, as, SIO_PLAY, opaque) == -1) {
493+ return -1;
494+ }
495+
496+ audio_pcm_init_info(&hw->info, as);
497+ hw->samples = self->par.round;
498+ return 0;
499+}
500+
501+static int sndio_init_in(HWVoiceIn *hw, struct audsettings *as, void *opaque)
502+{
503+ SndioVoice *self = (SndioVoice *) hw;
504+
505+ if (sndio_init(self, as, SIO_REC, opaque) == -1) {
506+ return -1;
507+ }
508+
509+ audio_pcm_init_info(&hw->info, as);
510+ hw->samples = self->par.round;
511+ return 0;
512+}
513+
514+static void sndio_fini_out(HWVoiceOut *hw)
515+{
516+ SndioVoice *self = (SndioVoice *) hw;
517+
518+ sndio_fini(self);
519+}
520+
521+static void sndio_fini_in(HWVoiceIn *hw)
522+{
523+ SndioVoice *self = (SndioVoice *) hw;
524+
525+ sndio_fini(self);
526+}
527+
528+static void *sndio_audio_init(Audiodev *dev)
529+{
530+ assert(dev->driver == AUDIODEV_DRIVER_SNDIO);
531+ return dev;
532+}
533+
534+static void sndio_audio_fini(void *opaque)
535+{
536+}
537+
538+static struct audio_pcm_ops sndio_pcm_ops = {
539+ .init_out = sndio_init_out,
540+ .fini_out = sndio_fini_out,
541+ .enable_out = sndio_enable_out,
542+ .write = audio_generic_write,
543+ .buffer_get_free = sndio_buffer_get_free,
544+ .get_buffer_out = sndio_get_buffer_out,
545+ .put_buffer_out = sndio_put_buffer_out,
546+ .init_in = sndio_init_in,
547+ .fini_in = sndio_fini_in,
548+ .read = audio_generic_read,
549+ .enable_in = sndio_enable_in,
550+ .get_buffer_in = sndio_get_buffer_in,
551+ .put_buffer_in = sndio_put_buffer_in,
552+};
553+
554+static struct audio_driver sndio_audio_driver = {
555+ .name = "sndio",
556+ .descr = "sndio https://sndio.org",
557+ .init = sndio_audio_init,
558+ .fini = sndio_audio_fini,
559+ .pcm_ops = &sndio_pcm_ops,
560+ .can_be_default = 1,
561+ .max_voices_out = INT_MAX,
562+ .max_voices_in = INT_MAX,
563+ .voice_size_out = sizeof(SndioVoice),
564+ .voice_size_in = sizeof(SndioVoice)
565+};
566+
567+static void register_audio_sndio(void)
568+{
569+ audio_driver_register(&sndio_audio_driver);
570+}
571+
572+type_init(register_audio_sndio);
diff --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure
deleted file mode 100644
index d0e635c..0000000
--- a/emulators/qemu/patches/patch-configure
+++ /dev/null
@@ -1,97 +0,0 @@
1Revert..
2
3[PATCH] configure: simplify creation of plugin symbol list
437650689473c4cdb5838f90cbc1aefbcd9332fb0
5
6Index: configure
7--- configure.orig
8+++ configure
9@@ -77,6 +77,7 @@ TMPC="${TMPDIR1}/${TMPB}.c"
10 TMPO="${TMPDIR1}/${TMPB}.o"
11 TMPM="${TMPDIR1}/${TMPB}.m"
12 TMPE="${TMPDIR1}/${TMPB}.exe"
13+TMPTXT="${TMPDIR1}/${TMPB}.txt"
14
15 rm -f config.log
16
17@@ -1314,7 +1315,6 @@ if test "$static" = "yes" ; then
18 plugins="no"
19 fi
20 fi
21-test "$plugins" = "" && plugins=yes
22
23 cat > $TMPC << EOF
24
25@@ -1459,6 +1459,56 @@ if ! has "$pkg_config_exe"; then
26 fi
27
28 ##########################################
29+# plugin linker support probe
30+
31+if test "$plugins" != "no"; then
32+
33+ #########################################
34+ # See if --dynamic-list is supported by the linker
35+
36+ ld_dynamic_list="no"
37+ cat > $TMPTXT <<EOF
38+{
39+ foo;
40+};
41+EOF
42+
43+ cat > $TMPC <<EOF
44+#include <stdio.h>
45+void foo(void);
46+
47+void foo(void)
48+{
49+ printf("foo\n");
50+}
51+
52+int main(void)
53+{
54+ foo();
55+ return 0;
56+}
57+EOF
58+
59+ if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then
60+ ld_dynamic_list="yes"
61+ fi
62+
63+ if test "$ld_dynamic_list" = "no" ; then
64+ if test "$plugins" = "yes"; then
65+ error_exit \
66+ "Plugin support requires dynamic linking and specifying a set of symbols " \
67+ "that are exported to plugins. Unfortunately your linker doesn't " \
68+ "support the flag (--dynamic-list) used " \
69+ "for this purpose."
70+ else
71+ plugins="no"
72+ fi
73+ else
74+ plugins="yes"
75+ fi
76+fi
77+
78+##########################################
79 # glib support probe
80
81 # When bumping glib_req_ver, please check also whether we should increase
82@@ -2390,6 +2440,15 @@ fi
83
84 if test "$plugins" = "yes" ; then
85 echo "CONFIG_PLUGIN=y" >> $config_host_mak
86+ # Copy the export object list to the build dir
87+ if test "$ld_dynamic_list" = "yes" ; then
88+ echo "CONFIG_HAS_LD_DYNAMIC_LIST=yes" >> $config_host_mak
89+ ld_symbols=qemu-plugins-ld.symbols
90+ cp "$source_path/plugins/qemu-plugins.symbols" $ld_symbols
91+ else
92+ error_exit \
93+ "If \$plugins=yes, \$ld_dynamic_list should have been set to 'yes'."
94+ fi
95 fi
96
97 if test -n "$gdb_bin"; then
diff --git a/emulators/qemu/patches/patch-meson_build b/emulators/qemu/patches/patch-meson_build
deleted file mode 100644
index 6109662..0000000
--- a/emulators/qemu/patches/patch-meson_build
+++ /dev/null
@@ -1,56 +0,0 @@
1- localstatedir does not belong under prefix
2- Remove hardcoding of optimization
3- thread-posix: add support for setting threads name on OpenBSD
4
5Index: meson.build
6--- meson.build.orig
7+++ meson.build
8@@ -75,7 +75,7 @@ have_tools = get_option('tools') \
9 .allowed()
10 have_ga = get_option('guest_agent') \
11 .disable_auto_if(not have_system and not have_tools) \
12- .require(targetos in ['sunos', 'linux', 'windows', 'freebsd'],
13+ .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'openbsd'],
14 error_message: 'unsupported OS for QEMU guest agent') \
15 .allowed()
16 have_block = have_system or have_tools
17@@ -1790,7 +1790,7 @@ config_host_data.set('CONFIG_QEMU_FIRMWAREPATH', qemu_
18 config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') / get_option('libexecdir'))
19 config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / qemu_icondir)
20 config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') / get_option('localedir'))
21-config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / get_option('localstatedir'))
22+config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('localstatedir'))
23 config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
24 config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
25
26@@ -2123,6 +2123,18 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID
27 pthread_create(&thread, 0, f, 0);
28 return 0;
29 }''', dependencies: threads))
30+config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(gnu_source_prefix + '''
31+ #include <pthread.h>
32+ #include <pthread_np.h>
33+
34+ static void *f(void *p) { return NULL; }
35+ int main(void)
36+ {
37+ pthread_t thread;
38+ pthread_create(&thread, 0, f, 0);
39+ pthread_set_name_np(thread, "QEMU");
40+ return 0;
41+ }''', dependencies: threads))
42 config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(gnu_source_prefix + '''
43 #include <pthread.h>
44 #include <time.h>
45@@ -3756,11 +3768,9 @@ if targetos == 'darwin'
46 summary_info += {'Objective-C compiler': ' '.join(meson.get_compiler('objc').cmd_array())}
47 endif
48 summary_info += {'CFLAGS': ' '.join(get_option('c_args')
49- + ['-O' + get_option('optimization')]
50 + (get_option('debug') ? ['-g'] : []))}
51 if link_language == 'cpp'
52 summary_info += {'CXXFLAGS': ' '.join(get_option('cpp_args')
53- + ['-O' + get_option('optimization')]
54 + (get_option('debug') ? ['-g'] : []))}
55 endif
56 if targetos == 'darwin'
diff --git a/emulators/qemu/patches/patch-meson_mesonbuild_compilers_cpp_py b/emulators/qemu/patches/patch-meson_mesonbuild_compilers_cpp_py
deleted file mode 100644
index 2ce3ee1..0000000
--- a/emulators/qemu/patches/patch-meson_mesonbuild_compilers_cpp_py
+++ /dev/null
@@ -1,21 +0,0 @@
1Index: meson/mesonbuild/compilers/cpp.py
2--- meson/mesonbuild/compilers/cpp.py.orig
3+++ meson/mesonbuild/compilers/cpp.py
4@@ -254,7 +254,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
5 search_dirs: T.List[str] = []
6 for d in self.get_compiler_dirs(env, 'libraries'):
7 search_dirs.append(f'-L{d}')
8- return search_dirs + ['-lstdc++']
9+ return search_dirs + ['-lc++']
10
11
12 class AppleClangCPPCompiler(ClangCPPCompiler):
13@@ -418,7 +418,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
14 search_dirs: T.List[str] = []
15 for d in self.get_compiler_dirs(env, 'libraries'):
16 search_dirs.append(f'-L{d}')
17- return ['-lstdc++']
18+ return ['-lestdc++']
19
20
21 class PGICPPCompiler(PGICompiler, CPPCompiler):
diff --git a/emulators/qemu/patches/patch-meson_options_txt b/emulators/qemu/patches/patch-meson_options_txt
deleted file mode 100644
index fa5ded5..0000000
--- a/emulators/qemu/patches/patch-meson_options_txt
+++ /dev/null
@@ -1,23 +0,0 @@
1sndio module
2
3Index: meson_options.txt
4--- meson_options.txt.orig
5+++ meson_options.txt
6@@ -21,7 +21,7 @@ option('tls_priority', type : 'string', value : 'NORMA
7 option('default_devices', type : 'boolean', value : true,
8 description: 'Include a default selection of devices in emulators')
9 option('audio_drv_list', type: 'array', value: ['default'],
10- choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl'],
11+ choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl', 'sndio'],
12 description: 'Set audio driver list')
13 option('block_drv_rw_whitelist', type : 'string', value : '',
14 description: 'set block driver read-write whitelist (by default affects only QEMU, not tools like qemu-img)')
15@@ -240,6 +240,8 @@ option('oss', type: 'feature', value: 'auto',
16 description: 'OSS sound support')
17 option('pa', type: 'feature', value: 'auto',
18 description: 'PulseAudio sound support')
19+option('sndio', type: 'feature', value: 'auto',
20+ description: 'sndio sound support')
21
22 option('vhost_kernel', type: 'feature', value: 'auto',
23 description: 'vhost kernel backend support')
diff --git a/emulators/qemu/patches/patch-plugins_meson_build b/emulators/qemu/patches/patch-plugins_meson_build
deleted file mode 100644
index 67d53f3..0000000
--- a/emulators/qemu/patches/patch-plugins_meson_build
+++ /dev/null
@@ -1,26 +0,0 @@
1Revert..
2
3[PATCH] configure: simplify creation of plugin symbol list
437650689473c4cdb5838f90cbc1aefbcd9332fb0
5
6Index: plugins/meson.build
7--- plugins/meson.build.orig
8+++ plugins/meson.build
9@@ -1,15 +1,8 @@
10 plugin_ldflags = []
11 # Modules need more symbols than just those in plugins/qemu-plugins.symbols
12 if not enable_modules
13- if targetos == 'darwin'
14- configure_file(
15- input: files('qemu-plugins.symbols'),
16- output: 'qemu-plugins-ld64.symbols',
17- capture: true,
18- command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@'])
19- plugin_ldflags = ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols']
20- else
21- plugin_ldflags = ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')]
22+ if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host
23+ plugin_ldflags = ['-Wl,--dynamic-list=qemu-plugins-ld.symbols']
24 endif
25 endif
26
diff --git a/emulators/qemu/patches/patch-qapi_audio_json b/emulators/qemu/patches/patch-qapi_audio_json
deleted file mode 100644
index cccb078..0000000
--- a/emulators/qemu/patches/patch-qapi_audio_json
+++ /dev/null
@@ -1,50 +0,0 @@
1sndio module
2
3Index: qapi/audio.json
4--- qapi/audio.json.orig
5+++ qapi/audio.json
6@@ -107,6 +107,28 @@
7 '*threshold': 'uint32' } }
8
9 ##
10+# @AudiodevSndioOptions:
11+#
12+# Options of the sndio audio backend.
13+#
14+# @in: options of the capture stream
15+#
16+# @out: options of the playback stream
17+#
18+# @dev: the name of the sndio device to use (default 'default')
19+#
20+# @latency: play buffer size (in microseconds)
21+#
22+# Since: 7.2
23+##
24+{ 'struct': 'AudiodevSndioOptions',
25+ 'data': {
26+ '*in': 'AudiodevPerDirectionOptions',
27+ '*out': 'AudiodevPerDirectionOptions',
28+ '*dev': 'str',
29+ '*latency': 'uint32'} }
30+
31+##
32 # @AudiodevCoreaudioPerDirectionOptions:
33 #
34 # Options of the Core Audio backend that are used for both playback and
35@@ -387,7 +409,7 @@
36 ##
37 { 'enum': 'AudiodevDriver',
38 'data': [ 'none', 'alsa', 'coreaudio', 'dbus', 'dsound', 'jack', 'oss', 'pa',
39- 'sdl', 'spice', 'wav' ] }
40+ 'sdl', 'sndio', 'spice', 'wav' ] }
41
42 ##
43 # @Audiodev:
44@@ -418,5 +440,6 @@
45 'oss': 'AudiodevOssOptions',
46 'pa': 'AudiodevPaOptions',
47 'sdl': 'AudiodevSdlOptions',
48+ 'sndio': 'AudiodevSndioOptions',
49 'spice': 'AudiodevGenericOptions',
50 'wav': 'AudiodevWavOptions' } }
diff --git a/emulators/qemu/patches/patch-qemu-options_hx b/emulators/qemu/patches/patch-qemu-options_hx
deleted file mode 100644
index f357ad9..0000000
--- a/emulators/qemu/patches/patch-qemu-options_hx
+++ /dev/null
@@ -1,35 +0,0 @@
1sndio module
2
3Index: qemu-options.hx
4--- qemu-options.hx.orig
5+++ qemu-options.hx
6@@ -767,6 +767,9 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
7 "-audiodev sdl,id=id[,prop[=value][,...]]\n"
8 " in|out.buffer-count= number of buffers\n"
9 #endif
10+#ifdef CONFIG_AUDIO_SNDIO
11+ "-audiodev sndio,id=id[,prop[=value][,...]]\n"
12+#endif
13 #ifdef CONFIG_SPICE
14 "-audiodev spice,id=id[,prop[=value][,...]]\n"
15 #endif
16@@ -932,6 +935,19 @@ SRST
17
18 ``in|out.buffer-count=count``
19 Sets the count of the buffers.
20+
21+``-audiodev sndio,id=id[,prop[=value][,...]]``
22+ Creates a backend using SNDIO. This backend is available on
23+ OpenBSD and most other Unix-like systems.
24+
25+ Sndio specific options are:
26+
27+ ``in|out.dev=device``
28+ Specify the sndio device to use for input and/or output. Default
29+ is ``default``.
30+
31+ ``in|out.latency=usecs``
32+ Sets the desired period length in microseconds.
33
34 ``-audiodev spice,id=id[,prop[=value][,...]]``
35 Creates a backend that sends audio through SPICE. This backend
diff --git a/emulators/qemu/patches/patch-qga_commands-bsd_c b/emulators/qemu/patches/patch-qga_commands-bsd_c
deleted file mode 100644
index 81b330d..0000000
--- a/emulators/qemu/patches/patch-qga_commands-bsd_c
+++ /dev/null
@@ -1,16 +0,0 @@
1Index: qga/commands-bsd.c
2--- qga/commands-bsd.c.orig
3+++ qga/commands-bsd.c
4@@ -21,7 +21,12 @@
5 #include <sys/ucred.h>
6 #include <sys/mount.h>
7 #include <net/if_dl.h>
8+#ifdef __OpenBSD__
9+#include <net/if_arp.h>
10+#include <netinet/if_ether.h>
11+#else
12 #include <net/ethernet.h>
13+#endif
14 #include <paths.h>
15
16 #if defined(CONFIG_FSFREEZE) || defined(CONFIG_FSTRIM)
diff --git a/emulators/qemu/patches/patch-qga_commands-posix_c b/emulators/qemu/patches/patch-qga_commands-posix_c
deleted file mode 100644
index d5d0c16..0000000
--- a/emulators/qemu/patches/patch-qga_commands-posix_c
+++ /dev/null
@@ -1,576 +0,0 @@
1Adapted from https://github.com/aborche/qemu-guest-agent
2
3Adds support for
4"guest-get-fsinfo"
5"guest-get-vcpus"
6"guest-network-get-interfaces"
7and guest shutdown from host.
8
9Setting user password is not supported on OpenBSD.
10
11Index: qga/commands-posix.c
12--- qga/commands-posix.c.orig
13+++ qga/commands-posix.c
14@@ -45,13 +45,23 @@
15 #include <arpa/inet.h>
16 #include <sys/socket.h>
17 #include <net/if.h>
18+#ifdef __OpenBSD__
19+#include <net/if_arp.h>
20+#include <netinet/if_ether.h>
21+#else
22 #include <net/ethernet.h>
23+#endif
24 #include <sys/types.h>
25 #ifdef CONFIG_SOLARIS
26 #include <sys/sockio.h>
27 #endif
28 #endif
29
30+#ifdef __OpenBSD__
31+#include <sys/sysctl.h>
32+#include <sys/statvfs.h>
33+#endif
34+
35 static void ga_wait_child(pid_t pid, int *status, Error **errp)
36 {
37 pid_t rpid;
38@@ -2232,12 +2242,118 @@ out:
39 close(datafd[1]);
40 }
41 }
42-#else /* __linux__ || __FreeBSD__ */
43+#elif defined(__OpenBSD__) /* __linux__ || __FreeBSD__ */
44 void qmp_guest_set_user_password(const char *username,
45 const char *password,
46 bool crypted,
47 Error **errp)
48 {
49+ Error *local_err = NULL;
50+ char *pw_path = NULL;
51+ pid_t pid;
52+ int status;
53+ int datafd[2] = { -1, -1 };
54+ char *rawpasswddata = NULL;
55+ size_t rawpasswdlen;
56+ char *chpasswddata = NULL;
57+ size_t chpasswdlen;
58+
59+ rawpasswddata = (char *)qbase64_decode(password, -1, &rawpasswdlen, errp);
60+ if (!rawpasswddata) {
61+ return;
62+ }
63+
64+ rawpasswddata = g_renew(char, rawpasswddata, rawpasswdlen + 1);
65+ rawpasswddata[rawpasswdlen] = '\0';
66+
67+ if (strchr(rawpasswddata, '\n')) {
68+ error_setg(errp, "forbidden characters in raw password");
69+ goto out;
70+ }
71+
72+ if (strchr(username, '\n') ||
73+ strchr(username, ':')) {
74+ error_setg(errp, "forbidden characters in username");
75+ goto out;
76+ }
77+
78+ chpasswddata = g_strdup_printf("%s", rawpasswddata);
79+ chpasswdlen = strlen(chpasswddata);
80+
81+ pw_path = g_find_program_in_path("pw");
82+
83+ if (!pw_path) {
84+ error_setg(errp, "cannot find 'pw' program in PATH");
85+ goto out;
86+ }
87+
88+ if (pipe(datafd) < 0) {
89+ error_setg(errp, "cannot create pipe FDs");
90+ goto out;
91+ }
92+
93+ pid = fork();
94+ if (pid == 0) {
95+ close(datafd[1]);
96+ /* child */
97+ setsid();
98+ dup2(datafd[0], 0);
99+ reopen_fd_to_null(1);
100+ reopen_fd_to_null(2);
101+
102+ if (crypted) {
103+ execl(pw_path, "pw", "usermod", username, "-H", "0", (char*)NULL);
104+ } else {
105+ execl(pw_path, "pw", "usermod", username, "-h", "0", (char*)NULL);
106+ }
107+ _exit(EXIT_FAILURE);
108+ } else if (pid < 0) {
109+ error_setg_errno(errp, errno, "failed to create child process");
110+ goto out;
111+ }
112+ close(datafd[0]);
113+ datafd[0] = -1;
114+
115+ if (qemu_write_full(datafd[1], chpasswddata, chpasswdlen) != chpasswdlen) {
116+ error_setg_errno(errp, errno, "cannot write new account password");
117+ goto out;
118+ }
119+ close(datafd[1]);
120+ datafd[1] = -1;
121+
122+ ga_wait_child(pid, &status, &local_err);
123+ if (local_err) {
124+ error_propagate(errp, local_err);
125+ goto out;
126+ }
127+
128+ if (!WIFEXITED(status)) {
129+ error_setg(errp, "child process has terminated abnormally");
130+ goto out;
131+ }
132+
133+ if (WEXITSTATUS(status)) {
134+ error_setg(errp, "child process has failed to set user password");
135+ goto out;
136+ }
137+
138+out:
139+ g_free(chpasswddata);
140+ g_free(rawpasswddata);
141+ g_free(pw_path);
142+ if (datafd[0] != -1) {
143+ close(datafd[0]);
144+ }
145+ if (datafd[1] != -1) {
146+ close(datafd[1]);
147+ }
148+}
149+#else /* __OpenBSD__ */
150+void qmp_guest_set_user_password(const char *username,
151+ const char *password,
152+ bool crypted,
153+ Error **errp)
154+{
155 error_setg(errp, QERR_UNSUPPORTED);
156 }
157 #endif /* __linux__ || __FreeBSD__ */
158@@ -2750,7 +2866,7 @@ GuestCpuStatsList *qmp_guest_get_cpustats(Error **errp
159 return head;
160 }
161
162-#else /* defined(__linux__) */
163+#elif defined(CONFIG_BSD)
164
165 void qmp_guest_suspend_disk(Error **errp)
166 {
167@@ -2769,10 +2885,103 @@ void qmp_guest_suspend_hybrid(Error **errp)
168
169 GuestLogicalProcessorList *qmp_guest_get_vcpus(Error **errp)
170 {
171+ int64_t current;
172+ GuestLogicalProcessorList *head, **link;
173+ long sc_max;
174+ Error *local_err = NULL;
175+ int Query[2];
176+ int NumCpu = 0;
177+ size_t Length = sizeof(NumCpu);
178+
179+ Query[0] = CTL_HW;
180+#ifdef HW_NCPUONLINE
181+ Query[1] = HW_NCPUONLINE;
182+#else
183+ Query[1] = HW_NCPU;
184+#endif
185+
186+ current = 0;
187+ head = NULL;
188+ link = &head;
189+ if (sysctl(Query, 2, &NumCpu, &Length, NULL, 0) == -1) {
190+ error_setg(errp, "sysctl get CTL_HW.HW_NCPU failed");
191+ }
192+ sc_max = NumCpu;
193+
194+ while (local_err == NULL && current < sc_max) {
195+ GuestLogicalProcessor *vcpu;
196+ GuestLogicalProcessorList *entry;
197+ int64_t id = current++;
198+ vcpu = g_malloc0(sizeof *vcpu);
199+ vcpu->logical_id = id;
200+ vcpu->has_can_offline = false; /* lolspeak ftw */
201+ vcpu->online = true;
202+ vcpu->can_offline = false;
203+ entry = g_malloc0(sizeof *entry);
204+ entry->value = vcpu;
205+ *link = entry;
206+ link = &entry->next;
207+ }
208+
209+ if (local_err == NULL) {
210+ /* there's no guest with zero VCPUs */
211+ g_assert(head != NULL);
212+ return head;
213+ }
214+
215+ qapi_free_GuestLogicalProcessorList(head);
216+ error_propagate(errp, local_err);
217+ return NULL;
218+}
219+
220+int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
221+{
222 error_setg(errp, QERR_UNSUPPORTED);
223+ return -1;
224+}
225+
226+GuestMemoryBlockList *qmp_guest_get_memory_blocks(Error **errp)
227+{
228+ error_setg(errp, QERR_UNSUPPORTED);
229 return NULL;
230 }
231
232+GuestMemoryBlockResponseList *
233+qmp_guest_set_memory_blocks(GuestMemoryBlockList *mem_blks, Error **errp)
234+{
235+ error_setg(errp, QERR_UNSUPPORTED);
236+ return NULL;
237+}
238+
239+GuestMemoryBlockInfo *qmp_guest_get_memory_block_info(Error **errp)
240+{
241+ error_setg(errp, QERR_UNSUPPORTED);
242+ return NULL;
243+}
244+
245+#else /* defined(CONFIG_BSD) */
246+
247+void qmp_guest_suspend_disk(Error **errp)
248+{
249+ error_setg(errp, QERR_UNSUPPORTED);
250+}
251+
252+void qmp_guest_suspend_ram(Error **errp)
253+{
254+ error_setg(errp, QERR_UNSUPPORTED);
255+}
256+
257+void qmp_guest_suspend_hybrid(Error **errp)
258+{
259+ error_setg(errp, QERR_UNSUPPORTED);
260+}
261+
262+GuestLogicalProcessorList *qmp_guest_get_vcpus(Error **errp)
263+{
264+ error_setg(errp, QERR_UNSUPPORTED);
265+ return NULL;
266+}
267+
268 int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
269 {
270 error_setg(errp, QERR_UNSUPPORTED);
271@@ -2881,7 +3090,7 @@ static int guest_get_network_stats(const char *name,
272 return -1;
273 }
274
275-#ifndef __FreeBSD__
276+#ifndef CONFIG_BSD
277 /*
278 * Fill "buf" with MAC address by ifaddrs. Pointer buf must point to a
279 * buffer with ETHER_ADDR_LEN length at least.
280@@ -2930,7 +3139,7 @@ bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned c
281 close(sock);
282 return true;
283 }
284-#endif /* __FreeBSD__ */
285+#endif /* CONFIG_BSD */
286
287 /*
288 * Build information about guest interfaces
289@@ -3070,11 +3279,245 @@ GuestNetworkInterfaceList *qmp_guest_network_get_inter
290
291 #if !defined(CONFIG_FSFREEZE)
292
293+#ifdef CONFIG_BSD
294+typedef struct FsMount {
295+ char *dirname;
296+ char *devtype;
297+ char *size;
298+ char *used;
299+ char *free;
300+ char *load;
301+ char *mntpoint;
302+ unsigned int devmajor, devminor;
303+ QTAILQ_ENTRY(FsMount) next;
304+} FsMount;
305+
306+typedef QTAILQ_HEAD(FsMountList, FsMount) FsMountList;
307+
308+static void free_fs_mount_list(FsMountList *mounts)
309+{
310+ FsMount *mount, *temp;
311+
312+ if (!mounts) {
313+ return;
314+ }
315+
316+ QTAILQ_FOREACH_SAFE(mount, mounts, next, temp) {
317+ QTAILQ_REMOVE(mounts, mount, next);
318+ g_free(mount->dirname);
319+ g_free(mount->devtype);
320+ g_free(mount->size);
321+ g_free(mount->used);
322+ g_free(mount->free);
323+ g_free(mount->load);
324+ g_free(mount->mntpoint);
325+ g_free(mount);
326+ }
327+}
328+
329+static void build_fs_mount_list(FsMountList *mounts, Error **errp)
330+{
331+ FsMount *mount;
332+#ifdef __OpenBSD__
333+ char const *dfcmd = "/bin/df";
334+#else // defined(__OpenBSD__)
335+ char const *dfcmd = "/bin/df -hT";
336+#endif // defined(__OpenBSD__)
337+
338+ FILE *fp;
339+ char *line = NULL;
340+ size_t n;
341+ int ret;
342+ char dev_name[128], size[12], used[12], free[12], load[10], mounted[128];
343+#ifndef __OpenBSD__
344+ char fstype[12] = "";
345+#endif // !defined(__OpenBSD__)
346+
347+ if ((fp = popen(dfcmd, "r")) == NULL) {
348+ g_debug("Cannot open '%s'!!\n", dfcmd);
349+ error_setg_errno(errp, errno,
350+ "failed to create child process for command: %s",
351+ dfcmd);
352+ return;
353+ }
354+
355+ while (getline(&line, &n, fp) != -1) {
356+ //g_debug("line '%s'", line);
357+#ifdef __OpenBSD__
358+ ret = sscanf(line, "%127s%11s%11s%11s%9s%127s",
359+ dev_name, size, used, free, load, mounted);
360+#else // defined(__OpenBSD__)
361+ ret = sscanf(line, "%127s%11s%11s%11s%11s%9s%127s",
362+ dev_name, fstype, size, used, free, load, mounted);
363+ //g_debug("ret %d, dev_name '%s', fstype '%s', size '%s', used '%s', free '%s', load '%s', mounted '%s'",
364+ // ret, dev_name, fstype, size, used, free, load, mounted);
365+#endif // defined(__OpenBSD__)
366+ if (g_str_equal(dev_name, "Filesystem")
367+#ifndef __OpenBSD__
368+ ||g_str_equal(fstype,"devfs")
369+ ||g_str_equal(fstype,"procfs")
370+ ||g_str_equal(fstype,"fdescfs")
371+#endif // !defined(__OpenBSD__)
372+ ) {
373+ continue;
374+ }
375+
376+#ifdef __OpenBSD__
377+ if (ret < 6) {
378+#else // defined(__OpenBSD__)
379+ if (ret < 7) {
380+#endif // defined(__OpenBSD__)
381+ continue;
382+ }
383+
384+ mount = g_new0(FsMount, 1);
385+ mount->dirname = g_strdup(dev_name);
386+#ifndef __OpenBSD__
387+ mount->devtype = g_strdup(fstype);
388+#endif // defined(__OpenBSD__)
389+ mount->free = g_strdup(free);
390+ mount->load = g_strdup(load);
391+ mount->size = g_strdup(size);
392+ mount->used = g_strdup(used);
393+ mount->mntpoint = g_strdup(mounted);
394+ mount->devmajor = 0;
395+ mount->devminor = 0;
396+
397+ QTAILQ_INSERT_TAIL(mounts, mount, next);
398+ }
399+ g_free(line);
400+
401+ fclose(fp);
402+}
403+
404+#ifdef __OpenBSD__
405+
406+static void add_type_fs_mount_list(FsMountList *mounts, Error **errp)
407+{
408+ FILE *fp;
409+ char const *mountcmd = "/sbin/mount";
410+ char *line = NULL;
411+ size_t n;
412+ int ret;
413+ char mnt_fsname[128], mnt_dir[128], mnt_type[32], mnt_opts[128];
414+ struct FsMount *mount;
415+
416+ // get mounts from mount command
417+ if ((fp = popen(mountcmd, "r")) == NULL) {
418+ g_debug("Cannot open '%s'!!\n", mountcmd);
419+ error_setg_errno(errp, errno, "failed to create child process for command: %s", mountcmd);
420+ return;
421+ }
422+
423+ // loop through mounts from mount command
424+ while (getline(&line, &n, fp) != -1) {
425+ //g_debug("line '%s'", line);
426+
427+ ret = sscanf(line, "%127s on %127s type %31s (%127s)",
428+ mnt_fsname, mnt_dir, mnt_type, mnt_opts);
429+ //g_debug("ret %d, fsname '%s', dir '%s', type '%s', opts '%s'",
430+ // ret, mnt_fsname, mnt_dir, mnt_type, mnt_opts);
431+
432+ if (4 != ret ||
433+ '/' != mnt_fsname[0] ||
434+ '/' != mnt_dir[0] ||
435+ g_str_equal("smbfs", mnt_type) ||
436+ g_str_equal("cifs", mnt_type)) {
437+ continue;
438+ }
439+
440+ // find mount in supplied mounts list and update device type
441+ QTAILQ_FOREACH(mount, mounts, next) {
442+ if (NULL == mount->devtype && g_str_equal(mount->dirname, mnt_fsname)) {
443+ mount->devtype = g_strdup(mnt_type);
444+ break;
445+ }
446+ }
447+ }
448+ g_free(line);
449+
450+ fclose(fp);
451+}
452+
453+#endif // defined(__OpenBSD__)
454+
455+/* Return a list of the disk device(s)' info which @mount lies on */
456+static GuestFilesystemInfo *build_guest_fsinfo(struct FsMount *mount,
457+ Error **errp)
458+{
459+ GuestFilesystemInfo *fs = g_malloc0(sizeof(*fs));
460+ struct statvfs buf;
461+ unsigned long used, nonroot_total, fr_size;
462+
463+ fs->name = g_strdup(mount->dirname);
464+ fs->mountpoint = g_strdup(mount->mntpoint);
465+ fs->type = g_strdup(mount->devtype);
466+
467+ if (statvfs(fs->mountpoint, &buf) == 0) {
468+ fr_size = buf.f_frsize;
469+ used = buf.f_blocks - buf.f_bfree;
470+ nonroot_total = used + buf.f_bavail;
471+ fs->used_bytes = used * fr_size;
472+ fs->total_bytes = nonroot_total * fr_size;
473+
474+ fs->has_total_bytes = true;
475+ fs->has_used_bytes = true;
476+ }
477+
478+ //g_free(devpath);
479+
480+ return fs;
481+}
482+
483 GuestFilesystemInfoList *qmp_guest_get_fsinfo(Error **errp)
484 {
485+ FsMountList mounts;
486+ struct FsMount *mount;
487+ GuestFilesystemInfoList *new, *ret = NULL;
488+ Error *local_err = NULL;
489+
490+ QTAILQ_INIT(&mounts);
491+
492+ g_debug("Entering to guest_get_fsinfo");
493+ build_fs_mount_list(&mounts, &local_err);
494+ if (local_err) {
495+ error_propagate(errp, local_err);
496+ return NULL;
497+ }
498+
499+#ifdef __OpenBSD__
500+ add_type_fs_mount_list(&mounts, &local_err);
501+ if (local_err) {
502+ error_propagate(errp, local_err);
503+ return NULL;
504+ }
505+#endif // defined(__OpenBSD__)
506+
507+ QTAILQ_FOREACH(mount, &mounts, next) {
508+ //g_debug("Building guest fsinfo for '%s'", mount->dirname);
509+ //g_debug("Devtype '%s'", mount->devtype);
510+ new = g_malloc0(sizeof(*ret));
511+ new->value = build_guest_fsinfo(mount, &local_err);
512+ new->next = ret;
513+ ret = new;
514+ if (local_err) {
515+ error_propagate(errp, local_err);
516+ qapi_free_GuestFilesystemInfoList(ret);
517+ ret = NULL;
518+ break;
519+ }
520+ }
521+
522+ free_fs_mount_list(&mounts);
523+ return ret;
524+}
525+#else
526+GuestFilesystemInfoList *qmp_guest_get_fsinfo(Error **errp)
527+{
528 error_setg(errp, QERR_UNSUPPORTED);
529 return NULL;
530 }
531+#endif /* CONFIG_BSD */
532
533 GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **errp)
534 {
535@@ -3140,12 +3583,21 @@ GList *ga_command_init_blockedrpcs(GList *blockedrpcs)
536 {
537 #if !defined(__linux__)
538 {
539+#ifdef CONFIG_BSD
540 const char *list[] = {
541 "guest-suspend-disk", "guest-suspend-ram",
542+ "guest-suspend-hybrid", "guest-set-vcpus",
543+ "guest-get-memory-blocks", "guest-set-memory-blocks",
544+ "guest-get-memory-block-size", "guest-get-memory-block-info",
545+ NULL};
546+#else
547+ const char *list[] = {
548+ "guest-suspend-disk", "guest-suspend-ram",
549 "guest-suspend-hybrid", "guest-get-vcpus", "guest-set-vcpus",
550 "guest-get-memory-blocks", "guest-set-memory-blocks",
551 "guest-get-memory-block-size", "guest-get-memory-block-info",
552 NULL};
553+#endif /* CONFIG_BSD */
554 char **p = (char **)list;
555
556 while (*p) {
557@@ -3161,11 +3613,19 @@ GList *ga_command_init_blockedrpcs(GList *blockedrpcs)
558
559 #if !defined(CONFIG_FSFREEZE)
560 {
561+#ifdef CONFIG_BSD
562 const char *list[] = {
563+ "guest-fsfreeze-status",
564+ "guest-fsfreeze-freeze", "guest-fsfreeze-freeze-list",
565+ "guest-fsfreeze-thaw",
566+ "guest-get-disks", NULL};
567+#else
568+ const char *list[] = {
569 "guest-get-fsinfo", "guest-fsfreeze-status",
570 "guest-fsfreeze-freeze", "guest-fsfreeze-freeze-list",
571 "guest-fsfreeze-thaw", "guest-get-fsinfo",
572 "guest-get-disks", NULL};
573+#endif /* CONFIG_BSD */
574 char **p = (char **)list;
575
576 while (*p) {
diff --git a/emulators/qemu/patches/patch-qga_main_c b/emulators/qemu/patches/patch-qga_main_c
deleted file mode 100644
index 4dc551d..0000000
--- a/emulators/qemu/patches/patch-qga_main_c
+++ /dev/null
@@ -1,37 +0,0 @@
1Adapted from https://github.com/aborche/qemu-guest-agent
2
3Index: qga/main.c
4--- qga/main.c.orig
5+++ qga/main.c
6@@ -40,12 +40,16 @@
7 #include "commands-common.h"
8
9 #ifndef _WIN32
10-#ifdef __FreeBSD__
11+#ifdef CONFIG_BSD
12 #define QGA_VIRTIO_PATH_DEFAULT "/dev/vtcon/org.qemu.guest_agent.0"
13-#else /* __FreeBSD__ */
14+#else /* CONFIG_BSD */
15 #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0"
16-#endif /* __FreeBSD__ */
17+#endif /* CONFIG_BSD */
18+#ifdef __OpenBSD__
19+#define QGA_SERIAL_PATH_DEFAULT "/dev/cua01"
20+#else
21 #define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0"
22+#endif
23 #define QGA_STATE_RELATIVE_DIR "run"
24 #else
25 #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0"
26@@ -1483,7 +1487,11 @@ int main(int argc, char **argv)
27 }
28
29 if (config->method == NULL) {
30+#ifdef CONFIG_BSD
31+ config->method = g_strdup("isa-serial");
32+#else
33 config->method = g_strdup("virtio-serial");
34+#endif
35 }
36
37 socket_activation = check_socket_activation();
diff --git a/emulators/qemu/patches/patch-util_cacheflush_c b/emulators/qemu/patches/patch-util_cacheflush_c
deleted file mode 100644
index 2d1d5d8..0000000
--- a/emulators/qemu/patches/patch-util_cacheflush_c
+++ /dev/null
@@ -1,19 +0,0 @@
1Set OpenBSD/powerpc cache sizes.
2
3Index: util/cacheflush.c
4--- util/cacheflush.c.orig
5+++ util/cacheflush.c
6@@ -163,6 +163,13 @@ static void arch_cache_info(int *isize, int *dsize)
7 have_coherent_icache = qemu_getauxval(AT_HWCAP) & PPC_FEATURE_ICACHE_SNOOP;
8 }
9
10+#elif defined(_ARCH_PPC) && defined (__OpenBSD__)
11+static void arch_cache_info(int *isize, int *dsize)
12+{
13+ *isize = 32;
14+ *dsize = 32;
15+}
16+
17 #else
18 static void arch_cache_info(int *isize, int *dsize) { }
19 #endif /* arch_cache_info */
diff --git a/emulators/qemu/patches/patch-util_qemu-thread-posix_c b/emulators/qemu/patches/patch-util_qemu-thread-posix_c
deleted file mode 100644
index 112abb5..0000000
--- a/emulators/qemu/patches/patch-util_qemu-thread-posix_c
+++ /dev/null
@@ -1,35 +0,0 @@
1thread-posix: add support for setting threads name on OpenBSD
2
3Index: util/qemu-thread-posix.c
4--- util/qemu-thread-posix.c.orig
5+++ util/qemu-thread-posix.c
6@@ -18,6 +18,10 @@
7 #include "qemu/tsan.h"
8 #include "qemu/bitmap.h"
9
10+#ifdef CONFIG_PTHREAD_SET_NAME_NP
11+#include <pthread_np.h>
12+#endif
13+
14 static bool name_threads;
15
16 void qemu_thread_naming(bool enable)
17@@ -25,7 +29,8 @@ void qemu_thread_naming(bool enable)
18 name_threads = enable;
19
20 #if !defined CONFIG_PTHREAD_SETNAME_NP_W_TID && \
21- !defined CONFIG_PTHREAD_SETNAME_NP_WO_TID
22+ !defined CONFIG_PTHREAD_SETNAME_NP_WO_TID && \
23+ !defined CONFIG_PTHREAD_SET_NAME_NP
24 /* This is a debugging option, not fatal */
25 if (enable) {
26 fprintf(stderr, "qemu: thread naming not supported on this host\n");
27@@ -480,6 +485,8 @@ static void *qemu_thread_start(void *args)
28 pthread_setname_np(pthread_self(), qemu_thread_args->name);
29 # elif defined(CONFIG_PTHREAD_SETNAME_NP_WO_TID)
30 pthread_setname_np(qemu_thread_args->name);
31+# elif defined(CONFIG_PTHREAD_SET_NAME_NP)
32+ pthread_set_name_np(pthread_self(), qemu_thread_args->name);
33 # endif
34 }
35 QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name);
diff --git a/emulators/qemu/pkg/CVS/Root b/emulators/qemu/pkg/CVS/Root
deleted file mode 100644
index 3811072..0000000
--- a/emulators/qemu/pkg/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
1/cvs
diff --git a/emulators/qemu/pkg/CVS/Tag b/emulators/qemu/pkg/CVS/Tag
deleted file mode 100644
index b1c2a73..0000000
--- a/emulators/qemu/pkg/CVS/Tag
+++ /dev/null
@@ -1 +0,0 @@
1TOPENBSD_7_3
diff --git a/emulators/qemu/pkg/DESCR-ga b/emulators/qemu/pkg/DESCR-ga
deleted file mode 100644
index 0402160..0000000
--- a/emulators/qemu/pkg/DESCR-ga
+++ /dev/null
@@ -1,3 +0,0 @@
1The QEMU guest agent provides a daemon to run inside QEMU guests. It
2communicates with the host system and allows to perform various tasks in
3the guest from the host system.
diff --git a/emulators/qemu/pkg/PFRAG.plugins-main b/emulators/qemu/pkg/PFRAG.plugins-main
deleted file mode 100644
index 59fe1cc..0000000
--- a/emulators/qemu/pkg/PFRAG.plugins-main
+++ /dev/null
@@ -1 +0,0 @@
1include/qemu-plugin.h
diff --git a/emulators/qemu/pkg/PLIST-ga b/emulators/qemu/pkg/PLIST-ga
deleted file mode 100644
index 536bb06..0000000
--- a/emulators/qemu/pkg/PLIST-ga
+++ /dev/null
@@ -1,14 +0,0 @@
1@conflict qemu-<=5.1.0p2
2@rcscript ${RCDIR}/qemu_ga
3@bin bin/qemu-ga
4@man man/man7/qemu-ga-ref.7
5@man man/man8/qemu-ga.8
6share/doc/pkg-readmes/${PKGSTEM}
7share/doc/qemu/
8share/doc/qemu/interop/
9share/doc/qemu/interop/qemu-ga-ref.html
10share/doc/qemu/interop/qemu-ga.html
11share/examples/qemu/
12@sample ${SYSCONFDIR}/qemu/
13share/examples/qemu/qemu-ga.conf
14@sample ${SYSCONFDIR}/qemu/qemu-ga.conf
diff --git a/emulators/qemu/pkg/PLIST-main b/emulators/qemu/pkg/PLIST-main
deleted file mode 100644
index 6a3f4d0..0000000
--- a/emulators/qemu/pkg/PLIST-main
+++ /dev/null
@@ -1,465 +0,0 @@
1@pkgpath emulators/qemu
2@bin bin/elf2dmp
3@bin bin/qemu-edid
4@bin bin/qemu-img
5@bin bin/qemu-io
6@bin bin/qemu-keymap
7@bin bin/qemu-nbd
8@bin bin/qemu-storage-daemon
9@bin bin/qemu-system-aarch64
10@bin bin/qemu-system-alpha
11@bin bin/qemu-system-arm
12@bin bin/qemu-system-avr
13@bin bin/qemu-system-cris
14@bin bin/qemu-system-hppa
15@bin bin/qemu-system-i386
16@bin bin/qemu-system-loongarch64
17@bin bin/qemu-system-m68k
18@bin bin/qemu-system-microblaze
19@bin bin/qemu-system-microblazeel
20@bin bin/qemu-system-mips
21@bin bin/qemu-system-mips64
22@bin bin/qemu-system-mips64el
23@bin bin/qemu-system-mipsel
24@bin bin/qemu-system-nios2
25@bin bin/qemu-system-or1k
26@bin bin/qemu-system-ppc
27@bin bin/qemu-system-ppc64
28@bin bin/qemu-system-riscv32
29@bin bin/qemu-system-riscv64
30@bin bin/qemu-system-rx
31@bin bin/qemu-system-s390x
32@bin bin/qemu-system-sh4
33@bin bin/qemu-system-sh4eb
34@bin bin/qemu-system-sparc
35@bin bin/qemu-system-sparc64
36@bin bin/qemu-system-tricore
37@bin bin/qemu-system-x86_64
38@bin bin/qemu-system-xtensa
39@bin bin/qemu-system-xtensaeb
40%%plugins%%
41@man man/man1/qemu-img.1
42@man man/man1/qemu-storage-daemon.1
43@man man/man1/qemu.1
44@man man/man7/qemu-block-drivers.7
45@man man/man7/qemu-cpu-models.7
46@man man/man7/qemu-qmp-ref.7
47@man man/man7/qemu-storage-daemon-qmp-ref.7
48@man man/man8/qemu-nbd.8
49@man man/man8/qemu-pr-helper.8
50share/applications/qemu.desktop
51share/doc/pkg-readmes/${PKGSTEM}
52share/doc/qemu/.buildinfo
53share/doc/qemu/_static/
54share/doc/qemu/_static/basic.css
55share/doc/qemu/_static/css/
56share/doc/qemu/_static/css/badge_only.css
57share/doc/qemu/_static/css/fonts/
58share/doc/qemu/_static/css/fonts/Roboto-Slab-Bold.woff
59share/doc/qemu/_static/css/fonts/Roboto-Slab-Bold.woff2
60share/doc/qemu/_static/css/fonts/Roboto-Slab-Regular.woff
61share/doc/qemu/_static/css/fonts/Roboto-Slab-Regular.woff2
62share/doc/qemu/_static/css/fonts/fontawesome-webfont.eot
63share/doc/qemu/_static/css/fonts/fontawesome-webfont.svg
64share/doc/qemu/_static/css/fonts/fontawesome-webfont.ttf
65share/doc/qemu/_static/css/fonts/fontawesome-webfont.woff
66share/doc/qemu/_static/css/fonts/fontawesome-webfont.woff2
67share/doc/qemu/_static/css/fonts/lato-bold-italic.woff
68share/doc/qemu/_static/css/fonts/lato-bold-italic.woff2
69share/doc/qemu/_static/css/fonts/lato-bold.woff
70share/doc/qemu/_static/css/fonts/lato-bold.woff2
71share/doc/qemu/_static/css/fonts/lato-normal-italic.woff
72share/doc/qemu/_static/css/fonts/lato-normal-italic.woff2
73share/doc/qemu/_static/css/fonts/lato-normal.woff
74share/doc/qemu/_static/css/fonts/lato-normal.woff2
75share/doc/qemu/_static/css/theme.css
76share/doc/qemu/_static/custom.js
77share/doc/qemu/_static/doctools.js
78share/doc/qemu/_static/documentation_options.js
79share/doc/qemu/_static/file.png
80share/doc/qemu/_static/js/
81share/doc/qemu/_static/js/badge_only.js
82share/doc/qemu/_static/js/theme.js
83share/doc/qemu/_static/language_data.js
84share/doc/qemu/_static/minus.png
85share/doc/qemu/_static/plus.png
86share/doc/qemu/_static/pygments.css
87share/doc/qemu/_static/qemu_128x128.png
88share/doc/qemu/_static/qemu_32x32.png
89share/doc/qemu/_static/searchtools.js
90share/doc/qemu/_static/sphinx_highlight.js
91share/doc/qemu/_static/theme_overrides.css
92share/doc/qemu/about/
93share/doc/qemu/about/build-platforms.html
94share/doc/qemu/about/deprecated.html
95share/doc/qemu/about/index.html
96share/doc/qemu/about/license.html
97share/doc/qemu/about/removed-features.html
98share/doc/qemu/dbus-dbusindex.html
99share/doc/qemu/devel/
100share/doc/qemu/devel/acpi-bits.html
101share/doc/qemu/devel/atomics.html
102share/doc/qemu/devel/bitops.html
103share/doc/qemu/devel/block-coroutine-wrapper.html
104share/doc/qemu/devel/build-system.html
105share/doc/qemu/devel/ci.html
106share/doc/qemu/devel/clocks.html
107share/doc/qemu/devel/code-of-conduct.html
108share/doc/qemu/devel/conflict-resolution.html
109share/doc/qemu/devel/control-flow-integrity.html
110share/doc/qemu/devel/decodetree.html
111share/doc/qemu/devel/ebpf_rss.html
112share/doc/qemu/devel/fuzzing.html
113share/doc/qemu/devel/index-api.html
114share/doc/qemu/devel/index-build.html
115share/doc/qemu/devel/index-internals.html
116share/doc/qemu/devel/index-process.html
117share/doc/qemu/devel/index-tcg.html
118share/doc/qemu/devel/index.html
119share/doc/qemu/devel/kconfig.html
120share/doc/qemu/devel/loads-stores.html
121share/doc/qemu/devel/maintainers.html
122share/doc/qemu/devel/memory.html
123share/doc/qemu/devel/migration.html
124share/doc/qemu/devel/modules.html
125share/doc/qemu/devel/multi-process.html
126share/doc/qemu/devel/multi-thread-tcg.html
127share/doc/qemu/devel/qapi-code-gen.html
128share/doc/qemu/devel/qgraph.html
129share/doc/qemu/devel/qom.html
130share/doc/qemu/devel/qtest.html
131share/doc/qemu/devel/replay.html
132share/doc/qemu/devel/reset.html
133share/doc/qemu/devel/s390-dasd-ipl.html
134share/doc/qemu/devel/secure-coding-practices.html
135share/doc/qemu/devel/stable-process.html
136share/doc/qemu/devel/style.html
137share/doc/qemu/devel/submitting-a-patch.html
138share/doc/qemu/devel/submitting-a-pull-request.html
139share/doc/qemu/devel/tcg-icount.html
140share/doc/qemu/devel/tcg-plugins.html
141share/doc/qemu/devel/tcg.html
142share/doc/qemu/devel/testing.html
143share/doc/qemu/devel/tracing.html
144share/doc/qemu/devel/trivial-patches.html
145share/doc/qemu/devel/ui.html
146share/doc/qemu/devel/vfio-migration.html
147share/doc/qemu/devel/virtio-backends.html
148share/doc/qemu/devel/writing-monitor-commands.html
149share/doc/qemu/genindex.html
150share/doc/qemu/index.html
151share/doc/qemu/interop/barrier.html
152share/doc/qemu/interop/bitmaps.html
153share/doc/qemu/interop/dbus-display.html
154share/doc/qemu/interop/dbus-vmstate.html
155share/doc/qemu/interop/dbus.html
156share/doc/qemu/interop/index.html
157share/doc/qemu/interop/live-block-operations.html
158share/doc/qemu/interop/pr-helper.html
159share/doc/qemu/interop/qemu-qmp-ref.html
160share/doc/qemu/interop/qemu-storage-daemon-qmp-ref.html
161share/doc/qemu/interop/vhost-user-gpu.html
162share/doc/qemu/interop/vhost-user.html
163share/doc/qemu/interop/vhost-vdpa.html
164share/doc/qemu/interop/virtio-balloon-stats.html
165share/doc/qemu/objects.inv
166share/doc/qemu/search.html
167share/doc/qemu/searchindex.js
168share/doc/qemu/specs/
169share/doc/qemu/specs/acpi_cpu_hotplug.html
170share/doc/qemu/specs/acpi_erst.html
171share/doc/qemu/specs/acpi_hest_ghes.html
172share/doc/qemu/specs/acpi_hw_reduced_hotplug.html
173share/doc/qemu/specs/acpi_mem_hotplug.html
174share/doc/qemu/specs/acpi_nvdimm.html
175share/doc/qemu/specs/acpi_pci_hotplug.html
176share/doc/qemu/specs/fw_cfg.html
177share/doc/qemu/specs/index.html
178share/doc/qemu/specs/ppc-spapr-hcalls.html
179share/doc/qemu/specs/ppc-spapr-hotplug.html
180share/doc/qemu/specs/ppc-spapr-numa.html
181share/doc/qemu/specs/ppc-spapr-uv-hcalls.html
182share/doc/qemu/specs/ppc-spapr-xive.html
183share/doc/qemu/specs/ppc-xive.html
184share/doc/qemu/specs/sev-guest-firmware.html
185share/doc/qemu/specs/tpm.html
186share/doc/qemu/system/
187share/doc/qemu/system/arm/
188share/doc/qemu/system/arm/aspeed.html
189share/doc/qemu/system/arm/collie.html
190share/doc/qemu/system/arm/cpu-features.html
191share/doc/qemu/system/arm/cubieboard.html
192share/doc/qemu/system/arm/digic.html
193share/doc/qemu/system/arm/emcraft-sf2.html
194share/doc/qemu/system/arm/emulation.html
195share/doc/qemu/system/arm/gumstix.html
196share/doc/qemu/system/arm/highbank.html
197share/doc/qemu/system/arm/imx25-pdk.html
198share/doc/qemu/system/arm/integratorcp.html
199share/doc/qemu/system/arm/kzm.html
200share/doc/qemu/system/arm/mainstone.html
201share/doc/qemu/system/arm/mps2.html
202share/doc/qemu/system/arm/musca.html
203share/doc/qemu/system/arm/musicpal.html
204share/doc/qemu/system/arm/nrf.html
205share/doc/qemu/system/arm/nseries.html
206share/doc/qemu/system/arm/nuvoton.html
207share/doc/qemu/system/arm/orangepi.html
208share/doc/qemu/system/arm/palm.html
209share/doc/qemu/system/arm/raspi.html
210share/doc/qemu/system/arm/realview.html
211share/doc/qemu/system/arm/sabrelite.html
212share/doc/qemu/system/arm/sbsa.html
213share/doc/qemu/system/arm/stellaris.html
214share/doc/qemu/system/arm/stm32.html
215share/doc/qemu/system/arm/sx1.html
216share/doc/qemu/system/arm/versatile.html
217share/doc/qemu/system/arm/vexpress.html
218share/doc/qemu/system/arm/virt.html
219share/doc/qemu/system/arm/xlnx-versal-virt.html
220share/doc/qemu/system/arm/xscale.html
221share/doc/qemu/system/authz.html
222share/doc/qemu/system/barrier.html
223share/doc/qemu/system/bootindex.html
224share/doc/qemu/system/confidential-guest-support.html
225share/doc/qemu/system/cpu-hotplug.html
226share/doc/qemu/system/device-emulation.html
227share/doc/qemu/system/devices/
228share/doc/qemu/system/devices/can.html
229share/doc/qemu/system/devices/canokey.html
230share/doc/qemu/system/devices/ccid.html
231share/doc/qemu/system/devices/cxl.html
232share/doc/qemu/system/devices/ivshmem.html
233share/doc/qemu/system/devices/net.html
234share/doc/qemu/system/devices/nvme.html
235share/doc/qemu/system/devices/usb.html
236share/doc/qemu/system/devices/vhost-user-rng.html
237share/doc/qemu/system/devices/vhost-user.html
238share/doc/qemu/system/devices/virtio-pmem.html
239share/doc/qemu/system/gdb.html
240share/doc/qemu/system/generic-loader.html
241share/doc/qemu/system/guest-loader.html
242share/doc/qemu/system/i386/
243share/doc/qemu/system/i386/amd-memory-encryption.html
244share/doc/qemu/system/i386/cpu.html
245share/doc/qemu/system/i386/hyperv.html
246share/doc/qemu/system/i386/kvm-pv.html
247share/doc/qemu/system/i386/microvm.html
248share/doc/qemu/system/i386/pc.html
249share/doc/qemu/system/i386/sgx.html
250share/doc/qemu/system/images.html
251share/doc/qemu/system/index.html
252share/doc/qemu/system/invocation.html
253share/doc/qemu/system/keys.html
254share/doc/qemu/system/linuxboot.html
255share/doc/qemu/system/loongarch/
256share/doc/qemu/system/loongarch/loongson3.html
257share/doc/qemu/system/managed-startup.html
258share/doc/qemu/system/monitor.html
259share/doc/qemu/system/multi-process.html
260share/doc/qemu/system/mux-chardev.html
261share/doc/qemu/system/openrisc/
262share/doc/qemu/system/openrisc/cpu-features.html
263share/doc/qemu/system/openrisc/emulation.html
264share/doc/qemu/system/openrisc/or1k-sim.html
265share/doc/qemu/system/openrisc/virt.html
266share/doc/qemu/system/ppc/
267share/doc/qemu/system/ppc/embedded.html
268share/doc/qemu/system/ppc/powermac.html
269share/doc/qemu/system/ppc/powernv.html
270share/doc/qemu/system/ppc/ppce500.html
271share/doc/qemu/system/ppc/prep.html
272share/doc/qemu/system/ppc/pseries.html
273share/doc/qemu/system/pr-manager.html
274share/doc/qemu/system/qemu-block-drivers.html
275share/doc/qemu/system/qemu-cpu-models.html
276share/doc/qemu/system/qemu-manpage.html
277share/doc/qemu/system/quickstart.html
278share/doc/qemu/system/replay.html
279share/doc/qemu/system/riscv/
280share/doc/qemu/system/riscv/microchip-icicle-kit.html
281share/doc/qemu/system/riscv/shakti-c.html
282share/doc/qemu/system/riscv/sifive_u.html
283share/doc/qemu/system/riscv/virt.html
284share/doc/qemu/system/s390x/
285share/doc/qemu/system/s390x/3270.html
286share/doc/qemu/system/s390x/bootdevices.html
287share/doc/qemu/system/s390x/css.html
288share/doc/qemu/system/s390x/protvirt.html
289share/doc/qemu/system/s390x/vfio-ap.html
290share/doc/qemu/system/s390x/vfio-ccw.html
291share/doc/qemu/system/secrets.html
292share/doc/qemu/system/security.html
293share/doc/qemu/system/target-arm.html
294share/doc/qemu/system/target-avr.html
295share/doc/qemu/system/target-i386.html
296share/doc/qemu/system/target-m68k.html
297share/doc/qemu/system/target-mips.html
298share/doc/qemu/system/target-openrisc.html
299share/doc/qemu/system/target-ppc.html
300share/doc/qemu/system/target-riscv.html
301share/doc/qemu/system/target-rx.html
302share/doc/qemu/system/target-s390x.html
303share/doc/qemu/system/target-sparc.html
304share/doc/qemu/system/target-sparc64.html
305share/doc/qemu/system/target-xtensa.html
306share/doc/qemu/system/targets.html
307share/doc/qemu/system/tls.html
308share/doc/qemu/system/virtio-net-failover.html
309share/doc/qemu/system/vnc-security.html
310share/doc/qemu/tools/
311share/doc/qemu/tools/index.html
312share/doc/qemu/tools/qemu-img.html
313share/doc/qemu/tools/qemu-nbd.html
314share/doc/qemu/tools/qemu-pr-helper.html
315share/doc/qemu/tools/qemu-storage-daemon.html
316share/doc/qemu/tools/qemu-trace-stap.html
317share/doc/qemu/tools/virtfs-proxy-helper.html
318share/doc/qemu/tools/virtiofsd.html
319share/doc/qemu/user/
320share/doc/qemu/user/index.html
321share/doc/qemu/user/main.html
322share/examples/qemu/qemu-ifdown
323@mode 755
324@sample ${SYSCONFDIR}/qemu-ifdown
325@mode
326share/examples/qemu/qemu-ifup
327@mode 755
328@sample ${SYSCONFDIR}/qemu-ifup
329@mode
330share/icons/hicolor/128x128/apps/qemu.png
331share/icons/hicolor/16x16/apps/qemu.png
332share/icons/hicolor/24x24/apps/qemu.png
333share/icons/hicolor/256x256/apps/qemu.png
334share/icons/hicolor/32x32/apps/qemu.bmp
335share/icons/hicolor/32x32/apps/qemu.png
336share/icons/hicolor/48x48/apps/qemu.png
337share/icons/hicolor/512x512/apps/qemu.png
338share/icons/hicolor/64x64/apps/qemu.png
339share/icons/hicolor/scalable/apps/qemu.svg
340share/locale/bg/LC_MESSAGES/qemu.mo
341share/locale/de_DE/
342share/locale/de_DE/LC_MESSAGES/
343share/locale/de_DE/LC_MESSAGES/qemu.mo
344share/locale/fr_FR/
345share/locale/fr_FR/LC_MESSAGES/
346share/locale/fr_FR/LC_MESSAGES/qemu.mo
347share/locale/hu/LC_MESSAGES/qemu.mo
348share/locale/it/LC_MESSAGES/qemu.mo
349share/locale/sv/LC_MESSAGES/qemu.mo
350share/locale/tr/LC_MESSAGES/qemu.mo
351share/locale/uk/LC_MESSAGES/qemu.mo
352share/locale/zh_CN/LC_MESSAGES/qemu.mo
353share/qemu/
354share/qemu/QEMU,cgthree.bin
355share/qemu/QEMU,tcx.bin
356share/qemu/bamboo.dtb
357share/qemu/bios-256k.bin
358share/qemu/bios-microvm.bin
359share/qemu/bios.bin
360share/qemu/canyonlands.dtb
361share/qemu/edk2-aarch64-code.fd
362share/qemu/edk2-arm-code.fd
363share/qemu/edk2-arm-vars.fd
364share/qemu/edk2-i386-code.fd
365share/qemu/edk2-i386-secure-code.fd
366share/qemu/edk2-i386-vars.fd
367share/qemu/edk2-licenses.txt
368share/qemu/edk2-x86_64-code.fd
369share/qemu/edk2-x86_64-secure-code.fd
370share/qemu/efi-e1000.rom
371share/qemu/efi-e1000e.rom
372share/qemu/efi-eepro100.rom
373share/qemu/efi-ne2k_pci.rom
374share/qemu/efi-pcnet.rom
375share/qemu/efi-rtl8139.rom
376share/qemu/efi-virtio.rom
377share/qemu/efi-vmxnet3.rom
378share/qemu/firmware/
379share/qemu/firmware/50-edk2-i386-secure.json
380share/qemu/firmware/50-edk2-x86_64-secure.json
381share/qemu/firmware/60-edk2-aarch64.json
382share/qemu/firmware/60-edk2-arm.json
383share/qemu/firmware/60-edk2-i386.json
384share/qemu/firmware/60-edk2-x86_64.json
385share/qemu/hppa-firmware.img
386share/qemu/keymaps/
387share/qemu/keymaps/ar
388share/qemu/keymaps/bepo
389share/qemu/keymaps/cz
390share/qemu/keymaps/da
391share/qemu/keymaps/de
392share/qemu/keymaps/de-ch
393share/qemu/keymaps/en-gb
394share/qemu/keymaps/en-us
395share/qemu/keymaps/es
396share/qemu/keymaps/et
397share/qemu/keymaps/fi
398share/qemu/keymaps/fo
399share/qemu/keymaps/fr
400share/qemu/keymaps/fr-be
401share/qemu/keymaps/fr-ca
402share/qemu/keymaps/fr-ch
403share/qemu/keymaps/hr
404share/qemu/keymaps/hu
405share/qemu/keymaps/is
406share/qemu/keymaps/it
407share/qemu/keymaps/ja
408share/qemu/keymaps/lt
409share/qemu/keymaps/lv
410share/qemu/keymaps/mk
411share/qemu/keymaps/nl
412share/qemu/keymaps/no
413share/qemu/keymaps/pl
414share/qemu/keymaps/pt
415share/qemu/keymaps/pt-br
416share/qemu/keymaps/ru
417share/qemu/keymaps/sl
418share/qemu/keymaps/sv
419share/qemu/keymaps/th
420share/qemu/keymaps/tr
421share/qemu/kvmvapic.bin
422share/qemu/linuxboot.bin
423share/qemu/linuxboot_dma.bin
424share/qemu/multiboot.bin
425share/qemu/multiboot_dma.bin
426share/qemu/npcm7xx_bootrom.bin
427share/qemu/openbios-ppc
428share/qemu/openbios-sparc32
429share/qemu/openbios-sparc64
430share/qemu/opensbi-riscv32-generic-fw_dynamic.bin
431share/qemu/opensbi-riscv64-generic-fw_dynamic.bin
432share/qemu/palcode-clipper
433share/qemu/petalogix-ml605.dtb
434share/qemu/petalogix-s3adsp1800.dtb
435share/qemu/pvh.bin
436share/qemu/pxe-e1000.rom
437share/qemu/pxe-eepro100.rom
438share/qemu/pxe-ne2k_pci.rom
439share/qemu/pxe-pcnet.rom
440share/qemu/pxe-rtl8139.rom
441share/qemu/pxe-virtio.rom
442share/qemu/qboot.rom
443share/qemu/qemu-nsis.bmp
444share/qemu/qemu_vga.ndrv
445share/qemu/s390-ccw.img
446share/qemu/s390-netboot.img
447share/qemu/sgabios.bin
448share/qemu/skiboot.lid
449share/qemu/slof.bin
450share/qemu/trace-events-all
451share/qemu/u-boot-sam460-20100605.bin
452share/qemu/u-boot.e500
453share/qemu/vgabios-ati.bin
454share/qemu/vgabios-bochs-display.bin
455share/qemu/vgabios-cirrus.bin
456share/qemu/vgabios-qxl.bin
457share/qemu/vgabios-ramfb.bin
458share/qemu/vgabios-stdvga.bin
459share/qemu/vgabios-virtio.bin
460share/qemu/vgabios-vmware.bin
461share/qemu/vgabios.bin
462share/qemu/vof-nvram.bin
463share/qemu/vof.bin
464@tag update-desktop-database
465@tag gtk-update-icon-cache %D/share/icons/hicolor
diff --git a/emulators/qemu/pkg/README-ga b/emulators/qemu/pkg/README-ga
deleted file mode 100644
index 963a88e..0000000
--- a/emulators/qemu/pkg/README-ga
+++ /dev/null
@@ -1,25 +0,0 @@
1+-----------------------------------------------------------------------
2| Running ${PKGSTEM} on OpenBSD
3+-----------------------------------------------------------------------
4
5To use qemu-ga, configure QEMU to present the guest agent interface as
6an isa-serial port.
7
8If you use Proxmox Virtual Environment, you can do this in the "Options"
9section; edit "QEMU Guest Agent", enable it, tick the box to show advanced
10settings, and set "Type" to ISA.
11
12An rc.d(8) script is provided; as usual you can enable it to start at
13boot with:
14
15# rcctl enable qemu_ga
16
17By default the script uses /dev/cua01 for the connection as would be
18the case where you have also enabled a serial console device. If you have
19not done this and the Guest Agent interface is on a different port, set
20that with e.g.
21
22# rcctl set qemu_ga flags -t /var/run/qemu-ga \
23 -f /var/run/qemu-ga/qemu-ga.pid -m isa-serial -p /dev/cua00
24
25Currently only a basic set of commands are available via this interface.
diff --git a/emulators/qemu/pkg/qemu_ga.rc b/emulators/qemu/pkg/qemu_ga.rc
deleted file mode 100644
index d2d3f50..0000000
--- a/emulators/qemu/pkg/qemu_ga.rc
+++ /dev/null
@@ -1,14 +0,0 @@
1#!/bin/ksh
2
3daemon="${TRUEPREFIX}/bin/qemu-ga -d"
4daemon_flags="-t /var/run/qemu-ga -f /var/run/qemu-ga/qemu-ga.pid"
5
6. /etc/rc.d/rc.subr
7
8rc_reload=NO
9
10rc_pre() {
11 install -d -o ${daemon_user} /var/run/qemu-ga
12}
13
14rc_cmd $1