aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/qemu-devel
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel')
-rw-r--r--emulators/qemu-devel/Makefile24
-rw-r--r--emulators/qemu-devel/files/patch-usb-hchalt10
-rw-r--r--emulators/qemu-devel/files/patch-usb-hubfixups21
-rw-r--r--emulators/qemu-devel/files/patch-usb-uhub-CPEfix9
4 files changed, 49 insertions, 15 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index 28c88772c7a..f0ef5169731 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= qemu
PORTVERSION= 0.8.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= emulators
MASTER_SITES= http://www.qemu.org/:release \
http://people.fruitsalad.org/nox/qemu/:snapshot \
@@ -16,8 +16,11 @@ MASTER_SITES= http://www.qemu.org/:release \
http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \
http://people.freebsd.org/~maho/qemu/:misc
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release
-.if defined (WITH_HACKS)
-DISTFILES+= qemu_dma_patch.tar.gz:idedma patch3_cirrus:misc
+.if defined (WITH_HACKS_IDEDMA) || defined (WITH_HACKS)
+DISTFILES+= qemu_dma_patch.tar.gz:idedma
+.endif
+.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS)
+DISTFILES+= patch3_cirrus:misc
.endif
DIST_SUBDIR= qemu
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
@@ -61,13 +64,16 @@ pre-everything::
@${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module"
@${ECHO_MSG} "by defining WITH_KQEMU."
.endif
-.if !defined(WITH_HACKS)
+.if !defined(WITH_HACKS_IDEDMA) && !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS)
@${ECHO_MSG} "You can build qemu with some hacks (esp. for speedup)"
- @${ECHO_MSG} "by defining WITH_HACKS."
- @${ECHO_MSG} "1. IDE Bus-master DMA Support by John Coiner"
+ @${ECHO_MSG} "by defining WITH_HACKS, or specifically:"
+ @${ECHO_MSG} "1. WITH_HACKS_IDEDMA: IDE Bus-master DMA Support by John Coiner"
@${ECHO_MSG} "http://people.brandeis.edu/~jcoiner/qemu_idedma/qemu_dma_patch.html"
- @${ECHO_MSG} "2. higher speed on large display (cirrus_vga) by Juergen Pfennig"
+ @${ECHO_MSG} "2. WITH_HACKS_CIRRUS: higher speed on large display (cirrus_vga)"
+ @${ECHO_MSG} "by Juergen Pfennig"
@${ECHO_MSG} "http://lists.gnu.org/archive/html/qemu-devel/2006-01/msg00208.html"
+ @${ECHO_MSG} "Note: this second patch is known to cause mouse problems with some(?)"
+ @${ECHO_MSG} "versions of XP, and also minor redraw bugs with some Linux guests."
.endif
.if !defined(WITH_SAMBA) && !exists(${LOCALBASE}/sbin/smbd)
@${ECHO_MSG} "Notice: if you need qemu's -smb option (smb-export local dir to guest)"
@@ -86,8 +92,10 @@ pre-patch:
done
post-patch:
-.if defined(WITH_HACKS)
+.if defined(WITH_HACKS_IDEDMA) || defined (WITH_HACKS)
@cd ${WRKDIR} ; ${TAR} xfz ${DISTDIR}/${DIST_SUBDIR}/qemu_dma_patch.tar.gz ; ${CP} new_qemu_dma_patch/bios.bin ${WRKSRC}/pc-bios; cd ${WRKSRC}; ${PATCH} --quiet -p1 < ../new_qemu_dma_patch/qemu-piix4-udma.patch
+.endif
+.if defined(WITH_HACKS_CIRRUS) || defined (WITH_HACKS)
@cd ${WRKSRC} ; ${PATCH} --quiet < ${DISTDIR}/${DIST_SUBDIR}/patch3_cirrus
.endif
diff --git a/emulators/qemu-devel/files/patch-usb-hchalt b/emulators/qemu-devel/files/patch-usb-hchalt
index 360104d5bb2..cf141d1475e 100644
--- a/emulators/qemu-devel/files/patch-usb-hchalt
+++ b/emulators/qemu-devel/files/patch-usb-hchalt
@@ -1,5 +1,13 @@
Index: qemu/hw/usb-uhci.c
-@@ -527,6 +532,8 @@
+@@ -174,6 +177,7 @@
+ if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) {
+ /* start frame processing */
+ qemu_mod_timer(s->frame_timer, qemu_get_clock(vm_clock));
++ s->status &= ~UHCI_STS_HCHALTED;
+ }
+ if (val & UHCI_CMD_GRESET) {
+ UHCIPort *port;
+@@ -528,6 +534,8 @@
if (!(s->cmd & UHCI_CMD_RS)) {
qemu_del_timer(s->frame_timer);
diff --git a/emulators/qemu-devel/files/patch-usb-hubfixups b/emulators/qemu-devel/files/patch-usb-hubfixups
index 17db3bd3280..26d62fea199 100644
--- a/emulators/qemu-devel/files/patch-usb-hubfixups
+++ b/emulators/qemu-devel/files/patch-usb-hubfixups
@@ -25,18 +25,18 @@ Index: qemu/hw/usb.c
case DeviceOutRequest | USB_REQ_SET_FEATURE:
if (value == USB_DEVICE_REMOTE_WAKEUP) {
dev->remote_wakeup = 1;
-@@ -408,6 +414,11 @@
- case USB_DT_DEVICE:
- memcpy(data, qemu_hub_dev_descriptor,
- sizeof(qemu_hub_dev_descriptor));
+@@ -413,6 +419,11 @@
+ case USB_DT_CONFIG:
+ memcpy(data, qemu_hub_config_descriptor,
+ sizeof(qemu_hub_config_descriptor));
+
+ /* status change endpoint size based on number
+ * of ports */
+ data[22] = (s->nb_ports + 1 + 7) / 8;
+
- ret = sizeof(qemu_hub_dev_descriptor);
+ ret = sizeof(qemu_hub_config_descriptor);
break;
- case USB_DT_CONFIG:
+ case USB_DT_STRING:
@@ -558,11 +569,29 @@
}
break;
@@ -85,3 +85,12 @@ Index: qemu/hw/usb.c
status = 0;
for(i = 0; i < s->nb_ports; i++) {
port = &s->ports[i];
+@@ -598,7 +630,7 @@
+ }
+ ret = n;
+ } else {
+- ret = 0;
++ ret = USB_RET_NAK; /* usb_20 11.12.1 */
+ }
+ } else {
+ goto fail;
diff --git a/emulators/qemu-devel/files/patch-usb-uhub-CPEfix b/emulators/qemu-devel/files/patch-usb-uhub-CPEfix
new file mode 100644
index 00000000000..30ad3ed9e92
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-usb-uhub-CPEfix
@@ -0,0 +1,9 @@
+Index: qemu/hw/usb.c
+@@ -508,7 +518,6 @@
+ USB_MSG_RESET, 0, 0, NULL, 0);
+ port->wPortChange |= PORT_STAT_C_RESET;
+ /* set enable bit */
+- port->wPortChange |= PORT_STAT_C_ENABLE;
+ port->wPortStatus |= PORT_STAT_ENABLE;
+ }
+ break;