# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= qemu VERSION= 9.0.0 KEYWORDS= emulators VARIANTS= standard SDESC[standard]= Fast CPU emulator and virtualizer for x86 platform HOMEPAGE= https://www.qemu.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://download.qemu.org/ DISTFILE[1]= qemu-9.0.0.tar.xz:main DF_INDEX= 1 SPKGS[standard]= complete primary dev docs nls man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= gnutls:dev:standard harfbuzz:dev:standard libepoxy:dev:standard nettle:dev:standard python-Sphinx:single:python_used python-sphinx-rtd-theme:single:python_used snappy:dev:standard texi2html:primary:standard meson:single:standard xorg-xkeyboard-config:primary:standard libxkbcommon:dev:standard BUILDRUN_DEPENDS= cyrus-sasl:primary:standard gnutls:primary:standard libepoxy:primary:standard nettle:primary:standard snappy:primary:standard vde2:single:standard USES= cpe gmake pkgconfig bison perl:build python:build jpeg png ncurses makeinfo ninja curl fontconfig zstd lzo GNOME_COMPONENTS= gdkpixbuf gtk2 vte SDL_COMPONENTS= sdl2 image2 XORG_COMPONENTS= x11 xext LICENSE= GPLv2:primary LICENSE_TERMS= primary:{{WRKSRC}}/LICENSE LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo FPC_EQUIVALENT= emulators/qemu MUST_CONFIGURE= yes CONFIGURE_ARGS= --disable-usb-redir --disable-stack-protector --disable-kvm --disable-xen --disable-vde --enable-docs --enable-nettle --enable-curses --prefix={{PREFIX}} --cc={{CC}} --python={{PYTHON_CMD}} --localstatedir=/var BUILD_WRKSRC= {{WRKSRC}}/build MAKE_ENV= BSD_MAKE="{{MAKE}}" V=1 INSTALL_WRKSRC= {{WRKSRC}}/build PLIST_SUB= JQUERY=3.6.0 UNDERSCORE=1.13.1 CFLAGS= -I{{NCURSESBASE}}/include/ncursesw VAR_OPSYS[freebsd]= CONFIGURE_ARGS=--enable-netmap CONFIGURE_ARGS=--disable-linux-user CONFIGURE_ARGS=--disable-linux-aio VAR_OPSYS[linux]= CONFIGURE_ARGS=--disable-netmap CONFIGURE_ARGS=--disable-linux-user VAR_OPSYS[dragonfly]= CONFIGURE_ARGS=--disable-netmap CONFIGURE_ARGS=--disable-linux-user CONFIGURE_ARGS=--disable-linux-aio VAR_OPSYS[midnightbsd]= CONFIGURE_ARGS=--enable-netmap CONFIGURE_ARGS=--disable-linux-user CONFIGURE_ARGS=--disable-linux-aio CONFIGURE_ARGS=--extra-ldflags=-lutil post-patch: # silence some include warnings ${MKDIR} ${WRKSRC}/bsd-user/dragonfly # support midnight ${CP} -a ${WRKSRC}/bsd-user/freebsd ${WRKSRC}/bsd-user/midnightbsd post-install: ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample \ ${STAGEDIR}${PREFIX}/etc ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample \ ${STAGEDIR}${PREFIX}/etc ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/elf2dmp ${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/qemu/palcode-clipper ${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/qemu/hppa-firmware.img (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${STD_DOCDIR}/) # remove sphinx leftovers ${RM} -r ${STAGEDIR}${STD_DOCDIR}/docs/sphinx # remove empty directories ${RM} -r ${STAGEDIR}/var pre-configure-dragonfly: # On dragonfly, userland programs can't include ${REINPLACE_CMD} -e 's|sys/disk\.h|sys/skipdisk.h|' \ ${WRKSRC}/meson.build [FILE:782:descriptions/desc.primary] QEMU is a fast processor emulator using dynamic translation to achieve good emulation speed. QEMU has two operating modes: * Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including a processor and various peripherials. It can be used to launch different Operating Systems without rebooting the PC or to debug system code. * User mode emulation (Linux host only). In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU. It can be used to launch the Wine Windows API emulator or to ease cross-compilation and cross-debugging. As QEMU requires no host kernel patches to run, it is safe and easy to use. See also the preconfigured system images on http://oszoo.org/ Many live cd isos also work. [FILE:96:distinfo] 32708ac66c30d8c892633ea968c771c1c76d597d70ddead21a0d22ccf386da69 129789856 qemu-9.0.0.tar.xz [FILE:2948:manifests/plist.primary] @sample etc/qemu-ifdown.sample @sample etc/qemu-ifup.sample %%ONLY-FREEBSD%%bin/ qemu-arm qemu-ga qemu-i386 qemu-x86_64 %%ONLY-LINUX%%bin/ qemu-ga qemu-pr-helper %%ONLY-LINUX%%libexec/qemu-bridge-helper %%ONLY-MIDNIGHTBSD%%bin/ qemu-arm qemu-i386 qemu-x86_64 bin/ elf2dmp qemu-edid qemu-img qemu-io qemu-keymap qemu-nbd qemu-storage-daemon qemu-system-aarch64 qemu-system-alpha qemu-system-arm qemu-system-avr qemu-system-cris qemu-system-hppa qemu-system-i386 qemu-system-loongarch64 qemu-system-m68k qemu-system-microblaze qemu-system-microblazeel qemu-system-mips qemu-system-mips64 qemu-system-mips64el qemu-system-mipsel qemu-system-nios2 qemu-system-or1k qemu-system-ppc qemu-system-ppc64 qemu-system-riscv32 qemu-system-riscv64 qemu-system-rx qemu-system-s390x qemu-system-sh4 qemu-system-sh4eb qemu-system-sparc qemu-system-sparc64 qemu-system-tricore qemu-system-x86_64 qemu-system-xtensa qemu-system-xtensaeb share/applications/qemu.desktop share/icons/hicolor/128x128/apps/qemu.png share/icons/hicolor/16x16/apps/qemu.png share/icons/hicolor/24x24/apps/qemu.png share/icons/hicolor/256x256/apps/qemu.png share/icons/hicolor/32x32/apps/ qemu.bmp qemu.png share/icons/hicolor/48x48/apps/qemu.png share/icons/hicolor/512x512/apps/qemu.png share/icons/hicolor/64x64/apps/qemu.png share/icons/hicolor/scalable/apps/qemu.svg share/qemu/ QEMU,cgthree.bin QEMU,tcx.bin bamboo.dtb bios-256k.bin bios-microvm.bin bios.bin canyonlands.dtb edk2-aarch64-code.fd edk2-arm-code.fd edk2-arm-vars.fd edk2-i386-code.fd edk2-i386-secure-code.fd edk2-i386-vars.fd edk2-licenses.txt edk2-x86_64-code.fd edk2-x86_64-secure-code.fd efi-e1000.rom efi-e1000e.rom efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom hppa-firmware.img hppa-firmware64.img kvmvapic.bin linuxboot.bin linuxboot_dma.bin multiboot.bin multiboot_dma.bin npcm7xx_bootrom.bin openbios-ppc openbios-sparc32 openbios-sparc64 opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb pvh.bin pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom qboot.rom qemu-nsis.bmp qemu_vga.ndrv s390-ccw.img s390-netboot.img skiboot.lid slof.bin trace-events-all u-boot-sam460-20100605.bin u-boot.e500 vgabios-ati.bin vgabios-bochs-display.bin vgabios-cirrus.bin vgabios-qxl.bin vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin vgabios.bin vof-nvram.bin vof.bin share/qemu/firmware/ 50-edk2-i386-secure.json 50-edk2-x86_64-secure.json 60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json share/qemu/keymaps/ ar bepo cz da de de-ch en-gb en-us es et fi fo fr fr-be fr-ca fr-ch hr hu is it ja lt lv mk nl no pl pt pt-br ru sl sv th tr [FILE:92:manifests/plist.dev] include/ fdt.h libfdt.h libfdt_env.h qemu-plugin.h lib/libfdt.a lib/pkgconfig/libfdt.pc [FILE:11622:manifests/plist.docs] share/doc/qemu/ .buildinfo dbus-dbusindex.html genindex.html index.html objects.inv search.html searchindex.js share/doc/qemu/_static/ _sphinx_javascript_frameworks_compat.js basic.css custom.js doctools.js documentation_options.js file.png jquery.js language_data.js minus.png plus.png pygments.css qemu_128x128.png qemu_32x32.png searchtools.js sphinx_highlight.js theme_overrides.css share/doc/qemu/_static/css/ badge_only.css theme.css share/doc/qemu/_static/css/fonts/ Roboto-Slab-Bold.woff Roboto-Slab-Bold.woff2 Roboto-Slab-Regular.woff Roboto-Slab-Regular.woff2 fontawesome-webfont.eot fontawesome-webfont.svg fontawesome-webfont.ttf fontawesome-webfont.woff fontawesome-webfont.woff2 lato-bold-italic.woff lato-bold-italic.woff2 lato-bold.woff lato-bold.woff2 lato-normal-italic.woff lato-normal-italic.woff2 lato-normal.woff lato-normal.woff2 share/doc/qemu/_static/js/ badge_only.js html5shiv-printshiv.min.js html5shiv.min.js theme.js share/doc/qemu/about/ build-platforms.html deprecated.html emulation.html index.html license.html removed-features.html share/doc/qemu/devel/ acpi-bits.html atomics.html bitops.html block-coroutine-wrapper.html build-system.html ci.html clocks.html code-of-conduct.html conflict-resolution.html control-flow-integrity.html decodetree.html docs.html ebpf_rss.html fuzzing.html index-api.html index-build.html index-internals.html index-process.html index-tcg.html index.html kconfig.html loads-stores.html maintainers.html memory.html modules.html multi-process.html multi-thread-tcg.html pci.html qapi-code-gen.html qdev-api.html qgraph.html qom-api.html qom.html qtest.html replay.html reset.html s390-cpu-topology.html s390-dasd-ipl.html secure-coding-practices.html stable-process.html style.html submitting-a-patch.html submitting-a-pull-request.html tcg-icount.html tcg-ops.html tcg-plugins.html tcg.html testing.html tracing.html trivial-patches.html ui.html vfio-iommufd.html virtio-backends.html writing-monitor-commands.html zoned-storage.html share/doc/qemu/devel/migration/ CPR.html best-practices.html compatibility.html dirty-limit.html features.html index.html main.html mapped-ram.html postcopy.html vfio.html virtio.html share/doc/qemu/docs/ COLO-FT.txt block-replication.txt bypass-iommu.txt colo-proxy.txt conf.py defs.rst.inc igd-assign.txt image-fuzzer.txt index.rst memory-hotplug.txt meson.build multi-thread-compression.txt multiseat.txt nvdimm.txt pci_expander_bridge.txt pcie.txt pcie_pci_bridge.txt pcie_sriov.txt pvrdma.txt qcow2-cache.txt qdev-device-use.txt qemu-option-trace.rst.inc qemupciserial.inf rdma.txt requirements.txt spice-port-fqdn.txt throttle.txt xbzrle.txt xen-save-devices-state.txt share/doc/qemu/docs/_templates/footer.html share/doc/qemu/docs/about/ build-platforms.rst deprecated.rst emulation.rst index.rst license.rst removed-features.rst share/doc/qemu/docs/config/ ich9-ehci-uhci.cfg mach-virt-graphical.cfg mach-virt-serial.cfg q35-emulated.cfg q35-virtio-graphical.cfg q35-virtio-serial.cfg share/doc/qemu/docs/devel/ acpi-bits.rst atomics.rst bitops.rst blkdebug.txt blkverify.txt block-coroutine-wrapper.rst build-system.rst ci-definitions.rst.inc ci-jobs.rst.inc ci-runners.rst.inc ci.rst clocks.rst code-of-conduct.rst conflict-resolution.rst control-flow-integrity.rst decodetree.rst docs.rst ebpf_rss.rst fuzzing.rst index-api.rst index-build.rst index-internals.rst index-process.rst index-tcg.rst index.rst kconfig.rst loads-stores.rst lockcnt.txt maintainers.rst memory.rst modules.rst multi-process.rst multi-thread-tcg.rst multiple-iothreads.txt nested-papr.txt pci.rst qapi-code-gen.rst qdev-api.rst qgraph.rst qom-api.rst qom.rst qtest.rst rcu.txt replay.rst reset.rst s390-cpu-topology.rst s390-dasd-ipl.rst secure-coding-practices.rst stable-process.rst style.rst submitting-a-patch.rst submitting-a-pull-request.rst tcg-icount.rst tcg-ops.rst tcg-plugins.rst tcg.rst testing.rst tracing.rst trivial-patches.rst ui.rst vfio-iommufd.rst virtio-backends.rst writing-monitor-commands.rst zoned-storage.rst share/doc/qemu/docs/devel/migration/ CPR.rst best-practices.rst compatibility.rst dirty-limit.rst features.rst index.rst main.rst mapped-ram.rst postcopy.rst vfio.rst virtio.rst share/doc/qemu/docs/interop/ barrier.rst bitmaps.rst dbus-display.rst dbus-vmstate.rst dbus.rst firmware.json index.rst live-block-operations.rst nbd.txt parallels.txt pr-helper.rst prl-xml.txt qcow2.txt qed_spec.txt qemu-ga-ref.rst qemu-ga.rst qemu-qmp-ref.rst qemu-storage-daemon-qmp-ref.rst qmp-spec.rst vhost-user-gpu.rst vhost-user.json vhost-user.rst vhost-vdpa.rst virtio-balloon-stats.rst vnc-ledstate-pseudo-encoding.rst share/doc/qemu/docs/specs/ acpi_cpu_hotplug.rst acpi_erst.rst acpi_hest_ghes.rst acpi_hw_reduced_hotplug.rst acpi_mem_hotplug.rst acpi_nvdimm.rst acpi_pci_hotplug.rst edu.rst fsi.rst fw_cfg.rst index.rst ivshmem-spec.rst pci-ids.rst pci-serial.rst pci-testdev.rst ppc-spapr-hcalls.rst ppc-spapr-hotplug.rst ppc-spapr-numa.rst ppc-spapr-uv-hcalls.rst ppc-spapr-xive.rst ppc-xive.rst pvpanic.rst rocker.txt sev-guest-firmware.rst standard-vga.rst tpm.rst virt-ctlr.rst vmcoreinfo.rst vmgenid.rst vmw_pvscsi-spec.rst share/doc/qemu/docs/sphinx-static/ custom.js theme_overrides.css share/doc/qemu/docs/spin/ aio_notify.promela aio_notify_accept.promela aio_notify_bug.promela tcg-exclusive.promela win32-qemu-event.promela share/doc/qemu/docs/system/ authz.rst barrier.rst bootindex.rst confidential-guest-support.rst cpu-hotplug.rst cpu-models-mips.rst.inc cpu-models-x86-abi.csv cpu-models-x86.rst.inc device-emulation.rst device-url-syntax.rst.inc gdb.rst generic-loader.rst guest-loader.rst images.rst index.rst introduction.rst invocation.rst keys.rst keys.rst.inc linuxboot.rst managed-startup.rst monitor.rst multi-process.rst mux-chardev.rst mux-chardev.rst.inc pr-manager.rst qemu-block-drivers.rst qemu-block-drivers.rst.inc qemu-cpu-models.rst qemu-manpage.rst replay.rst secrets.rst security.rst target-arm.rst target-avr.rst target-i386-desc.rst.inc target-i386.rst target-m68k.rst target-mips.rst target-openrisc.rst target-ppc.rst target-riscv.rst target-rx.rst target-s390x.rst target-sparc.rst target-sparc64.rst target-xtensa.rst targets.rst tls.rst virtio-net-failover.rst vm-templating.rst vnc-security.rst share/doc/qemu/docs/system/arm/ aspeed.rst b-l475e-iot01a.rst bananapi_m2u.rst collie.rst cpu-features.rst cubieboard.rst digic.rst emcraft-sf2.rst emulation.rst gumstix.rst highbank.rst imx25-pdk.rst integratorcp.rst kzm.rst mainstone.rst mps2.rst musca.rst musicpal.rst nrf.rst nseries.rst nuvoton.rst orangepi.rst palm.rst raspi.rst realview.rst sabrelite.rst sbsa.rst stellaris.rst stm32.rst sx1.rst versatile.rst vexpress.rst virt.rst xenpvh.rst xlnx-versal-virt.rst xscale.rst share/doc/qemu/docs/system/devices/ can.rst canokey.rst ccid.rst cxl.rst igb.rst ivshmem.rst keyboard.rst net.rst nvme.rst usb-u2f.rst usb.rst vhost-user-input.rst vhost-user-rng.rst vhost-user.rst virtio-gpu.rst virtio-pmem.rst virtio-snd.rst share/doc/qemu/docs/system/i386/ amd-memory-encryption.rst cpu.rst hyperv.rst kvm-pv.rst microvm.rst pc.rst sgx.rst xen.rst share/doc/qemu/docs/system/loongarch/virt.rst share/doc/qemu/docs/system/openrisc/ cpu-features.rst emulation.rst or1k-sim.rst virt.rst share/doc/qemu/docs/system/ppc/ amigang.rst embedded.rst powermac.rst powernv.rst ppce500.rst prep.rst pseries.rst share/doc/qemu/docs/system/riscv/ microchip-icicle-kit.rst shakti-c.rst sifive_u.rst virt.rst share/doc/qemu/docs/system/s390x/ 3270.rst bootdevices.rst cpu-topology.rst css.rst pcidevices.rst protvirt.rst vfio-ap.rst vfio-ccw.rst share/doc/qemu/docs/tools/ index.rst qemu-img.rst qemu-nbd.rst qemu-pr-helper.rst qemu-storage-daemon.rst qemu-trace-stap.rst virtfs-proxy-helper.rst share/doc/qemu/docs/user/ index.rst main.rst share/doc/qemu/interop/ barrier.html bitmaps.html dbus-display.html dbus-vmstate.html dbus.html index.html live-block-operations.html pr-helper.html qemu-ga-ref.html qemu-ga.html qemu-qmp-ref.html qemu-storage-daemon-qmp-ref.html qmp-spec.html vhost-user-gpu.html vhost-user.html vhost-vdpa.html virtio-balloon-stats.html vnc-ledstate-pseudo-encoding.html share/doc/qemu/specs/ acpi_cpu_hotplug.html acpi_erst.html acpi_hest_ghes.html acpi_hw_reduced_hotplug.html acpi_mem_hotplug.html acpi_nvdimm.html acpi_pci_hotplug.html edu.html fsi.html fw_cfg.html index.html ivshmem-spec.html pci-ids.html pci-serial.html pci-testdev.html ppc-spapr-hcalls.html ppc-spapr-hotplug.html ppc-spapr-numa.html ppc-spapr-uv-hcalls.html ppc-spapr-xive.html ppc-xive.html pvpanic.html sev-guest-firmware.html standard-vga.html tpm.html virt-ctlr.html vmcoreinfo.html vmgenid.html vmw_pvscsi-spec.html share/doc/qemu/system/ authz.html barrier.html bootindex.html confidential-guest-support.html cpu-hotplug.html device-emulation.html gdb.html generic-loader.html guest-loader.html images.html index.html introduction.html invocation.html keys.html linuxboot.html managed-startup.html monitor.html multi-process.html mux-chardev.html pr-manager.html qemu-block-drivers.html qemu-cpu-models.html qemu-manpage.html replay.html secrets.html security.html target-arm.html target-avr.html target-i386.html target-m68k.html target-mips.html target-openrisc.html target-ppc.html target-riscv.html target-rx.html target-s390x.html target-sparc.html target-sparc64.html target-xtensa.html targets.html tls.html virtio-net-failover.html vm-templating.html vnc-security.html share/doc/qemu/system/arm/ aspeed.html b-l475e-iot01a.html bananapi_m2u.html collie.html cpu-features.html cubieboard.html digic.html emcraft-sf2.html emulation.html gumstix.html highbank.html imx25-pdk.html integratorcp.html kzm.html mainstone.html mps2.html musca.html musicpal.html nrf.html nseries.html nuvoton.html orangepi.html palm.html raspi.html realview.html sabrelite.html sbsa.html stellaris.html stm32.html sx1.html versatile.html vexpress.html virt.html xenpvh.html xlnx-versal-virt.html xscale.html share/doc/qemu/system/devices/ can.html canokey.html ccid.html cxl.html igb.html ivshmem.html keyboard.html net.html nvme.html usb-u2f.html usb.html vhost-user-input.html vhost-user-rng.html vhost-user.html virtio-gpu.html virtio-pmem.html virtio-snd.html share/doc/qemu/system/i386/ amd-memory-encryption.html cpu.html hyperv.html kvm-pv.html microvm.html pc.html sgx.html xen.html share/doc/qemu/system/loongarch/virt.html share/doc/qemu/system/openrisc/ cpu-features.html emulation.html or1k-sim.html virt.html share/doc/qemu/system/ppc/ amigang.html embedded.html powermac.html powernv.html ppce500.html prep.html pseries.html share/doc/qemu/system/riscv/ microchip-icicle-kit.html shakti-c.html sifive_u.html virt.html share/doc/qemu/system/s390x/ 3270.html bootdevices.html cpu-topology.html css.html pcidevices.html protvirt.html vfio-ap.html vfio-ccw.html share/doc/qemu/tools/ index.html qemu-img.html qemu-nbd.html qemu-pr-helper.html qemu-storage-daemon.html qemu-trace-stap.html virtfs-proxy-helper.html share/doc/qemu/user/ index.html main.html [FILE:333:manifests/plist.nls] share/locale/bg/LC_MESSAGES/qemu.mo share/locale/de_DE/LC_MESSAGES/qemu.mo share/locale/fr_FR/LC_MESSAGES/qemu.mo share/locale/hu/LC_MESSAGES/qemu.mo share/locale/it/LC_MESSAGES/qemu.mo share/locale/sv/LC_MESSAGES/qemu.mo share/locale/tr/LC_MESSAGES/qemu.mo share/locale/uk/LC_MESSAGES/qemu.mo share/locale/zh_CN/LC_MESSAGES/qemu.mo [FILE:416:manifests/plist.man] %%ONLY-FREEBSD%%share/man/man7/qemu-ga-ref.7.gz %%ONLY-FREEBSD%%share/man/man8/qemu-ga.8.gz %%ONLY-LINUX%%share/man/man7/qemu-ga-ref.7.gz %%ONLY-LINUX%%share/man/man8/qemu-ga.8.gz share/man/man1/ qemu-img.1.gz qemu-storage-daemon.1.gz qemu.1.gz share/man/man7/ qemu-block-drivers.7.gz qemu-cpu-models.7.gz qemu-qmp-ref.7.gz qemu-storage-daemon-qmp-ref.7.gz share/man/man8/ qemu-nbd.8.gz qemu-pr-helper.8.gz [FILE:414:patches/patch-accel_tcg_translate-all.c] --- accel/tcg/translate-all.c.orig 2024-04-23 20:23:45 UTC +++ accel/tcg/translate-all.c @@ -27,7 +27,7 @@ #include "qemu.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include -#if __FreeBSD_version >= 700104 +#if defined(__MidnightBSD__) || __FreeBSD_version >= 700104 #define HAVE_KINFO_GETVMMAP #define sigqueue sigqueue_freebsd /* avoid redefinition */ #include [FILE:831:patches/patch-bsd-user_freebsd_os-sys.c] --- bsd-user/freebsd/os-sys.c.orig 2024-04-23 20:23:45 UTC +++ bsd-user/freebsd/os-sys.c @@ -426,7 +426,9 @@ static abi_long do_freebsd_sysctl_oid(CP switch (snamep[1]) { case CTL_SYSCTL_NEXT: case CTL_SYSCTL_NAME2OID: +#ifdef CTL_SYSCTL_NEXTNOSKIP case CTL_SYSCTL_NEXTNOSKIP: +#endif /* * All of these return an OID array, so we need to convert to * target. @@ -439,7 +441,9 @@ static abi_long do_freebsd_sysctl_oid(CP sysctl_oidfmt(holdp); break; case CTL_SYSCTL_OIDDESCR: +#ifdef CTL_SYSCTL_OIDLABEL case CTL_SYSCTL_OIDLABEL: +#endif default: /* Handle it based on the type */ h2g_old_sysctl(holdp, &holdlen, kind); [FILE:2433:patches/patch-meson.build] --- meson.build.orig 2024-04-23 20:23:45 UTC +++ meson.build @@ -43,8 +43,8 @@ qemu_icondir = get_option('datadir') / ' genh = [] qapi_trace_events = [] -bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin'] -supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] +bsd_oses = ['midnightbsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin'] +supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'dragonfly', 'midnightbsd'] supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64', 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64'] @@ -737,7 +737,7 @@ if get_option('hvf').allowed() endif nvmm = not_found -if host_os == 'netbsd' +if host_os in ['netbsd', 'dragonfly'] nvmm = cc.find_library('nvmm', required: get_option('nvmm')) if nvmm.found() accelerators += 'CONFIG_NVMM' @@ -1310,7 +1310,7 @@ if have_system and get_option('curses'). return 0; }''' - curses_dep_list = host_os == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw'] + curses_dep_list = host_os == 'windows' ? ['ncurses', 'ncursesw'] : ['ncurses'] curses = dependency(curses_dep_list, required: false, method: 'pkg-config') @@ -1333,14 +1333,15 @@ if have_system and get_option('curses'). has_curses_h = cc.has_header('curses.h', args: curses_compile_args) endif if has_curses_h - curses_libname_list = (host_os == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw']) + libtinfo = cc.find_library('tinfo', required: false, static: enable_static) + curses_libname_list = (host_os == 'windows' ? ['pdcurses'] : ['ncurses']) foreach curses_libname : curses_libname_list libcurses = cc.find_library(curses_libname, required: false) if libcurses.found() - if cc.links(curses_test, args: curses_compile_args, dependencies: libcurses) + if cc.links(curses_test, args: curses_compile_args, dependencies: [libcurses, libtinfo]) curses = declare_dependency(compile_args: curses_compile_args, - dependencies: [libcurses]) + dependencies: [libcurses, libtinfo]) break else msg = 'curses library not usable' [FILE:454:patches/patch-net_tap-bsd.c] --- net/tap-bsd.c.orig 2024-04-23 20:23:45 UTC +++ net/tap-bsd.c @@ -30,9 +30,16 @@ #if defined(__NetBSD__) || defined(__FreeBSD__) #include +#include #include #include #endif +#if defined(__DragonFly) +#include +#include +#include +#include +#endif #ifndef __FreeBSD__ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, [FILE:828:patches/patch-roms_u-boot_include_compiler.h] --- roms/u-boot/include/compiler.h.orig 2024-04-23 20:24:31 UTC +++ roms/u-boot/include/compiler.h @@ -14,6 +14,7 @@ defined(__NetBSD__) || \ defined(__FreeBSD__) || \ defined(__sun__) || \ + defined(__DragonFly__) || \ defined(__APPLE__) # include #elif defined(__linux__) || defined(__WIN32__) || defined(__MINGW32__) || defined(__OpenBSD__) @@ -45,10 +46,10 @@ #ifdef __linux__ # include # include -#elif defined(__MACH__) || defined(__FreeBSD__) +#elif defined(__MACH__) || defined(__FreeBSD__) || defined(__DragonFly__) # include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) # include /* htole32 and friends */ # define __BYTE_ORDER BYTE_ORDER # define __LITTLE_ENDIAN LITTLE_ENDIAN [FILE:311:patches/patch-roms_u-boot_lib_bch.c] --- roms/u-boot/lib/bch.c.orig 2024-04-23 20:24:31 UTC +++ roms/u-boot/lib/bch.c @@ -63,7 +63,7 @@ #include #else #include -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) #include #elif defined(__APPLE__) #include [FILE:344:patches/patch-util_getauxval.c] --- util/getauxval.c.orig 2024-04-23 20:23:46 UTC +++ util/getauxval.c @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned lo return 0; } -#elif defined(__FreeBSD__) +#elif defined(__MidnightBSD__) || (defined(__FreeBSD__) && __FreeBSD_version__ > 1200001) #include unsigned long qemu_getauxval(unsigned long type) [FILE:388:patches/patch-util_meson.build] --- util/meson.build.orig 2024-04-23 20:23:46 UTC +++ util/meson.build @@ -13,7 +13,7 @@ if host_os != 'windows' util_ss.add(files('event_notifier-posix.c')) util_ss.add(files('mmap-alloc.c')) freebsd_dep = [] - if host_os == 'freebsd' + if host_os in ['freebsd', 'dragonfly', 'midnightbsd'] freebsd_dep = util endif util_ss.add(files('oslib-posix.c'), freebsd_dep) [FILE:7685:files/pkg-message-single] FreeBSD host notes ================== - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap* networking as non-root. Don't forget to adjust device node permissions in /etc/devfs.rules. - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but i've been told that that's normal. (fixed on FreeSBIE 1.1.) And you have to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is routed to 127.1 on the host. - Expect timer problems when guest kernel HZ is > hosts, for example time sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000, and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.) The linux 2.6 kernel uses 1000 by default btw. (changed to 250 later, and recent linux kernels now no longer have a fixed HZ, aka `tickless kernel'...) Enabling /dev/rtc doesn't seem to help either (not included since it needs a patch to emulators/rtc.) - Update: the above problem has gotten worse with FreeBSD guests somewhere before 8.0, mainly since the kernel now usually wants double or even quadruple number of timer irqs compared to HZ if it detects an apic (and at least early versions of FreeBSD 8 had a bug that essentially halved qemu's clock rate too); the only reason you usually don't see symptoms of this with FreeBSD 8 guests is they automatically reduce their HZ to 100 when running in a VM while the default for the host kernel is still HZ=1000. Workaround: you can disable the apic clock in the guest by setting hint.apic.0.clock="0" in loader.conf(5) (or manually at the loader prompt), if that doesn't work the only things you can do is either reduce the guest's HZ to, say, 100 by setting e.g. kern.hz="100" from the loader as above (which usually is a good idea in a VM anyway and FreeBSD 8 now does by itself as mentioned), or otherwise increase the host's HZ to 2000 or even 4000 from the loader in the same way. - The -smb option (smb-export local dir to guest using the default slirp networking) needs the samba port/package installed in addition to qemu. (SAMBA knob.) - If you want to use usb devices connected to the host in the guest yot need either recent 10-current (not tested yet much) or you can use usbredir over the network (see below); also unless you are running qemu as root you then need to fix permissions for /dev/ugen* device nodes: if you are on 5.x or later (devfs) put a rule in /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs restart. Example devfs.rules: [ugen_ruleset=20] add path 'ugen*' mode 660 group operator corresponding rc.conf line: devfs_system_ruleset="ugen_ruleset" - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR option) see this thread by Hans de Goede redhat.com>: http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183 Quote: Example usage: 1) Start usbredirserver for a usb device: sudo usbredirserver 045e:0772 2) Start qemu with usb2 support + a chardev talking to usbredirserver + a usb-redir device using this chardev: qemu -usb \ -readconfig docs/ich9-ehci-uhci.cfg \ -chardev socket,id=usbredirchardev,host=localhost,port=4000 \ -device usb-redir,chardev=usbredirchardev,id=usbredirdev ... [you would replace docs/ich9-ehci-uhci.cfg with e.g. /raven/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out ehci was broken for me here with FreeBSD guests and the previous qemu version at least, I got: FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet processing error - resetting ehci HC Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045. The new qemu version works better tho.] - Still usb: since the hub is no longer attached to the uchi controller and the wakeup mechanism, resume interrupt is not implemented yet linux guests will suspend the bus, i.e. they wont see devices usb_add'ed after its (linux') uhci module got loaded. Workaround: either add devices before linux loads the module or rmmod and modprobe it afterwards. [Not sure if this still applies to the new libusb host code used on recent 10-current.] - If you build qemu wihout SDL and then get crashes running it try passing it -nographic. This should probably be default in that case... - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot) you can do like cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu and then use pxeboot-qemu. Actually you need recent btx code (from after 7.0 was released) because of the real mode boot problem, so use at least pxeboot from there. And I just did that for the pxeboot extracted out of ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso and placed it here: http://people.freebsd.org/~nox/qemu/pxeboot-qemu - If you use slirp (usernet, the default) and want to mount nfs into the guest and you are not running qemu as root, then mountd(8) on the exporting box needs to be run with -n in order to accept requests from ports >= 1024. - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at least) win2k guests on recent kvm (which uses similar qcow2 code than qemu now, see this thread: http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html - the consensus on that thread seems to be that qcow(2) code has always been experimental and you should use raw images if you want reliability; raw is also usually faster.) You should be able to migrate existing images to raw using qemu-img(1)'s convert function; raw doesn't support advanced features like snapshots tho. [a few important qcow2 bugfixed have been committed in the meantime so this _might_ be less of an issue now; and meanwhile there also is the new qed format - I don't know how stable that one is.] - (also not FreeBSD-specific:) It is recommended to pass raw images using the new -drive syntax, specifying format=raw explicitly in order to avoid malicious guests being able to exploit the format autodetection thats otherwise getting used. (Not that you should run malicious guests anyway, but this eleminates at least a known attack vector.) - qemu now has improved physical cdrom support, but still there is at least one known problem: you need to have the guest eject the disc if you want to change it/take it out, or otherwise the guest may continue using state (like size) of the old disc. (You can also do like `change ide1-cd0 /dev/acd0' in the monitor after taking out the disc if a guest cannot eject it itself.) - The default configuration location (qemu-ifup script etc.) has been changed from /etc to PREFIX/etc (usually /raven/etc). Move your files accordingly. - The pcap code (-net nic... -net pcap,ifname=...) should work properly now, with only one exception: Advanced features like TSO used on the host interface can cause oversize packets which now do get truncated to avoid confusing/panicing guests but of course still will cause retransmissions. So if you see slow throughput and `pcap_send: packet size > ..., truncating' messages on qemu's tty try disabling TSO etc on the host interface at least while using pcap. [FILE:20:files/qemu-ifdown.sample] #!/bin/sh exec true [FILE:20:files/qemu-ifup.sample] #!/bin/sh exec true [FILE:322:dragonfly/patch-hw-ppc_newworld.c] --- hw/ppc/mac_newworld.c.orig 2024-04-23 20:23:45 UTC +++ hw/ppc/mac_newworld.c @@ -75,6 +75,11 @@ #include "hw/sysbus.h" #include "trace.h" +/* FreeBSD headers define this */ +#ifdef round_page +#undef round_page +#endif + #define MAX_IDE_BUS 2 #define CFG_ADDR 0xf0000510 #define TBFREQ (25UL * 1000UL * 1000UL) [FILE:334:dragonfly/patch-hw_ppc_mac__oldworld.c] --- hw/ppc/mac_oldworld.c.orig 2024-04-23 20:23:45 UTC +++ hw/ppc/mac_oldworld.c @@ -66,6 +66,11 @@ #define GRACKLE_BASE 0xfec00000 +/* FreeBSD headers define this */ +#ifdef round_page +#undef round_page +#endif + static void fw_cfg_boot_set(void *opaque, const char *boot_device, Error **errp) { [FILE:844:dragonfly/patch-util_coroutine-ucontext.c] --- util/coroutine-ucontext.c.orig 2024-04-23 20:23:46 UTC +++ util/coroutine-ucontext.c @@ -160,7 +160,15 @@ static void coroutine_trampoline(int i0, co = &self->base; /* Initialize longjmp environment and switch back the caller */ - if (!sigsetjmp(self->env, 0)) { + if (!sigsetjmp(self->env, 1)) { + /* Save signal mask in this sigsetjmp, because makecontext on DragonFly + * leaves all signals blocked when entering the new context with + * swapcontext. + * Workaround this, by just having the signal mask restored by the + * siglongjmp that brings us back from qemu_coroutine_new(). + * XXX Remove this workaround when the makecontext behaviour is fixed + * on DragonFly. + */ CoroutineUContext *leaderp = get_ptr_leader(); start_switch_fiber_asan(&fake_stack_save,