summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorryoon <ryoon>2012-06-07 21:23:45 +0000
committerryoon <ryoon>2012-06-07 21:23:45 +0000
commit62c679c781e1e35b0e7027241dcd1c5e8be906c3 (patch)
tree43ff5b5a0a48f54788f2290ba8f07b9b883108f3 /emulators
parentf28b6d3ada0160012af2254ad2ccb0f36ee0a637 (diff)
downloadpkgsrc-62c679c781e1e35b0e7027241dcd1c5e8be906c3.tar.gz
Update to 1.1.0
* based on wip/qemu Changelog: 1.1.0 System emulation All targets qdev properties of type hex8 and hex32 used to accept hexadecimal values not prefixed with "0x"; the prefix is mandatory starting with this version. These properties are: iobase, membase, io_base for all devices that support the properties; vram_size for sysbus-g364 and SUNW,tcx; version for sb16 and iommu; ctl_iobase and data_iobase for fw_cfg; readback for debugcon; elcr_addr and elcr_mask for i8259. PCI addresses can still be addressed with a pair of hexadecimal device and function without a "0x" prefix. -kernel, -initrd and -append are now aliases for suboptions of -machine (for example -machine kernel=foo), and as such they are also available with -readconfig. PCI-to-PCI bridges are supported [...] PCI emulation includes a standard hot-plug controller [...] The coroutine backend can now be configured using configure --with-coroutine=.... A new coroutine backend sigaltstack is available for platforms that don't support the default ucontext backend. Last but not least: the SDL user interface now uses the new QEMU icon. ARM The syborg machine type has been removed since the Symbian Virtual Platform is no longer relevant with the disbanding of Symbian. A device tree can be passed to the kernel using -dtb option (or alternatively -machine dtb=...). New 'nuri' and 'smdkc210' models of Samsung Exynos4210 based devboards. New 'highbank' model of the Calxeda Highbank. New 'vexpress-a15' model of the Versatile Express Cortex-A15. PowerPC The Bamboo machine now works with TCG, before only KVM was able to execute 440 code. Pseries handles PCI, allowing for virtio devices with -M pseries. Pseries works with PR KVM allowing for -M pseries -enable-kvm to work on G5s. We can now emulate e500mc cores, but no e500mc based board is emulated yet. You need to use -M mpc8544ds and a special guest kernel. Timers on ppc405 now work and don't segfault QEMU. S/390 Added support to -kernel to allow booting of ELF binaries. Fixed -kernel to allow booting of newer guest kernels. Devices can now be hotplug add'ed (remove is not there yet). Rebooting a virtual machine now works. SPARC Added interrupt controller and support of vector interrupts. Fixed handling 32 bit instructions on a sparc64 CPU. Fixed block load instructions regression happened in 1.0 release. Fixed BCD mask in m48t59 emulation, so that Solaris 2.5.1 doesn't hang on sun4m emulation when day of month >21. Fixed initrd loading in qemu-system-sparc64. x86 NMIs are correctly injected through the LAPIC (rather than sent directly to the guest CPU) and respect the LINT1 mask, thus fixing kdump. The -rtc-td-hack option is now available as a qdev property (-global mc146818rtc.lost_tick_policy=slew) and as such can be specified in a -readconfig configuration file. When the system is suspended to RAM, QEMU will now stop executing the guest until a wakeup event occurs. Implemented wakeup events include key presses, mouse button presses, RTC alarm, ACPI timer expiration, serial console input (off by default; enable with -global isa-serial.wakeup=1), and the system_wakeup monitor command. KVM can optionally use kernel-based emulation of the local APIC, IOAPIC, i8259 PIC and i8254 PIT. This is supported with the -machine ...,kernel_irqchip=on command-line option. MSI is not supported yet when using the kernel_irqchip option. Emulation of a PC System Flash device. The feature is enabled by adding a pflash drive. This feature is not supported when KVM is enabled. See Features/PC System Flash for more information. KVM guests support Hyper-V enlightenments. These are enabled by the -cpu features hv_spinlocks, hv_relaxed and hv_vapic. Device emulation The virtio-scsi device is now supported by QEMU. The guest driver will be supported in Linux starting at version 3.4. QEMU now includes experimental support for USB 3.0 (xHCI). Various improvement on the floppy emulation, most notably media change has been fixed Audio devices Audio devices can now use volume control capabilities exposed by the PulseAudio and Spice backends. (Note: all audio devices do not expose their volume control unless --enable-mixemu is turned on). Block devices QEMU's NBD client implementation and the qemu-nbd server both fully support asynchronous I/O. The rbd block driver supports the discard operation now The vpc block driver supports the Fixed Disk subformat of VHD images now The new QMP command transaction can be used to perform a set of multiple snapshots atomically, rolling back to the original images if there is a problem along the way. See Features/SnapshotsMultipleDevices for more information. The new monitor command block_stream lets guest copy data from the backing file to the current image while the guest is running. This lets users enables quick provisioning of new virtual machines using shared remote storage, and lets the guest transition incrementally to fast local storage. An alternative to streaming is the copy-on-read option of the -drive command-line option, which only transfers data when the guest needs it. An experimental extension of the qcow2 file format has been introduced. With the implementation as of QEMU 1.1, the most important addition is zero clusters, which allows image streaming and copy-on-read to leave images sparse if the backing file they are copying from is sparse. In order to enable the extension, use qemu-img create -f qcow2 -o compat=1.1 <filename> <size> for creating the image. Note that older versions of QEMU won't be able to read such images. I/O throttling is experimentally supported using the new -drive options bps/bps_rd/bps_wr/iops/iops_rd/iops_wr. It is expected to work with virtio-blk and IDE harddisks, but may lead to hangs when used with CD-ROM or floppy emulation or other devices. qemu-io supports new options to enable tracing and to choose a cache modes Network devices QEMU supports a new type of network device, bridge (used with -net bridge or -netdev bridge). The new type is similar to tap, but uses a helper program instead of a script to attach the device to a bridge. The helper program can then be installed as setuid. The helper program supports a simple ACL and configuration mechanism, see the commit message and feature page for documentation. Live Migration, Save/Restore Live migration (or save/restore) from QEMU releases prior to 0.13 to QEMU 1.1 is not supported. Live migration supports IPv6. IPv6 addresses can be expressed as tcp:host:port. Brackets around a numeric host address are required if a port is also specified, otherwise they can be omitted. Guest agent qemu-ga has been ported to Windows. Interfaces added for suspending guests to disk/ram, and retrieving information about network interfaces Interfaces for filesystem freeze have been hardened, and no longer depend on guest agent runtime state to determine whether a system is currently frozen. An easier to use reset mechanism has been added: guest-sync-delimited. Host support ARM hosts are now supported again (they were broken in 1.0). Sockets and SLIRP on Windows hosts was broken in 0.14 and works again. 64-bit Windows hosts are now supported. User-mode emulation User-mode emulation can provide some information from the /proc filesystem. On 64-bit hosts user-mode emulation now defaults to reserving 0xf7000000 bytes of address space for the guest. This significantly reduces the likelihood of QEMU having to fail a guest mmap() request when there is still memory available. This reservation can be overridden with the -R command line option. Testing A make check target has been implemented and runs some quick sanity tests qemu-iotests, which was previously hosted in an external git repository, has been merged into the QEMU source tree Build dependencies Building QEMU requires glib 2.12 on POSIX systems, and glib 2.20 on Win32 systems. Changelog: 1.0.1 * Version 1.0.1 * Merge branch 's390-1.0' of git://repo.or.cz/qemu/agraf * Merge branch 'ppc-1.0' of git://repo.or.cz/qemu/agraf * e1000: bounds packet size against buffer size * s390: fix cpu hotplug / cpu activity on interrupts * s390x: add TR function for EXECUTE * pseries: Don't try to munmap() a malloc()ed TCE table * pseries: Populate "/chosen/linux,stdout-path" in the FDT * pseries: Add a routine to find a stable "default" vty and use it * pseries: Emit device tree nodes in reg order * kvm-ppc: halt secondary cpus when guest reset * pseries: Fix array overrun bug in PCI code * console: Fix segfault on screendump without VGA adapter * Merge branch 'master' of ssh://git.qemu.org/pub/git/qemu-stable-1.0 * rbd: always set out parameter in qemu_rbd_snap_list * Documentation: Add qemu-img -t parameter in man page * qemu-img rebase: Fix for undersized backing files * coroutine: switch per-thread free pool to a global pool * qiov: prevent double free or use-after-free * PPC: Fix linker scripts on ppc hosts * target-sh4: ignore ocbp and ocbwb instructions * usb-ohci: td.cbp incorrectly updated near page end * usb-host: properly release port on unplug & exit * usb-storage: cancel I/O on reset * Fix parse of usb device description with multiple configurations * pc: fix event_idx compatibility for virtio devices * pc: add pc-0.15 * cris: Handle conditional stores on CRISv10 * configure: Enable build by default PIE / read-only relocation sections on OpenBSD amd64/i386. * target-i386: fix cmpxchg instruction emulation * hw/9pfs: Use the correct signed type for different variables * hw/9pfs: replace iovec manipulation with QEMUIOVector * hw/9pfs: Use the correct file descriptor in Fsdriver Callback * hw/9pfs: Add qdev.reset callback for virtio-9p-pci device * hw/9pfs: Reset server state during TVERSION * hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted * hw/9pfs: Improve portability to older systems * exec.c: Fix subpage memory access to RAM MemoryRegion * malta: Fix regression (i8259 interrupts did not work) General i386-softmmu is no longer named qemu but instead referred to as qemu-system-i386 for better consistency with other targets. A new tool is likely to be introduced that uses the qemu name so distributions are advised to not undo this change. QEMU now uses a separate thread for VCPU execution. This merges the biggest difference between the qemu-kvm tree and upstream QEMU. A new memory dispatch API has been added internally. A new monitor command "info mtree" can show the hierarchy of memory regions in the guest. QEMU now has a build dependency on glib and makes extensive use of glib. QEMU now can run on more hosts. Hosts without a native code generator can use the TCG interpreter (TCI). See Features/TCI for more information. Block devices (disks) QEMU now supports I/O latency accounting in the monitor command "info blockstats". Errors are now tracked per device and are shown by the monitor command "info block". All image formats now support asynchronous operation. IDE and SCSI emulation will use this feature, while other devices (notably floppy and SD) will not. IDE/ATAPI A large number of bugs were fixed regarding CD media change and tray locking. SCSI Memory management errors could crash QEMU when scsi-disk encountered I/O errors. Many instances of this problem were fixed. The accuracy of error handling for SCSI emulation has been greatly improved. SCSI devices can now be addressed by channel, target (id) and LUN. Not all emulated HBAs will support this feature (in particular, the LSI controller will not). Block device pass through is now supported through a new scsi-block device. The scsi-block device works with block devices (like /dev/sda or /dev/sr0) rather than /dev/sgN devices, and is more efficient because it does not consume arbitrary amounts of memory when the guest does large data transfers. SCSI CD-ROMs now report media changed events. SCSI CD-ROMs now support DVD images. Bugfixes for IDE media change also apply to SCSI. SCSI devices now report a unit attention condition when the system is started or reset. This may cause problems with old firmware versions. VDI Now supports discarded blocks in dynamically-sized images. User-mode networking (SLIRP) SLIRP can process ARP replies and gratuitous ARP requests from the guest. ARM QEMU now supports the new Cortex-A15 instructions in linux-user mode (via "-cpu any"): VFPv4 fused multiply-accumulate (VFMA, VFMS, VFNMA, VFNMS) and also integer division (UDIV, SDIV). The vexpress-a9, versatileab, versatilepb and realview-* boards now have audio support. QEMU is known not to work on ARM hosts in this release. (ARM target emulation is fine.) pSeries sPAPR VIO devices can now be created with -device. Xtensa QEMU now supports DC232b and FSF xtensa CPU cores. QEMU now supports sim (similar to Tensilica ISS) and LX60/LX110/LX200 machines. Migration QEMU now supports live migration using image files like QCOW2 on shared storage
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile17
-rw-r--r--emulators/qemu/PLIST12
-rw-r--r--emulators/qemu/distinfo35
-rw-r--r--emulators/qemu/files/Makefile.multinode-NetBSD2
-rw-r--r--emulators/qemu/patches/patch-aa57
-rw-r--r--emulators/qemu/patches/patch-ao170
-rw-r--r--emulators/qemu/patches/patch-ba46
-rw-r--r--emulators/qemu/patches/patch-bb21
-rw-r--r--emulators/qemu/patches/patch-dd66
-rw-r--r--emulators/qemu/patches/patch-ed32
-rw-r--r--emulators/qemu/patches/patch-eg6
-rw-r--r--emulators/qemu/patches/patch-eh14
-rw-r--r--emulators/qemu/patches/patch-ei16
-rw-r--r--emulators/qemu/patches/patch-en8
-rw-r--r--emulators/qemu/patches/patch-et19
-rw-r--r--emulators/qemu/patches/patch-hw_ppc__newworld.c10
-rw-r--r--emulators/qemu/patches/patch-hw_ppc__oldworld.c10
-rw-r--r--emulators/qemu/patches/patch-hw_xilinx__axienet.c4
-rw-r--r--emulators/qemu/patches/patch-ioport.c12
-rw-r--r--emulators/qemu/patches/patch-memory.c29
-rw-r--r--emulators/qemu/patches/patch-roms_seabios_tools_buildversion.sh13
-rw-r--r--emulators/qemu/patches/patch-slirp_tcp__subr.c14
22 files changed, 124 insertions, 489 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 428218690a3..ec99f6f5761 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.90 2012/05/12 09:56:51 gson Exp $
+# $NetBSD: Makefile,v 1.91 2012/06/07 21:23:45 ryoon Exp $
-DISTNAME= qemu-0.15.1
-PKGREVISION= 5
+DISTNAME= qemu-1.1.0
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.qemu.org/
@@ -25,14 +25,17 @@ BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html
.include "../../mk/bsd.prefs.mk"
+CONFIGURE_ENV+= mansuffix=/${PKGMANDIR}
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --interp-prefix=${PREFIX}/share/qemu
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+= --python=${PYTHONBIN}
+CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
CONF_FILES= ${EGDIR}/target-x86_64.conf \
${PKG_SYSCONFDIR}/target-x86_64.conf
+CONF_FILES+= ${EGDIR}//cpus-x86_64.conf \
+ ${PKG_SYSCONFDIR}/cpus-x86_64.conf
EGDIR= ${PREFIX}/share/examples/qemu
INSTALL_MAKE_FLAGS= egdir=${EGDIR}
PKG_SYSCONFSUBDIR= qemu
@@ -51,6 +54,8 @@ SUBST_FILES.qaudio= arch_init.c monitor.c savevm.c vl.c \
hw/es1370.c \
hw/gus.c \
hw/hda-audio.c \
+ hw/lm4549.c \
+ hw/lm4549.h \
hw/marvell_88w8618_audio.c \
hw/milkymist-ac97.c \
hw/mips_fulong2e.c \
@@ -62,7 +67,9 @@ SUBST_FILES.qaudio= arch_init.c monitor.c savevm.c vl.c \
hw/sb16.c \
hw/spitz.c \
hw/tsc210x.c \
+ hw/usb/dev-audio.c \
hw/wm8750.c \
+ hw/z2.c \
ui/vnc.h
SUBST_SED.qaudio= -e s,audio.h\",qaudio.h\",g
SUBST_MESSAGE.qaudio= Fixing audio.h confusion
@@ -120,8 +127,6 @@ post-install:
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/extension.mk"
-.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
-.include "../../mk/terminfo.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/qemu/PLIST b/emulators/qemu/PLIST
index b8ca9e69832..5fa984b4a2f 100644
--- a/emulators/qemu/PLIST
+++ b/emulators/qemu/PLIST
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.27 2011/08/22 12:00:34 ryoon Exp $
-bin/qemu
+@comment $NetBSD: PLIST,v 1.28 2012/06/07 21:23:45 ryoon Exp $
${PLIST.alpha}bin/qemu-alpha
${PLIST.arm}bin/qemu-arm
${PLIST.armeb}bin/qemu-armeb
@@ -24,8 +23,10 @@ ${PLIST.sparc}bin/qemu-sparc
${PLIST.sparc32plus}bin/qemu-sparc32plus
${PLIST.sparc64}bin/qemu-sparc64
${PLIST.unicore32}bin/qemu-unicore32
+bin/qemu-system-alpha
bin/qemu-system-arm
bin/qemu-system-cris
+bin/qemu-system-i386
bin/qemu-system-lm32
bin/qemu-system-m68k
bin/qemu-system-microblaze
@@ -43,6 +44,8 @@ bin/qemu-system-sh4eb
bin/qemu-system-sparc
bin/qemu-system-sparc64
bin/qemu-system-x86_64
+bin/qemu-system-xtensa
+bin/qemu-system-xtensaeb
${PLIST.x86_64}bin/qemu-x86_64
man/man1/qemu-img.1
man/man1/qemu.1
@@ -50,9 +53,13 @@ man/man8/qemu-nbd.8
share/doc/qemu/Makefile.multinode-NetBSD
share/doc/qemu/qemu-doc.html
share/doc/qemu/qemu-tech.html
+share/examples/qemu/cpus-x86_64.conf
share/examples/qemu/target-x86_64.conf
share/qemu/bamboo.dtb
share/qemu/bios.bin
+share/qemu/kvmvapic.bin
+share/qemu/palcode-clipper
+share/qemu/sgabios.bin
share/qemu/keymaps/ar
share/qemu/keymaps/common
share/qemu/keymaps/da
@@ -103,6 +110,7 @@ share/qemu/pxe-ne2k_pci.rom
share/qemu/pxe-pcnet.rom
share/qemu/pxe-rtl8139.rom
share/qemu/pxe-virtio.rom
+share/qemu/qemu-icon.bmp
share/qemu/s390-zipl.rom
share/qemu/slof.bin
share/qemu/spapr-rtas.bin
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index c7acca170b4..04a5341ea58 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,22 +1,17 @@
-$NetBSD: distinfo,v 1.72 2012/05/12 09:56:51 gson Exp $
+$NetBSD: distinfo,v 1.73 2012/06/07 21:23:45 ryoon Exp $
-SHA1 (qemu-0.15.1.tar.gz) = 30cf3b4dabb4b5d8efadb20f364eb8181f317681
-RMD160 (qemu-0.15.1.tar.gz) = fd1cfde94f96569af671cc96d1c2e4bad524fd61
-Size (qemu-0.15.1.tar.gz) = 9576745 bytes
-SHA1 (patch-aa) = ca39d409081cd7d9f038d580c5b90ffca46948ec
-SHA1 (patch-ao) = 610e77fd51595f0f77b82a745d0a546712f6442d
-SHA1 (patch-ba) = c8ad6502b0693cc22a79f89d2935d962066b5d91
-SHA1 (patch-bb) = 17255a240062acfe87401c2168158687f2ebcd20
-SHA1 (patch-dd) = 20637d652963c94c5fe7999f27c31c7fd8864e43
-SHA1 (patch-ed) = 7a77ba9b33d654c9f8278d69f81a2fc06e17a7d3
+SHA1 (qemu-1.1.0.tar.bz2) = 9f761d17bee8b6e7737fbcabbbaac50bc999a0ee
+RMD160 (qemu-1.1.0.tar.bz2) = f2066f9b28298cfe6c7df7d3210fa95b177cc420
+Size (qemu-1.1.0.tar.bz2) = 9629317 bytes
SHA1 (patch-ef) = f26f1b860cca477d5e80c9cb2755c8dc6fa593ac
-SHA1 (patch-eg) = 1f3a0320344d930c8df97e322411de3136f398d7
-SHA1 (patch-eh) = c79b915f08941af95611aa43c8c9a342486632d4
-SHA1 (patch-ei) = e2ffd48420e7aa0f0507a741afe6f24c6f06e4c9
-SHA1 (patch-en) = 267500f7c11efacdf1a9ae323595e0469aa791c9
-SHA1 (patch-et) = 53b38e0fbe12c4d199997327b66248f125988a4c
-SHA1 (patch-hw_ppc__newworld.c) = a0011c05cd35aff8982b97c3ec669e18c11ad07b
-SHA1 (patch-hw_ppc__oldworld.c) = 790daed4d0bdc51628a6252716480510f8c444c8
-SHA1 (patch-hw_xilinx__axienet.c) = 6f715e4e2241c3c9006bc571084ca5fd12658f13
-SHA1 (patch-ioport.c) = bb0c6671eaf39ef9b846d0ea2633cb1d56edddb1
-SHA1 (patch-slirp_tcp__subr.c) = d2aca58ea0726b76b5f644af27fde0598beaf048
+SHA1 (patch-eg) = f06b9c675717fd54afba0cf2714158b358078a15
+SHA1 (patch-eh) = 9425da879c4809abe6959b402cb98de370f9ceb6
+SHA1 (patch-en) = 01f74603909474d222f9c8bc75c831b5c7393045
+SHA1 (patch-et) = 5755dc6ce5ecd84dfd34bb0e0f64b70c2639d575
+SHA1 (patch-hw_ppc__newworld.c) = 9490186f0189ea4eceaf15132259cf67ec002cc4
+SHA1 (patch-hw_ppc__oldworld.c) = e339647c92c7cbfe67b61b96bc655a47e7af2123
+SHA1 (patch-hw_xilinx__axienet.c) = ffd6a41d7c76ef11d63b27ffc263b668ee569e99
+SHA1 (patch-ioport.c) = 2bf04d5bf59b7e8939b20c168fb618a955bfa5a4
+SHA1 (patch-memory.c) = 6c7485270a5315c7eb174cb988a074fbbb760c3b
+SHA1 (patch-roms_seabios_tools_buildversion.sh) = 5ab15a25f47762a7abe30da0beb7b77facc88b13
+SHA1 (patch-slirp_tcp__subr.c) = 413f508eeb7fae166a3a512bd98dc63314b59af8
diff --git a/emulators/qemu/files/Makefile.multinode-NetBSD b/emulators/qemu/files/Makefile.multinode-NetBSD
index d438c33b7ef..f4313832eba 100644
--- a/emulators/qemu/files/Makefile.multinode-NetBSD
+++ b/emulators/qemu/files/Makefile.multinode-NetBSD
@@ -1,4 +1,4 @@
-# $Id: Makefile.multinode-NetBSD,v 1.3 2006/07/06 21:14:19 jlam Exp $
+# $Id: Makefile.multinode-NetBSD,v 1.4 2012/06/07 21:23:46 ryoon Exp $
# Source: http://mail-index.NetBSD.org/netbsd-help/2005/03/25/0005.html
#
# Starts up two qemu instances and networks bridges them to the local
diff --git a/emulators/qemu/patches/patch-aa b/emulators/qemu/patches/patch-aa
deleted file mode 100644
index 48a79defe4d..00000000000
--- a/emulators/qemu/patches/patch-aa
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-aa,v 1.10 2011/09/22 05:37:49 ryoon Exp $
-
-* fixes a bug with tap device detection
-
---- net/tap-bsd.c.orig 2011-08-08 18:28:42.000000000 +0000
-+++ net/tap-bsd.c
-@@ -28,6 +28,8 @@
- #include "qemu-error.h"
-
- #ifdef __NetBSD__
-+#include <sys/ioctl.h>
-+#include <net/if.h>
- #include <net/if_tap.h>
- #endif
-
-@@ -40,8 +42,12 @@
- int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
- {
- int fd;
-+#ifdef TAPGIFNAME
-+ struct ifreq ifr;
-+#else
- char *dev;
- struct stat s;
-+#endif
-
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
- /* if no ifname is given, always start the search from tap0/tun0. */
-@@ -77,14 +83,26 @@ int tap_open(char *ifname, int ifname_si
- #else
- TFR(fd = open("/dev/tap", O_RDWR));
- if (fd < 0) {
-- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n");
-+ fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno));
- return -1;
- }
- #endif
-
-- fstat(fd, &s);
-+#ifdef TAPGIFNAME
-+ if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) {
-+ fprintf(stderr, "warning: could not open get tap name: %s\n",
-+ strerror(errno));
-+ return -1;
-+ }
-+ pstrcpy(ifname, ifname_size, ifr.ifr_name);
-+#else
-+ if (fstat(fd, &s) < 0) {
-+ fprintf(stderr, "warning: could not stat /dev/tap: no virtual network emulation: %s\n", strerror(errno));
-+ return -1;
-+ }
- dev = devname(s.st_rdev, S_IFCHR);
- pstrcpy(ifname, ifname_size, dev);
-+#endif
-
- if (*vnet_hdr) {
- /* BSD doesn't have IFF_VNET_HDR */
diff --git a/emulators/qemu/patches/patch-ao b/emulators/qemu/patches/patch-ao
deleted file mode 100644
index a4c7f5969cc..00000000000
--- a/emulators/qemu/patches/patch-ao
+++ /dev/null
@@ -1,170 +0,0 @@
-$NetBSD: patch-ao,v 1.5 2011/08/22 12:00:34 ryoon Exp $
-
---- audio/mixeng.c.orig 2011-08-08 18:28:42 +0000
-+++ audio/mixeng.c
-@@ -143,56 +143,64 @@
- #undef IN_T
- #undef SHIFT
-
-+/*
-+ * Work around ugly XX_t #defines in NetBSD 2.x,
-+ * fixed as typedefs in NetBSD 3.x. Two macros needed to
-+ * get CPP defines expanded properly. - HF
-+ */
-+#define _NBglue(x,y,z) x ## y ## z
-+#define NBglue(x,y,z) _NBglue(x,y,z)
-+
- t_sample *mixeng_conv[2][2][2][3] = {
- {
- {
- {
-- conv_natural_uint8_t_to_mono,
-- conv_natural_uint16_t_to_mono,
-- conv_natural_uint32_t_to_mono
-+ NBglue(conv_natural_, uint8_t, _to_mono),
-+ NBglue(conv_natural_, uint16_t, _to_mono),
-+ NBglue(conv_natural_, uint32_t, _to_mono)
- },
- {
-- conv_natural_uint8_t_to_mono,
-- conv_swap_uint16_t_to_mono,
-- conv_swap_uint32_t_to_mono,
-+ NBglue(conv_natural_, uint8_t, _to_mono),
-+ NBglue(conv_swap_, uint16_t, _to_mono),
-+ NBglue(conv_swap_, uint32_t, _to_mono),
- }
- },
- {
- {
-- conv_natural_int8_t_to_mono,
-- conv_natural_int16_t_to_mono,
-- conv_natural_int32_t_to_mono
-+ NBglue(conv_natural_, int8_t, _to_mono),
-+ NBglue(conv_natural_, int16_t, _to_mono),
-+ NBglue(conv_natural_, int32_t, _to_mono)
- },
- {
-- conv_natural_int8_t_to_mono,
-- conv_swap_int16_t_to_mono,
-- conv_swap_int32_t_to_mono
-+ NBglue(conv_natural_, int8_t, _to_mono),
-+ NBglue(conv_swap_, int16_t, _to_mono),
-+ NBglue(conv_swap_, int32_t, _to_mono)
- }
- }
- },
- {
- {
- {
-- conv_natural_uint8_t_to_stereo,
-- conv_natural_uint16_t_to_stereo,
-- conv_natural_uint32_t_to_stereo
-+ NBglue(conv_natural_, uint8_t, _to_stereo),
-+ NBglue(conv_natural_, uint16_t, _to_stereo),
-+ NBglue(conv_natural_, uint32_t, _to_stereo)
- },
- {
-- conv_natural_uint8_t_to_stereo,
-- conv_swap_uint16_t_to_stereo,
-- conv_swap_uint32_t_to_stereo
-+ NBglue(conv_natural_, uint8_t, _to_stereo),
-+ NBglue(conv_swap_, uint16_t, _to_stereo),
-+ NBglue(conv_swap_, uint32_t, _to_stereo)
- }
- },
- {
- {
-- conv_natural_int8_t_to_stereo,
-- conv_natural_int16_t_to_stereo,
-- conv_natural_int32_t_to_stereo
-+ NBglue(conv_natural_, int8_t, _to_stereo),
-+ NBglue(conv_natural_, int16_t, _to_stereo),
-+ NBglue(conv_natural_, int32_t, _to_stereo)
- },
- {
-- conv_natural_int8_t_to_stereo,
-- conv_swap_int16_t_to_stereo,
-- conv_swap_int32_t_to_stereo,
-+ NBglue(conv_natural_, int8_t, _to_stereo),
-+ NBglue(conv_swap_, int16_t, _to_stereo),
-+ NBglue(conv_swap_, int32_t, _to_stereo),
- }
- }
- }
-@@ -202,52 +210,52 @@ f_sample *mixeng_clip[2][2][2][3] = {
- {
- {
- {
-- clip_natural_uint8_t_from_mono,
-- clip_natural_uint16_t_from_mono,
-- clip_natural_uint32_t_from_mono
-+ NBglue(clip_natural_, uint8_t, _from_mono),
-+ NBglue(clip_natural_, uint16_t, _from_mono),
-+ NBglue(clip_natural_, uint32_t, _from_mono)
- },
- {
-- clip_natural_uint8_t_from_mono,
-- clip_swap_uint16_t_from_mono,
-- clip_swap_uint32_t_from_mono
-+ NBglue(clip_natural_, uint8_t, _from_mono),
-+ NBglue(clip_swap_, uint16_t, _from_mono),
-+ NBglue(clip_swap_, uint32_t, _from_mono)
- }
- },
- {
- {
-- clip_natural_int8_t_from_mono,
-- clip_natural_int16_t_from_mono,
-- clip_natural_int32_t_from_mono
-+ NBglue(clip_natural_, int8_t, _from_mono),
-+ NBglue(clip_natural_, int16_t, _from_mono),
-+ NBglue(clip_natural_, int32_t, _from_mono)
- },
- {
-- clip_natural_int8_t_from_mono,
-- clip_swap_int16_t_from_mono,
-- clip_swap_int32_t_from_mono
-+ NBglue(clip_natural_, int8_t, _from_mono),
-+ NBglue(clip_swap_, int16_t, _from_mono),
-+ NBglue(clip_swap_, int32_t, _from_mono)
- }
- }
- },
- {
- {
- {
-- clip_natural_uint8_t_from_stereo,
-- clip_natural_uint16_t_from_stereo,
-- clip_natural_uint32_t_from_stereo
-+ NBglue(clip_natural_, uint8_t, _from_stereo),
-+ NBglue(clip_natural_, uint16_t, _from_stereo),
-+ NBglue(clip_natural_, uint32_t, _from_stereo)
- },
- {
-- clip_natural_uint8_t_from_stereo,
-- clip_swap_uint16_t_from_stereo,
-- clip_swap_uint32_t_from_stereo
-+ NBglue(clip_natural_, uint8_t, _from_stereo),
-+ NBglue(clip_swap_, uint16_t, _from_stereo),
-+ NBglue(clip_swap_, uint32_t, _from_stereo)
- }
- },
- {
- {
-- clip_natural_int8_t_from_stereo,
-- clip_natural_int16_t_from_stereo,
-- clip_natural_int32_t_from_stereo
-+ NBglue(clip_natural_, int8_t, _from_stereo),
-+ NBglue(clip_natural_, int16_t, _from_stereo),
-+ NBglue(clip_natural_, int32_t, _from_stereo)
- },
- {
-- clip_natural_int8_t_from_stereo,
-- clip_swap_int16_t_from_stereo,
-- clip_swap_int32_t_from_stereo
-+ NBglue(clip_natural_, int8_t, _from_stereo),
-+ NBglue(clip_swap_, int16_t, _from_stereo),
-+ NBglue(clip_swap_, int32_t, _from_stereo)
- }
- }
- }
diff --git a/emulators/qemu/patches/patch-ba b/emulators/qemu/patches/patch-ba
deleted file mode 100644
index 53c2f92d97e..00000000000
--- a/emulators/qemu/patches/patch-ba
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-ba,v 1.5 2011/08/22 12:00:34 ryoon Exp $
-
---- hw/pcspk.c.orig 2011-08-08 18:28:42 +0000
-+++ hw/pcspk.c
-@@ -42,7 +42,6 @@ typedef struct {
- unsigned int samples;
- unsigned int play_pos;
- int data_on;
-- int dummy_refresh_clock;
- } PCSpkState;
-
- static const char *s_spk = "pcspk";
-@@ -112,15 +111,31 @@ int pcspk_audio_init(qemu_irq *pic)
- return 0;
- }
-
-+/*
-+ * Emulate the speaker port's refresh clock bit. This is supposed
-+ * to toggle between 0 and 1<<4 every 15 microseconds. XXX: We use
-+ * gettimeofday() in the real machine instead of a monotonic clock
-+ * in the virtual machine, and we are a bit sloppy about the 15
-+ * microseconds. This should be good enough for crude loops that
-+ * measure approximate delays by counting how often this line toggles.
-+ */
-+static uint32_t pcspk_dummy_refresh_clock(void)
-+{
-+ struct timeval tv;
-+
-+ gettimeofday(&tv, NULL);
-+ return ((tv.tv_sec ^ (tv.tv_usec / 15)) & 1) << 4;
-+}
-+
- static uint32_t pcspk_ioport_read(void *opaque, uint32_t addr)
- {
- PCSpkState *s = opaque;
- int out;
-
-- s->dummy_refresh_clock ^= (1 << 4);
- out = pit_get_out(s->pit, 2, qemu_get_clock_ns(vm_clock)) << 5;
-
-- return pit_get_gate(s->pit, 2) | (s->data_on << 1) | s->dummy_refresh_clock | out;
-+ return pit_get_gate(s->pit, 2) | (s->data_on << 1) |
-+ pcspk_dummy_refresh_clock() | out;
- }
-
- static void pcspk_ioport_write(void *opaque, uint32_t addr, uint32_t val)
diff --git a/emulators/qemu/patches/patch-bb b/emulators/qemu/patches/patch-bb
deleted file mode 100644
index 79eb0e6ffe3..00000000000
--- a/emulators/qemu/patches/patch-bb
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-bb,v 1.3 2011/09/22 05:37:49 ryoon Exp $
-
-* fix build on NetBSD/4.0.1.
-
---- scripts/signrom.sh.orig 2011-08-08 18:28:42.000000000 +0000
-+++ scripts/signrom.sh
-@@ -26,12 +26,12 @@ test "$1" -a "$2" || exit 1
- sum=0
-
- # find out the file size
--x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 -A n`
-+x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 | sed -e 's/^[0-9]* *//' -e 's/^00*\([0-9]\)/\1/'`
- #size=`expr $x \* 512 - 1`
- size=$(( $x * 512 - 1 ))
-
- # now get the checksum
--nums=`od -A n -t u1 -v -N $size "$1"`
-+nums=`od -t u1 -v "$1" | sed -e 's/^[0-9]* *//' -e 's/^00*\([0-9]\)/\1/' -e 's/ 00*\([0-9]\)/ \1/g'`
- for i in ${nums}; do
- # add each byte's value to sum
- sum=`expr \( $sum + $i \) % 256`
diff --git a/emulators/qemu/patches/patch-dd b/emulators/qemu/patches/patch-dd
deleted file mode 100644
index ed45be85bb0..00000000000
--- a/emulators/qemu/patches/patch-dd
+++ /dev/null
@@ -1,66 +0,0 @@
-$NetBSD: patch-dd,v 1.7 2011/08/22 12:00:34 ryoon Exp $
-
-Remove confsuffix from sysconfdir so that our PKG_SYSCONFSUBDIR setting
-works.
-
-Install man pages into ${PREFIX}/man, not ${PREFIX}/share/man.
-
-Handle arm and armeb case on NetBSD.
-XXX: it looks mips is always treated as big endian.
-
---- configure.orig 2011-08-08 18:28:42 +0000
-+++ configure
-@@ -141,13 +141,13 @@ bigendian="no"
- mingw32="no"
- EXESUF=""
- prefix="/usr/local"
--mandir="\${prefix}/share/man"
-+mandir="\${prefix}/man"
- datadir="\${prefix}/share/qemu"
- docdir="\${prefix}/share/doc/qemu"
- bindir="\${prefix}/bin"
- libdir="\${prefix}/lib"
- sysconfdir="\${prefix}/etc"
--confsuffix="/qemu"
-+confsuffix=""
- slirp="yes"
- fmod_lib=""
- fmod_inc=""
-@@ -281,12 +281,18 @@ elif check_define __s390__ ; then
- else
- cpu="s390"
- fi
-+elif check_define __arm__ ; then
-+ if check_define __ARMEL__ ; then
-+ cpu="arm"
-+ elif check_define __ARMEB__ ; then
-+ cpu="armeb"
-+ fi
- else
- cpu=`uname -m`
- fi
-
- case "$cpu" in
-- alpha|cris|ia64|lm32|m68k|microblaze|ppc|ppc64|sparc64|unicore32)
-+ alpha|arm|armeb|cris|ia64|lm32|m68k|microblaze|ppc|ppc64|sparc64|unicore32)
- cpu="$cpu"
- ;;
- i386|i486|i586|i686|i86pc|BePC)
-@@ -1152,7 +1158,7 @@ else
-
- # if cross compiling, cannot launch a program, so make a static guess
- case "$cpu" in
-- armv4b|hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
-+ armeb|armv4b|hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
- bigendian=yes
- ;;
- esac
-@@ -2730,7 +2736,7 @@ case "$cpu" in
- i386|x86_64|alpha|cris|hppa|ia64|lm32|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64|unicore32)
- ARCH=$cpu
- ;;
-- armv4b|armv4l)
-+ arm|armeb|armv4b|armv4l)
- ARCH=arm
- ;;
- esac
diff --git a/emulators/qemu/patches/patch-ed b/emulators/qemu/patches/patch-ed
deleted file mode 100644
index bdbbb896c5d..00000000000
--- a/emulators/qemu/patches/patch-ed
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-ed,v 1.4 2011/08/22 12:00:34 ryoon Exp $
-
---- target-i386/translate.c.orig 2011-08-08 18:28:42 +0000
-+++ target-i386/translate.c
-@@ -4856,20 +4856,23 @@ static target_ulong disas_insn(DisasCont
- tcg_gen_sub_tl(t2, cpu_regs[R_EAX], t0);
- gen_extu(ot, t2);
- tcg_gen_brcondi_tl(TCG_COND_EQ, t2, 0, label1);
-+ label2 = gen_new_label();
- if (mod == 3) {
-- label2 = gen_new_label();
- gen_op_mov_reg_v(ot, R_EAX, t0);
- tcg_gen_br(label2);
- gen_set_label(label1);
- gen_op_mov_reg_v(ot, rm, t1);
-- gen_set_label(label2);
- } else {
-- tcg_gen_mov_tl(t1, t0);
-+ /* perform no-op store cycle like physical cpu; must be
-+ before changing accumulator to ensure idempotency if
-+ the store faults and the instruction is restarted */
-+ gen_op_st_v(ot + s->mem_index, t0, a0);
- gen_op_mov_reg_v(ot, R_EAX, t0);
-+ tcg_gen_br(label2);
- gen_set_label(label1);
-- /* always store */
- gen_op_st_v(ot + s->mem_index, t1, a0);
- }
-+ gen_set_label(label2);
- tcg_gen_mov_tl(cpu_cc_src, t0);
- tcg_gen_mov_tl(cpu_cc_dst, t2);
- s->cc_op = CC_OP_SUBB + ot;
diff --git a/emulators/qemu/patches/patch-eg b/emulators/qemu/patches/patch-eg
index 58f3b3a3c30..53e8c4cb0c0 100644
--- a/emulators/qemu/patches/patch-eg
+++ b/emulators/qemu/patches/patch-eg
@@ -1,9 +1,9 @@
-$NetBSD: patch-eg,v 1.3 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-eg,v 1.4 2012/06/07 21:23:46 ryoon Exp $
Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
(PR lib/43832: ssp causes common names to be defines)
---- hw/etraxfs_eth.c.orig 2011-08-08 18:28:42 +0000
+--- hw/etraxfs_eth.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ hw/etraxfs_eth.c
@@ -184,7 +184,7 @@ static void mdio_read_req(struct qemu_md
@@ -14,7 +14,7 @@ Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
else
bus->data = 0xffff;
}
-@@ -347,7 +347,7 @@ static void eth_validate_duplex(struct f
+@@ -354,7 +354,7 @@ static void eth_validate_duplex(struct f
int new_mm = 0;
phy = eth->mdio_bus.devs[eth->phyaddr];
diff --git a/emulators/qemu/patches/patch-eh b/emulators/qemu/patches/patch-eh
index 21c78608d91..8971377e81b 100644
--- a/emulators/qemu/patches/patch-eh
+++ b/emulators/qemu/patches/patch-eh
@@ -1,19 +1,19 @@
-$NetBSD: patch-eh,v 1.3 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-eh,v 1.4 2012/06/07 21:23:46 ryoon Exp $
Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
(PR lib/43832: ssp causes common names to be defines)
---- hw/omap_dss.c.orig 2011-08-08 18:28:42 +0000
+--- hw/omap_dss.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ hw/omap_dss.c
-@@ -774,18 +774,18 @@ static void omap_rfbi_write(void *opaque
+@@ -791,18 +791,18 @@ static void omap_rfbi_write(void *opaque
break;
case 0x58: /* RFBI_READ */
if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
- s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
+ s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 1);
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
-- s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
-+ s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 1);
+- s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1);
++ s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 1);
if (!-- s->rfbi.pixels)
omap_rfbi_transfer_stop(s);
break;
@@ -23,8 +23,8 @@ Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
- s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
+ s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 0);
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
-- s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
-+ s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 0);
+- s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0);
++ s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 0);
if (!-- s->rfbi.pixels)
omap_rfbi_transfer_stop(s);
break;
diff --git a/emulators/qemu/patches/patch-ei b/emulators/qemu/patches/patch-ei
deleted file mode 100644
index c681698a0e1..00000000000
--- a/emulators/qemu/patches/patch-ei
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ei,v 1.3 2011/08/22 12:00:34 ryoon Exp $
-
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-(PR lib/43832: ssp causes common names to be defines)
-
---- rwhandler.c.orig 2011-08-08 18:28:42 +0000
-+++ rwhandler.c
-@@ -13,7 +13,7 @@ static void name(void *opaque, type addr
- static uint32_t name(void *opaque, type addr) \
- { \
- struct ReadWriteHandler *handler = opaque; \
-- return handler->read(handler, addr, len); \
-+ return (*handler->read)(handler, addr, len); \
- }
-
- RWHANDLER_WRITE(cpu_io_memory_simple_writeb, 1, target_phys_addr_t);
diff --git a/emulators/qemu/patches/patch-en b/emulators/qemu/patches/patch-en
index 2edb9df77a6..14db3862bb3 100644
--- a/emulators/qemu/patches/patch-en
+++ b/emulators/qemu/patches/patch-en
@@ -1,9 +1,9 @@
-$NetBSD: patch-en,v 1.3 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-en,v 1.4 2012/06/07 21:23:46 ryoon Exp $
---- tcg/arm/tcg-target.h.orig 2011-08-08 18:28:42 +0000
+--- tcg/arm/tcg-target.h.orig 2012-06-01 09:13:13.000000000 +0000
+++ tcg/arm/tcg-target.h
-@@ -83,7 +83,7 @@ enum {
- static inline void flush_icache_range(unsigned long start, unsigned long stop)
+@@ -85,7 +85,7 @@ static inline void flush_icache_range(tc
+ tcg_target_ulong stop)
{
#if QEMU_GNUC_PREREQ(4, 1)
- __builtin___clear_cache((char *) start, (char *) stop);
diff --git a/emulators/qemu/patches/patch-et b/emulators/qemu/patches/patch-et
index c3975bf6a26..5d4aa7b1361 100644
--- a/emulators/qemu/patches/patch-et
+++ b/emulators/qemu/patches/patch-et
@@ -1,15 +1,18 @@
-$NetBSD: patch-et,v 1.3 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-et,v 1.4 2012/06/07 21:23:46 ryoon Exp $
---- Makefile.orig 2011-08-08 18:28:42 +0000
+--- Makefile.orig 2012-06-01 09:13:13.000000000 +0000
+++ Makefile
-@@ -261,8 +261,8 @@ ifdef CONFIG_POSIX
- endif
+@@ -288,9 +288,10 @@ install-datadir:
+ install-confdir:
+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
- install-sysconfig:
-- $(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
-- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
+-install-sysconfig: install-datadir install-confdir
+- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
+- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/cpus-x86_64.conf "$(DESTDIR)$(qemu_datadir)"
++install-sysconfig:
+ $(INSTALL_DIR) "$(DESTDIR)$(egdir)"
+ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(egdir)"
++ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/cpus-x86_64.conf "$(DESTDIR)$(egdir)"
- install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
+ install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
diff --git a/emulators/qemu/patches/patch-hw_ppc__newworld.c b/emulators/qemu/patches/patch-hw_ppc__newworld.c
index 844851f6717..3c735373128 100644
--- a/emulators/qemu/patches/patch-hw_ppc__newworld.c
+++ b/emulators/qemu/patches/patch-hw_ppc__newworld.c
@@ -1,10 +1,10 @@
-$NetBSD: patch-hw_ppc__newworld.c,v 1.1 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-hw_ppc__newworld.c,v 1.2 2012/06/07 21:23:46 ryoon Exp $
Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
---- hw/ppc_newworld.c.orig 2011-08-08 18:28:42 +0000
+--- hw/ppc_newworld.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ hw/ppc_newworld.c
-@@ -120,7 +120,7 @@ static uint64_t translate_kernel_address
+@@ -116,7 +116,7 @@ static uint64_t translate_kernel_address
return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
}
@@ -13,7 +13,7 @@ Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
{
return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
}
-@@ -225,7 +225,7 @@ static void ppc_core99_init (ram_addr_t
+@@ -231,7 +231,7 @@ static void ppc_core99_init (ram_addr_t
}
/* load initrd */
if (initrd_filename) {
@@ -22,7 +22,7 @@ Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
initrd_size = load_image_targphys(initrd_filename, initrd_base,
ram_size - initrd_base);
if (initrd_size < 0) {
-@@ -233,11 +233,11 @@ static void ppc_core99_init (ram_addr_t
+@@ -239,11 +239,11 @@ static void ppc_core99_init (ram_addr_t
initrd_filename);
exit(1);
}
diff --git a/emulators/qemu/patches/patch-hw_ppc__oldworld.c b/emulators/qemu/patches/patch-hw_ppc__oldworld.c
index e6bdfb70362..5ae82de2813 100644
--- a/emulators/qemu/patches/patch-hw_ppc__oldworld.c
+++ b/emulators/qemu/patches/patch-hw_ppc__oldworld.c
@@ -1,10 +1,10 @@
-$NetBSD: patch-hw_ppc__oldworld.c,v 1.1 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-hw_ppc__oldworld.c,v 1.2 2012/06/07 21:23:46 ryoon Exp $
Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
---- hw/ppc_oldworld.c.orig 2011-08-08 18:28:42 +0000
+--- hw/ppc_oldworld.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ hw/ppc_oldworld.c
-@@ -59,7 +59,7 @@ static uint64_t translate_kernel_address
+@@ -60,7 +60,7 @@ static uint64_t translate_kernel_address
return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
}
@@ -13,7 +13,7 @@ Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
{
return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
}
-@@ -162,7 +162,7 @@ static void ppc_heathrow_init (ram_addr_
+@@ -175,7 +175,7 @@ static void ppc_heathrow_init (ram_addr_
}
/* load initrd */
if (initrd_filename) {
@@ -22,7 +22,7 @@ Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
initrd_size = load_image_targphys(initrd_filename, initrd_base,
ram_size - initrd_base);
if (initrd_size < 0) {
-@@ -170,11 +170,11 @@ static void ppc_heathrow_init (ram_addr_
+@@ -183,11 +183,11 @@ static void ppc_heathrow_init (ram_addr_
initrd_filename);
exit(1);
}
diff --git a/emulators/qemu/patches/patch-hw_xilinx__axienet.c b/emulators/qemu/patches/patch-hw_xilinx__axienet.c
index 72002a37e4b..cff6066f9d3 100644
--- a/emulators/qemu/patches/patch-hw_xilinx__axienet.c
+++ b/emulators/qemu/patches/patch-hw_xilinx__axienet.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-hw_xilinx__axienet.c,v 1.1 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-hw_xilinx__axienet.c,v 1.2 2012/06/07 21:23:46 ryoon Exp $
Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
---- hw/xilinx_axienet.c.orig 2011-08-08 18:28:42 +0000
+--- hw/xilinx_axienet.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ hw/xilinx_axienet.c
@@ -189,7 +189,7 @@ static uint16_t mdio_read_req(struct MDI
diff --git a/emulators/qemu/patches/patch-ioport.c b/emulators/qemu/patches/patch-ioport.c
index 49ea6c2e725..324d3edba2c 100644
--- a/emulators/qemu/patches/patch-ioport.c
+++ b/emulators/qemu/patches/patch-ioport.c
@@ -1,10 +1,8 @@
-$NetBSD: patch-ioport.c,v 1.4 2011/08/22 12:00:34 ryoon Exp $
+$NetBSD: patch-ioport.c,v 1.5 2012/06/07 21:23:46 ryoon Exp $
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-
---- ioport.c.orig 2011-08-08 18:28:42 +0000
+--- ioport.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ ioport.c
-@@ -181,7 +181,7 @@ static uint32_t ioport_readb_thunk(void
+@@ -183,7 +183,7 @@ static uint32_t ioport_readb_thunk(void
IORange *ioport = opaque;
uint64_t data;
@@ -13,7 +11,7 @@ Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
return data;
}
-@@ -190,7 +190,7 @@ static uint32_t ioport_readw_thunk(void
+@@ -192,7 +192,7 @@ static uint32_t ioport_readw_thunk(void
IORange *ioport = opaque;
uint64_t data;
@@ -22,7 +20,7 @@ Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
return data;
}
-@@ -199,7 +199,7 @@ static uint32_t ioport_readl_thunk(void
+@@ -201,7 +201,7 @@ static uint32_t ioport_readl_thunk(void
IORange *ioport = opaque;
uint64_t data;
diff --git a/emulators/qemu/patches/patch-memory.c b/emulators/qemu/patches/patch-memory.c
new file mode 100644
index 00000000000..78b3d454b03
--- /dev/null
+++ b/emulators/qemu/patches/patch-memory.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-memory.c,v 1.1 2012/06/07 21:23:46 ryoon Exp $
+
+--- memory.c.orig 2012-06-01 09:13:13.000000000 +0000
++++ memory.c
+@@ -311,7 +311,7 @@ static void memory_region_read_accessor(
+ MemoryRegion *mr = opaque;
+ uint64_t tmp;
+
+- tmp = mr->ops->read(mr->opaque, addr, size);
++ tmp = (*mr->ops->read)(mr->opaque, addr, size);
+ *value |= (tmp & mask) << shift;
+ }
+
+@@ -393,12 +393,12 @@ static void memory_region_iorange_read(I
+
+ *data = ((uint64_t)1 << (width * 8)) - 1;
+ if (mrp) {
+- *data = mrp->read(mr->opaque, offset);
++ *data = (*mrp->read)(mr->opaque, offset);
+ } else if (width == 2) {
+ mrp = find_portio(mr, offset - mrio->offset, 1, false);
+ assert(mrp);
+- *data = mrp->read(mr->opaque, offset) |
+- (mrp->read(mr->opaque, offset + 1) << 8);
++ *data = (*mrp->read)(mr->opaque, offset) |
++ ((*mrp->read)(mr->opaque, offset + 1) << 8);
+ }
+ return;
+ }
diff --git a/emulators/qemu/patches/patch-roms_seabios_tools_buildversion.sh b/emulators/qemu/patches/patch-roms_seabios_tools_buildversion.sh
new file mode 100644
index 00000000000..a7f1da314b9
--- /dev/null
+++ b/emulators/qemu/patches/patch-roms_seabios_tools_buildversion.sh
@@ -0,0 +1,13 @@
+$NetBSD: patch-roms_seabios_tools_buildversion.sh,v 1.1 2012/06/07 21:23:46 ryoon Exp $
+
+--- roms/seabios/tools/buildversion.sh.orig 2012-06-01 09:17:03.000000000 +0000
++++ roms/seabios/tools/buildversion.sh
+@@ -15,7 +15,7 @@ VERSION="${VERSION}-`date +"%Y%m%d_%H%M%
+ echo "Version: ${VERSION}"
+
+ # Build header file
+-if [ "$VAR16MODE" == "VAR16" ]; then
++if [ "$VAR16MODE" = "VAR16" ]; then
+ cat > ${OUTFILE} <<EOF
+ #include "types.h"
+ char VERSION[] VAR16 = "${VERSION}";
diff --git a/emulators/qemu/patches/patch-slirp_tcp__subr.c b/emulators/qemu/patches/patch-slirp_tcp__subr.c
index c919112f829..e1d66578e1d 100644
--- a/emulators/qemu/patches/patch-slirp_tcp__subr.c
+++ b/emulators/qemu/patches/patch-slirp_tcp__subr.c
@@ -1,16 +1,8 @@
-$NetBSD: patch-slirp_tcp__subr.c,v 1.1 2012/05/12 09:56:51 gson Exp $
+$NetBSD: patch-slirp_tcp__subr.c,v 1.2 2012/06/07 21:23:46 ryoon Exp $
-When setting up an outgoing user mode networking TCP connection,
-disable the Nagle algorithm in the host-side connection. Either
-the VM is already doing Nagle, in which case there is no point
-in doing it twice, or it has chosen to disable it, in which case
-we should respect that choice. This change speeds up GDB remote
-debugging over TCP over user mode networking by multiple orders
-of magnitude.
-
---- slirp/tcp_subr.c.orig 2011-10-12 16:41:43.000000000 +0000
+--- slirp/tcp_subr.c.orig 2012-06-01 09:13:13.000000000 +0000
+++ slirp/tcp_subr.c
-@@ -334,6 +334,8 @@ int tcp_fconnect(struct socket *so)
+@@ -341,6 +341,8 @@ int tcp_fconnect(struct socket *so)
setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt ));
opt = 1;
setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(opt ));