1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Fast CPU emulator and virtualizer for x86 platform
8 HOMEPAGE= https://www.qemu.org/
12 SITES[main]= https://download.qemu.org/
13 DISTFILE[1]= qemu-6.0.0.tar.xz:main
15 SPKGS[standard]= complete
20 OPTIONS_AVAILABLE= none
21 OPTIONS_STANDARD= none
23 BUILD_DEPENDS= texi2html:primary:standard
24 python-Sphinx:single:python_default
25 BUILDRUN_DEPENDS= nettle:primary:standard
26 fontconfig:primary:standard
27 freetype:primary:standard
28 gnutls:primary:standard
29 cyrus-sasl:primary:standard
32 libepoxy:single:standard
33 snappy:single:standard
35 USES= cpe gmake pkgconfig bison perl:build python:build
36 jpeg png mesa gettext-runtime gettext-tools ncurses
37 makeinfo ninja zstd lzo
38 GNOME_COMPONENTS= gdkpixbuf gtk2 vte
39 SDL_COMPONENTS= sdl2 image2
40 XORG_COMPONENTS= x11 xext
42 LICENSE= GPLv2:primary
43 LICENSE_TERMS= primary:{{WRKSRC}}/LICENSE
44 LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING
47 FPC_EQUIVALENT= emulators/qemu
50 CONFIGURE_ARGS= --disable-usb-redir
51 --disable-stack-protector
61 --python={{PYTHON_CMD}}
64 BUILD_WRKSRC= {{WRKSRC}}/build
65 MAKE_ENV= BSD_MAKE="{{MAKE}}"
68 INSTALL_WRKSRC= {{WRKSRC}}/build
69 PLIST_SUB= JQUERY=3.5.1
72 CFLAGS= -I{{NCURSESBASE}}/include/ncursesw
73 VAR_OPSYS[freebsd]= CONFIGURE_ARGS=--enable-netmap
74 CONFIGURE_ARGS=--disable-linux-user
75 CONFIGURE_ARGS=--disable-linux-aio
76 VAR_OPSYS[linux]= CONFIGURE_ARGS=--disable-netmap
77 VAR_OPSYS[dragonfly]= CONFIGURE_ARGS=--disable-netmap
78 CONFIGURE_ARGS=--disable-linux-user
79 CONFIGURE_ARGS=--disable-linux-aio
82 # silence some include warnings
83 ${MKDIR} ${WRKSRC}/bsd-user/dragonfly
86 # for some reason file is considered out-of-date
87 ${TOUCH} ${WRKSRC}/config-host.mak
90 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample \
91 ${STAGEDIR}${PREFIX}/etc
92 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample \
93 ${STAGEDIR}${PREFIX}/etc
94 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
95 (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${STD_DOCDIR}/)
96 # remove empty directories
97 ${RM} -r ${STAGEDIR}/var
99 [FILE:782:descriptions/desc.primary]
100 QEMU is a fast processor emulator using dynamic translation to achieve
101 good emulation speed. QEMU has two operating modes:
103 * Full system emulation. In this mode, QEMU emulates a full system (for
104 example a PC), including a processor and various peripherials. It can
105 be used to launch different Operating Systems without rebooting the PC
106 or to debug system code.
107 * User mode emulation (Linux host only). In this mode, QEMU can launch
108 Linux processes compiled for one CPU on another CPU. It can be used to
109 launch the Wine Windows API emulator or to ease cross-compilation and
112 As QEMU requires no host kernel patches to run, it is safe and easy to use.
114 See also the preconfigured system images on http://oszoo.org/
115 Many live cd isos also work.
119 87bc1a471ca24b97e7005711066007d443423d19aacda3d442558ae032fa30b9 107333232 qemu-6.0.0.tar.xz
122 [FILE:3550:manifests/plist.primary]
123 @sample etc/qemu-ifdown.sample
124 @sample etc/qemu-ifup.sample
157 %%ONLY-LINUX%%libexec/qemu-bridge-helper
177 qemu-system-microblaze
178 qemu-system-microblazeel
201 share/applications/qemu.desktop
202 share/icons/hicolor/128x128/apps/qemu.png
203 share/icons/hicolor/16x16/apps/qemu.png
204 share/icons/hicolor/24x24/apps/qemu.png
205 share/icons/hicolor/256x256/apps/qemu.png
206 share/icons/hicolor/32x32/apps/
209 share/icons/hicolor/48x48/apps/qemu.png
210 share/icons/hicolor/512x512/apps/qemu.png
211 share/icons/hicolor/64x64/apps/qemu.png
212 share/icons/hicolor/scalable/apps/qemu.svg
215 qemu-storage-daemon.1.gz
218 qemu-block-drivers.7.gz
222 qemu-storage-daemon-qmp-ref.7.gz
239 edk2-i386-secure-code.fd
243 edk2-x86_64-secure-code.fd
261 opensbi-riscv32-generic-fw_dynamic.bin
262 opensbi-riscv32-generic-fw_dynamic.elf
263 opensbi-riscv64-generic-fw_dynamic.bin
264 opensbi-riscv64-generic-fw_dynamic.elf
267 petalogix-s3adsp1800.dtb
284 u-boot-sam460-20100605.bin
287 vgabios-bochs-display.bin
296 50-edk2-i386-secure.json
297 50-edk2-x86_64-secure.json
339 [FILE:8027:manifests/plist.docs]
347 share/doc/qemu/_static/
352 documentation_options.js
361 underscore-%%UNDERSCORE%%.js
363 share/doc/qemu/devel/
366 block-coroutine-wrapper.html
370 conflict-resolution.html
371 control-flow-integrity.html
380 multi-thread-tcg.html
386 secure-coding-practices.html
396 amd-memory-encryption.txt
398 block-replication.txt
404 confidential-guest-support.txt
412 multi-thread-compression.txt
416 pci_expander_bridge.txt
422 qemu-option-trace.rst.inc
432 virtio-balloon-stats.txt
434 xen-save-devices-state.txt
435 share/doc/qemu/docs/_templates/editpage.html
436 share/doc/qemu/docs/config/
438 mach-virt-graphical.cfg
441 q35-virtio-graphical.cfg
442 q35-virtio-serial.cfg
443 share/doc/qemu/docs/devel/
448 block-coroutine-wrapper.rst
452 conflict-resolution.rst
453 control-flow-integrity.rst
464 multiple-iothreads.txt
473 secure-coding-practices.rst
482 writing-qmp-commands.txt
483 share/doc/qemu/docs/devel/_templates/editpage.html
484 share/doc/qemu/docs/interop/
490 live-block-operations.rst
500 qemu-storage-daemon-qmp-ref.rst
507 vnc-ledstate-Pseudo-encoding.txt
508 share/doc/qemu/docs/interop/_templates/editpage.html
509 share/doc/qemu/docs/specs/
512 acpi_hw_reduced_hotplug.rst
524 ppc-spapr-hotplug.txt
526 ppc-spapr-uv-hcalls.txt
537 share/doc/qemu/docs/specs/_templates/editpage.html
538 share/doc/qemu/docs/sphinx/
545 share/doc/qemu/docs/sphinx/__pycache__/
546 depfile.cpython-38.pyc
547 hxtool.cpython-38.pyc
548 kerneldoc.cpython-38.pyc
549 kernellog.cpython-38.pyc
550 qapidoc.cpython-38.pyc
551 qmp_lexer.cpython-38.pyc
552 share/doc/qemu/docs/spin/
554 aio_notify_accept.promela
555 aio_notify_bug.promela
556 tcg-exclusive.promela
557 win32-qemu-event.promela
558 share/doc/qemu/docs/system/
561 cpu-models-mips.rst.inc
562 cpu-models-x86.rst.inc
564 device-url-syntax.rst.inc
584 qemu-block-drivers.rst
585 qemu-block-drivers.rst.inc
593 target-i386-desc.rst.inc
607 virtio-net-failover.rst
610 share/doc/qemu/docs/system/_templates/editpage.html
611 share/doc/qemu/docs/system/arm/
636 share/doc/qemu/docs/system/i386/
639 share/doc/qemu/docs/system/ppc/
645 share/doc/qemu/docs/system/riscv/
646 microchip-icicle-kit.rst
648 share/doc/qemu/docs/system/s390x/
655 share/doc/qemu/docs/tools/
660 qemu-storage-daemon.rst
662 virtfs-proxy-helper.rst
664 share/doc/qemu/docs/tools/_templates/editpage.html
665 share/doc/qemu/docs/user/
668 share/doc/qemu/docs/user/_templates/editpage.html
669 share/doc/qemu/interop/
674 live-block-operations.html
679 qemu-storage-daemon-qmp-ref.html
683 share/doc/qemu/specs/
685 acpi_hw_reduced_hotplug.html
691 share/doc/qemu/system/
712 qemu-block-drivers.html
716 removed-features.html
733 virtio-net-failover.html
736 share/doc/qemu/system/arm/
759 xlnx-versal-virt.html
761 share/doc/qemu/system/i386/
764 share/doc/qemu/system/ppc/
770 share/doc/qemu/system/riscv/
771 microchip-icicle-kit.html
773 share/doc/qemu/system/s390x/
780 share/doc/qemu/tools/
785 qemu-storage-daemon.html
787 virtfs-proxy-helper.html
794 [FILE:297:manifests/plist.nls]
795 share/locale/bg/LC_MESSAGES/qemu.mo
796 share/locale/de_DE/LC_MESSAGES/qemu.mo
797 share/locale/fr_FR/LC_MESSAGES/qemu.mo
798 share/locale/hu/LC_MESSAGES/qemu.mo
799 share/locale/it/LC_MESSAGES/qemu.mo
800 share/locale/sv/LC_MESSAGES/qemu.mo
801 share/locale/tr/LC_MESSAGES/qemu.mo
802 share/locale/zh_CN/LC_MESSAGES/qemu.mo
805 [FILE:365:patches/patch-disas_libvixl_vixl_a64_disasm-a64.cc]
806 --- disas/libvixl/vixl/a64/disasm-a64.cc.orig 2021-04-29 17:18:58 UTC
807 +++ disas/libvixl/vixl/a64/disasm-a64.cc
808 @@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffse
810 abs_offset = -abs_offset;
812 - AppendToOutput("#%c0x%" PRIx64, sign, abs_offset);
813 + AppendToOutput("#%c0x%" PRIx64, sign, offset < 0 ? -offset : offset);
819 [FILE:1232:patches/patch-meson.build]
820 --- meson.build.orig 2021-04-29 17:18:58 UTC
822 @@ -607,15 +607,16 @@ if have_system and not get_option('curse
823 has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
826 - curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw'])
827 + libtinfo = cc.find_library('tinfow', required: false, static: enable_static)
828 + curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw'])
829 foreach curses_libname : curses_libname_list
830 libcurses = cc.find_library(curses_libname,
832 kwargs: static_kwargs)
834 - if cc.links(curses_test, args: curses_compile_args, dependencies: libcurses)
835 + if cc.links(curses_test, args: curses_compile_args, dependencies: [libcurses,libtinfo])
836 curses = declare_dependency(compile_args: curses_compile_args,
837 - dependencies: [libcurses])
838 + dependencies: [libcurses, libtinfo])
841 msg = 'curses library not usable'
844 [FILE:423:patches/patch-net_tap-bsd.c]
845 --- net/tap-bsd.c.orig 2021-04-29 17:18:58 UTC
849 #if defined(__NetBSD__) || defined(__FreeBSD__)
850 #include <sys/ioctl.h>
851 +#include <sys/socket.h>
853 #include <net/if_tap.h>
855 +#if defined(__DragonFly)
856 +#include <sys/ioctl.h>
857 +#include <sys/socket.h>
859 +#include <net/tap/if_tap.h>
862 #if defined(__OpenBSD__)
863 #include <sys/param.h>
866 [FILE:314:patches/patch-util_getauxval.c]
867 --- util/getauxval.c.orig 2021-04-29 17:18:59 UTC
869 @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned lo
873 -#elif defined(__FreeBSD__)
874 +#elif defined(__FreeBSD__) && __FreeBSD_version__ > 1200001
875 #include <sys/auxv.h>
877 unsigned long qemu_getauxval(unsigned long type)
880 [FILE:7685:files/pkg-message-single]
884 - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
885 networking as non-root. Don't forget to adjust device node permissions in
888 - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
889 still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
890 i've been told that that's normal. (fixed on FreeSBIE 1.1.) And you have
891 to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
892 routed to 127.1 on the host.
894 - Expect timer problems when guest kernel HZ is > hosts, for example time
895 sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
896 with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
897 and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.)
898 The linux 2.6 kernel uses 1000 by default btw. (changed to 250 later, and
899 recent linux kernels now no longer have a fixed HZ, aka `tickless
900 kernel'...) Enabling /dev/rtc doesn't seem to help either (not included
901 since it needs a patch to emulators/rtc.)
903 - Update: the above problem has gotten worse with FreeBSD guests
904 somewhere before 8.0, mainly since the kernel now usually wants
905 double or even quadruple number of timer irqs compared to HZ if
906 it detects an apic (and at least early versions of FreeBSD 8 had
907 a bug that essentially halved qemu's clock rate too); the only
908 reason you usually don't see symptoms of this with FreeBSD 8
909 guests is they automatically reduce their HZ to 100 when running
910 in a VM while the default for the host kernel is still HZ=1000.
911 Workaround: you can disable the apic clock in the guest by setting
913 hint.apic.0.clock="0"
915 in loader.conf(5) (or manually at the loader prompt), if that
916 doesn't work the only things you can do is either reduce the
917 guest's HZ to, say, 100 by setting e.g.
921 from the loader as above (which usually is a good idea in a VM
922 anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
923 increase the host's HZ to 2000 or even 4000 from the loader in
926 - The -smb option (smb-export local dir to guest using the default
927 slirp networking) needs the samba port/package installed
928 in addition to qemu. (SAMBA knob.)
930 - If you want to use usb devices connected to the host in the guest
931 yot need either recent 10-current (not tested yet much) or you can
932 use usbredir over the network (see below); also unless you are
933 running qemu as root you then need to fix permissions for /dev/ugen*
934 device nodes: if you are on 5.x or later (devfs) put a rule in
935 /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
936 restart. Example devfs.rules:
939 add path 'ugen*' mode 660 group operator
941 corresponding rc.conf line:
943 devfs_system_ruleset="ugen_ruleset"
945 - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
946 option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
948 http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
954 1) Start usbredirserver for a usb device:
955 sudo usbredirserver 045e:0772
956 2) Start qemu with usb2 support + a chardev talking to usbredirserver +
957 a usb-redir device using this chardev:
959 -readconfig docs/ich9-ehci-uhci.cfg \
960 -chardev socket,id=usbredirchardev,host=localhost,port=4000 \
961 -device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
963 [you would replace docs/ich9-ehci-uhci.cfg with e.g.
964 /raven/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
965 ehci was broken for me here with FreeBSD guests and the previous
966 qemu version at least, I got:
968 FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet processing error - resetting ehci HC
969 Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
971 The new qemu version works better tho.]
973 - Still usb: since the hub is no longer attached to the uchi controller and
974 the wakeup mechanism, resume interrupt is not implemented yet linux guests
975 will suspend the bus, i.e. they wont see devices usb_add'ed after its
976 (linux') uhci module got loaded. Workaround: either add devices before
977 linux loads the module or rmmod and modprobe it afterwards. [Not sure
978 if this still applies to the new libusb host code used on recent
981 - If you build qemu wihout SDL and then get crashes running it try passing it
982 -nographic. This should probably be default in that case...
984 - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
985 multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
988 cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
990 and then use pxeboot-qemu. Actually you need recent btx code
991 (from after 7.0 was released) because of the real mode boot
992 problem, so use at least pxeboot from there. And I just did that
993 for the pxeboot extracted out of
995 ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
999 http://people.freebsd.org/~nox/qemu/pxeboot-qemu
1001 - If you use slirp (usernet, the default) and want to mount nfs into the guest
1002 and you are not running qemu as root, then mountd(8) on the exporting box
1003 needs to be run with -n in order to accept requests from ports >= 1024.
1005 - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
1006 least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
1007 now, see this thread:
1009 http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
1011 the consensus on that thread seems to be that qcow(2) code has always been
1012 experimental and you should use raw images if you want reliability; raw is
1013 also usually faster.) You should be able to migrate existing images to raw
1014 using qemu-img(1)'s convert function; raw doesn't support advanced features
1015 like snapshots tho. [a few important qcow2 bugfixed have been committed in
1016 the meantime so this _might_ be less of an issue now; and meanwhile there
1017 also is the new qed format - I don't know how stable that one is.]
1019 - (also not FreeBSD-specific:) It is recommended to pass raw images using the
1020 new -drive syntax, specifying format=raw explicitly in order to avoid
1021 malicious guests being able to exploit the format autodetection thats
1022 otherwise getting used. (Not that you should run malicious guests anyway,
1023 but this eleminates at least a known attack vector.)
1025 - qemu now has improved physical cdrom support, but still there is at
1026 least one known problem: you need to have the guest eject the disc if you
1027 want to change it/take it out, or otherwise the guest may continue using
1028 state (like size) of the old disc. (You can also do like `change ide1-cd0
1029 /dev/acd0' in the monitor after taking out the disc if a guest cannot eject
1032 - The default configuration location (qemu-ifup script etc.) has been changed
1033 from /etc to PREFIX/etc (usually /raven/etc). Move your files accordingly.
1035 - The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
1036 with only one exception: Advanced features like TSO used on the host
1037 interface can cause oversize packets which now do get truncated to avoid
1038 confusing/panicing guests but of course still will cause retransmissions.
1039 So if you see slow throughput and `pcap_send: packet size > ..., truncating'
1040 messages on qemu's tty try disabling TSO etc on the host interface at least
1044 [FILE:20:files/qemu-ifdown.sample]
1049 [FILE:20:files/qemu-ifup.sample]
1054 [FILE:436:dragonfly/patch-disas_libvixl_vixl_utils.h]
1055 --- disas/libvixl/vixl/utils.h.orig 2021-04-29 17:18:58 UTC
1056 +++ disas/libvixl/vixl/utils.h
1057 @@ -42,6 +42,13 @@ namespace vixl {
1058 #define PRINTF_CHECK(format_index, varargs_index)
1062 +#define INT32_C(c) c
1063 +#define INT64_C(c) (c ## LL)
1064 +#define UINT32_C(c) (c ## U)
1065 +#define UINT64_C(c) (c ## ULL)
1068 // Check number width.
1069 inline bool is_intn(unsigned n, int64_t x) {
1070 VIXL_ASSERT((0 < n) && (n < 64));
1073 [FILE:323:dragonfly/patch-hw-ppc_newworld.c]
1074 --- hw/ppc/mac_newworld.c.orig 2021-04-29 17:18:58 UTC
1075 +++ hw/ppc/mac_newworld.c
1077 #include "hw/sysbus.h"
1080 +/* FreeBSD headers define this */
1085 #define MAX_IDE_BUS 2
1086 #define CFG_ADDR 0xf0000510
1087 #define TBFREQ (100UL * 1000UL * 1000UL)
1090 [FILE:358:dragonfly/patch-hw_ppc_mac__oldworld.c]
1091 --- hw/ppc/mac_oldworld.c.orig 2021-04-29 17:18:58 UTC
1092 +++ hw/ppc/mac_oldworld.c
1094 #define PROM_BASE 0xffc00000
1095 #define PROM_SIZE (4 * MiB)
1097 +/* FreeBSD headers define this */
1102 static void fw_cfg_boot_set(void *opaque, const char *boot_device,
1107 [FILE:906:dragonfly/patch-util_coroutine-ucontext.c]
1108 --- util/coroutine-ucontext.c.orig 2021-04-29 17:18:59 UTC
1109 +++ util/coroutine-ucontext.c
1110 @@ -221,7 +221,15 @@ Coroutine *qemu_coroutine_new(void)
1111 2, arg.i[0], arg.i[1]);
1113 /* swapcontext() in, siglongjmp() back out */
1114 - if (!sigsetjmp(old_env, 0)) {
1115 + /* Save signal mask in this sigsetjmp, because makecontext on DragonFly
1116 + * leaves all signals blocked when entering the new context with
1118 + * Workaround this, by just having the signal mask restored by the
1119 + * siglongjmp that brings us back from qemu_coroutine_new().
1120 + * XXX Remove this workaround when the makecontext behaviour is fixed
1123 + if (!sigsetjmp(old_env, 1)) {
1124 start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, co->stack,
1126 start_switch_fiber_tsan(&fake_stack_save,