diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2006-04-29 09:15:50 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2006-04-29 09:15:50 +0000 |
commit | fef8509c793f45b217fb28f1c0af2b373a8ff4af (patch) | |
tree | f58aff4c2934fb97beac783b9dd64ade30065361 /emulators/qemu-devel/files | |
parent | f78cf042fbe13662fae3f76fa5fb2c21234a6d29 (diff) | |
download | ports-fef8509c793f45b217fb28f1c0af2b373a8ff4af.tar.gz ports-fef8509c793f45b217fb28f1c0af2b373a8ff4af.zip |
Notes
Diffstat (limited to 'emulators/qemu-devel/files')
-rw-r--r-- | emulators/qemu-devel/files/patch-bsdusb.patch | 8 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-configure | 10 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-fbsd | 4 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-slirp-nat | 56 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-usb-hchalt | 18 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-usb-hubfixups | 96 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-usb-uhub-CPEfix | 9 |
7 files changed, 16 insertions, 185 deletions
diff --git a/emulators/qemu-devel/files/patch-bsdusb.patch b/emulators/qemu-devel/files/patch-bsdusb.patch index 279c09e49190..596ba1c83b83 100644 --- a/emulators/qemu-devel/files/patch-bsdusb.patch +++ b/emulators/qemu-devel/files/patch-bsdusb.patch @@ -41,11 +41,11 @@ Index: qemu/Makefile.target endif # USB layer --VL_OBJS+= usb.o usb-uhci.o usb-linux.o usb-hid.o -+VL_OBJS+= usb.o usb-uhci.o usb-$(HOST_USB).o usb-hid.o +-VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-linux.o usb-hid.o ++VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-$(HOST_USB).o usb-hid.o - ifeq ($(TARGET_BASE_ARCH), i386) - # Hardware support + # PCI network cards + VL_OBJS+= ne2000.o rtl8139.o Index: qemu/usb-stub.c @@ -0,0 +1,11 @@ +#include "vl.h" diff --git a/emulators/qemu-devel/files/patch-configure b/emulators/qemu-devel/files/patch-configure new file mode 100644 index 000000000000..1036edd69c21 --- /dev/null +++ b/emulators/qemu-devel/files/patch-configure @@ -0,0 +1,10 @@ +Index: qemu/configure +@@ -157,7 +157,7 @@ + fi + + for opt do +- optarg=`expr "$opt" : '[^=]*=\(.*\)'` ++ optarg=`echo "$opt" |sed 's/^[^=]*=//'` + case "$opt" in + --help|-h) show_help=yes + ;; diff --git a/emulators/qemu-devel/files/patch-fbsd b/emulators/qemu-devel/files/patch-fbsd index a8667ae165e5..8a7823279624 100644 --- a/emulators/qemu-devel/files/patch-fbsd +++ b/emulators/qemu-devel/files/patch-fbsd @@ -59,8 +59,8 @@ Index: qemu/fpu/softfloat-native.c -#if defined(_BSD) +#if defined(_BSD) && !defined(__FreeBSD__) - #define lrint(d) ((int32_t)rint(d)) - #define llrint(d) ((int64_t)rint(d)) + #define lrint(d) ((long)rint(d)) + #define llrint(d) ((long long)rint(d)) #endif Index: qemu/fpu/softfloat-native.h @@ -1,7 +1,17 @@ diff --git a/emulators/qemu-devel/files/patch-slirp-nat b/emulators/qemu-devel/files/patch-slirp-nat deleted file mode 100644 index 9c1accaeaf83..000000000000 --- a/emulators/qemu-devel/files/patch-slirp-nat +++ /dev/null @@ -1,56 +0,0 @@ -# http://lists.gnu.org/archive/html/qemu-devel/2005-12/msg00277.html - -diff -wurb qemu/slirp/misc.c qemu-patched/slirp/misc.c ---- qemu/slirp/misc.c Sun Dec 12 12:45:10 2004 -+++ qemu-patched/slirp/misc.c Mon Mar 21 13:22:05 2005 -@@ -90,13 +90,12 @@ - char buff[256]; - struct hostent *he; - -- if (gethostname(buff,256) < 0) -- return; -- -- if ((he = gethostbyname(buff)) == NULL) -- return; -- -+ if (gethostname(buff,256) == 0) -+ if ((he = gethostbyname(buff)) != NULL) - our_addr = *(struct in_addr *)he->h_addr; -+ -+ if (our_addr.s_addr == 0 || our_addr.s_addr == loopback_addr.s_addr) -+ our_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); - } - - #if SIZEOF_CHAR_P == 8 -diff -wurb qemu/slirp/slirp.c qemu-patched/slirp/slirp.c ---- qemu/slirp/slirp.c Fri Oct 8 01:27:35 2004 -+++ qemu-patched/slirp/slirp.c Mon Mar 21 13:22:05 2005 -@@ -144,7 +144,6 @@ - m_init(); - - /* set default addresses */ -- getouraddr(); - inet_aton("127.0.0.1", &loopback_addr); - - if (get_dns_addr(&dns_addr) < 0) { -@@ -153,6 +152,7 @@ - } - - inet_aton(CTL_SPECIAL, &special_addr); -+ getouraddr(); - } - - #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) -diff -wurb qemu/slirp/udp.c qemu-patched/slirp/udp.c ---- qemu/slirp/udp.c Fri Oct 8 01:27:35 2004 -+++ qemu-patched/slirp/udp.c Mon Mar 21 13:22:05 2005 -@@ -314,6 +314,8 @@ - saddr = *addr; - if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) - saddr.sin_addr.s_addr = so->so_faddr.s_addr; -+ if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff)) -+ saddr.sin_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); - daddr.sin_addr = so->so_laddr; - daddr.sin_port = so->so_lport; - - diff --git a/emulators/qemu-devel/files/patch-usb-hchalt b/emulators/qemu-devel/files/patch-usb-hchalt deleted file mode 100644 index cf141d1475e6..000000000000 --- a/emulators/qemu-devel/files/patch-usb-hchalt +++ /dev/null @@ -1,18 +0,0 @@ -Index: qemu/hw/usb-uhci.c -@@ -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); -+ /* set hchalted bit in status - UHCI11D 2.1.2 */ -+ s->status |= UHCI_STS_HCHALTED; - return; - } - frame_addr = s->fl_base_addr + ((s->frnum & 0x3ff) << 2); diff --git a/emulators/qemu-devel/files/patch-usb-hubfixups b/emulators/qemu-devel/files/patch-usb-hubfixups deleted file mode 100644 index 26d62fea199e..000000000000 --- a/emulators/qemu-devel/files/patch-usb-hubfixups +++ /dev/null @@ -1,96 +0,0 @@ -Index: qemu/hw/usb.c -@@ -330,9 +330,9 @@ - 0x0a, /* u16 wHubCharacteristics; */ - 0x00, /* (per-port OC, no power switching) */ - 0x01, /* u8 bPwrOn2pwrGood; 2ms */ -- 0x00, /* u8 bHubContrCurrent; 0 mA */ -- 0x00, /* u8 DeviceRemovable; *** 7 Ports max *** */ -- 0xff /* u8 PortPwrCtrlMask; *** 7 ports max *** */ -+ 0x00 /* u8 bHubContrCurrent; 0 mA */ -+ -+ /* DeviceRemovable and PortPwrCtrlMask patched in later */ - }; - - static void usb_hub_attach(USBPort *port1, USBDevice *dev) -@@ -391,6 +391,12 @@ - } - ret = 0; - break; -+ case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: -+ if (value == 0 && index != 0x81) { /* clear ep halt */ -+ goto fail; -+ } -+ ret = 0; -+ break; - case DeviceOutRequest | USB_REQ_SET_FEATURE: - if (value == USB_DEVICE_REMOTE_WAKEUP) { - dev->remote_wakeup = 1; -@@ -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_config_descriptor); - break; - case USB_DT_STRING: -@@ -558,11 +569,29 @@ - } - break; - case GetHubDescriptor: -- memcpy(data, qemu_hub_hub_descriptor, -- sizeof(qemu_hub_hub_descriptor)); -- data[2] = s->nb_ports; -- ret = sizeof(qemu_hub_hub_descriptor); -- break; -+ { -+ unsigned int n, limit, var_hub_size = 0; -+ memcpy(data, qemu_hub_hub_descriptor, -+ sizeof(qemu_hub_hub_descriptor)); -+ data[2] = s->nb_ports; -+ -+ /* fill DeviceRemovable bits */ -+ limit = ((s->nb_ports + 1 + 7) / 8) + 7; -+ for (n = 7; n < limit; n++) { -+ data[n] = 0x00; -+ var_hub_size++; -+ } -+ -+ /* fill PortPwrCtrlMask bits */ -+ limit = limit + ((s->nb_ports + 7) / 8); -+ for (;n < limit; n++) { -+ data[n] = 0xff; -+ var_hub_size++; -+ } -+ -+ ret = sizeof(qemu_hub_hub_descriptor) + var_hub_size; -+ break; -+ } - default: - fail: - ret = USB_RET_STALL; -@@ -584,8 +613,11 @@ - unsigned int status; - int i, n; - n = (s->nb_ports + 1 + 7) / 8; -- if (n > len) -+ if (len == 1) { /* FreeBSD workaround */ -+ n = 1; -+ } else if (n > len) { - return USB_RET_BABBLE; -+ } - 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 deleted file mode 100644 index 30ad3ed9e925..000000000000 --- a/emulators/qemu-devel/files/patch-usb-uhub-CPEfix +++ /dev/null @@ -1,9 +0,0 @@ -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; |