FreeBSD Bugzilla – Attachment 69114 Details for
Bug 101381
update emulators/qemu to 0.8.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 15.84 KB, created by
Juergen Lock
on 2006-08-04 23:50:15 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Juergen Lock
Created:
2006-08-04 23:50:15 UTC
Size:
15.84 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v >retrieving revision 1.53 >diff -u -r1.53 Makefile >--- Makefile 23 Jul 2006 00:04:01 -0000 1.53 >+++ Makefile 4 Aug 2006 21:50:40 -0000 >@@ -6,8 +6,7 @@ > # > > PORTNAME= qemu >-PORTVERSION= 0.8.1 >-PORTREVISION= 2 >+PORTVERSION= 0.8.2 > CATEGORIES= emulators > MASTER_SITES= http://www.qemu.org/:release \ > http://people.fruitsalad.org/nox/qemu/:snapshot \ >@@ -75,6 +74,12 @@ > @${ECHO_MSG} "then you also need samba, you can have this port install it by defining" > @${ECHO_MSG} "WITH_SAMBA." > .endif >+.if !defined(WITH_RTL8139_TIMER) >+ @${ECHO_MSG} "Notice: if you want to use qemu's rtl8139c+ nic with a FreeBSD guest" >+ @${ECHO_MSG} "(qemu -net nic,model=rtl8139 -net user or tap ... - will use re(4)" >+ @${ECHO_MSG} "instead of ed(4) which should use less cpu), then you need to enable" >+ @${ECHO_MSG} "the emulated rtl8139 timer by defining WITH_RTL8139_TIMER." >+.endif > > post-extract: > @${MKDIR} ${WRKSRC}/kqemu >@@ -90,6 +95,9 @@ > .if defined(WITH_HACKS_CIRRUS) || defined (WITH_HACKS) > @cd ${WRKSRC} ; ${PATCH} --quiet < ${DISTDIR}/${DIST_SUBDIR}/patch3_cirrus > .endif >+.if defined(WITH_RTL8139_TIMER) >+ @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch >+.endif > > post-install: > @${CAT} ${PKGMESSAGE} >Index: distinfo >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v >retrieving revision 1.31 >diff -u -r1.31 distinfo >--- distinfo 6 May 2006 16:15:41 -0000 1.31 >+++ distinfo 23 Jul 2006 15:52:26 -0000 >@@ -1,6 +1,6 @@ >-MD5 (qemu/qemu-0.8.1.tar.gz) = 67d924324a5ab79d017bd97a1e767285 >-SHA256 (qemu/qemu-0.8.1.tar.gz) = a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 >-SIZE (qemu/qemu-0.8.1.tar.gz) = 1623264 >+MD5 (qemu/qemu-0.8.2.tar.gz) = 5b3a89eb2f256a8a6f3bb07f7b3f1b07 >+SHA256 (qemu/qemu-0.8.2.tar.gz) = 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 >+SIZE (qemu/qemu-0.8.2.tar.gz) = 1810909 > MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 > SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 > SIZE (qemu/patch3_cirrus) = 8817 >Index: pkg-descr >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/pkg-descr,v >retrieving revision 1.3 >diff -u -r1.3 pkg-descr >--- pkg-descr 19 Jul 2005 06:06:56 -0000 1.3 >+++ pkg-descr 23 Jul 2006 17:46:11 -0000 >@@ -12,9 +12,9 @@ > cross-debugging. > > As QEMU requires no host kernel patches to run, it is very safe and easy to use. >-(but kqemu is now also supported for the i386 on i386 case) >+(but kqemu is now also supported for the i386 on i386 and amd64 case) > > See also the preconfigured system images on http://oszoo.org/ > Many live cd isos also work. > >-WWW: http://fabrice.bellard.free.fr/qemu/ >+WWW: http://qemu.org/ >Index: pkg-message >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/pkg-message,v >retrieving revision 1.13 >diff -u -r1.13 pkg-message >--- pkg-message 23 Jul 2006 00:04:01 -0000 1.13 >+++ pkg-message 4 Aug 2006 22:19:33 -0000 >@@ -45,4 +45,15 @@ > add path 'ugen*' mode 660 group operator > corresponding rc.conf line: > devfs_system_ruleset="ugen_ruleset" >+- 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. >+- to avoid panics or non-working re(4) nics with FreeBSD guests if you >+use qemu -net nic,model=rtl8139 -net user or tap ... enable the emulated >+rtl8139 timer by building the port with WITH_RTL8139_TIMER defined. >+(the rtl8139c+ that model=rtl8139 emulates needs less cpu than qemu's >+default ne2k nic which is driven by ed(4), it has not been made default >+only because it may not work with all guests yet.) > ==== >Index: pkg-plist >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v >retrieving revision 1.15 >diff -u -r1.15 pkg-plist >--- pkg-plist 19 May 2006 08:17:54 -0000 1.15 >+++ pkg-plist 23 Jul 2006 17:41:29 -0000 >@@ -13,7 +13,7 @@ > %%DATADIR%%/vgabios.bin > %%DATADIR%%/vgabios-cirrus.bin > %%DATADIR%%/ppc_rom.bin >-%%DATADIR%%/proll.elf >+%%DATADIR%%/openbios-sparc32 > %%DATADIR%%/video.x > %%DATADIR%%/keymaps/ar > %%DATADIR%%/keymaps/common >Index: files/patch-be >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/files/patch-be,v >retrieving revision 1.2 >diff -u -r1.2 patch-be >--- files/patch-be 1 May 2005 07:39:11 -0000 1.2 >+++ files/patch-be 25 Jul 2006 17:09:30 -0000 >@@ -1,16 +1,31 @@ >+Index: qemu/Makefile.target >+@@ -404,7 +404,9 @@ >+ ifndef CONFIG_DARWIN >+ ifndef CONFIG_WIN32 >+ ifndef CONFIG_SOLARIS >+-VL_LIBS=-lutil -lrt >++#VL_LIBS=-lutil -lrt >++# XXX this cant be just merged back... >++VL_LIBS=-lutil >+ endif >+ endif >+ endif > Index: qemu/vl.c >-@@ -662,6 +662,14 @@ >- case QEMU_TIMER_REALTIME: >- #ifdef _WIN32 >- return GetTickCount(); >-+#elif defined(_BSD) >-+ { >-+ struct timeval r; >-+ if (!gettimeofday(&r, NULL)) { >-+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec >-+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq; >-+ } >-+ } >- #else >- { >- struct tms tp; >+@@ -541,7 +541,7 @@ >+ static void init_get_clock(void) >+ { >+ use_rt_clock = 0; >+-#if defined(__linux__) >++#if defined(__linux__) || defined(__FreeBSD__) >+ { >+ struct timespec ts; >+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { >+@@ -553,7 +553,7 @@ >+ >+ static int64_t get_clock(void) >+ { >+-#if defined(__linux__) >++#if defined(__linux__) || defined(__FreeBSD__) >+ if (use_rt_clock) { >+ struct timespec ts; >+ clock_gettime(CLOCK_MONOTONIC, &ts); >Index: files/patch-bsdusb.patch >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v >retrieving revision 1.4 >diff -u -r1.4 patch-bsdusb.patch >--- files/patch-bsdusb.patch 29 Apr 2006 09:15:50 -0000 1.4 >+++ files/patch-bsdusb.patch 23 Jul 2006 19:58:22 -0000 >@@ -1,6 +1,5 @@ > Index: qemu/configure >-@@ -122,7 +122,8 @@ >- *) >+@@ -134,6 +134,7 @@ > oss="yes" > linux="yes" > user="yes" >@@ -8,18 +7,19 @@ > if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then > kqemu="yes" > fi >-@@ -131,6 +132,7 @@ >+@@ -143,6 +144,7 @@ > if [ "$bsd" = "yes" ] ; then >- if [ ! "$darwin" = "yes" ] ; then >+ if [ "$darwin" != "yes" ] ; then > make="gmake" > + usb="bsd" > fi > fi > >-@@ -656,6 +675,19 @@ >- echo "#define _BSD 1" >> $config_h >+@@ -724,6 +726,19 @@ > fi > >+ echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h >++ > +# USB host support > +case "$usb" in > +linux) >@@ -32,20 +32,19 @@ > + echo "HOST_USB=stub" >> $config_mak > +;; > +esac >-+ >- for target in $target_list; do > >+ for target in $target_list; do > target_dir="$target" > Index: qemu/Makefile.target >-@@ -303,7 +303,7 @@ >- endif >+@@ -329,7 +329,7 @@ >+ VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o > > # USB layer >--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 >+-VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o >++VL_OBJS+= usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-ohci.o usb-msd.o > > # PCI network cards >- VL_OBJS+= ne2000.o rtl8139.o >+ VL_OBJS+= ne2000.o rtl8139.o pcnet.o > Index: qemu/usb-stub.c > @@ -0,0 +1,11 @@ > +#include "vl.h" >@@ -60,11 +59,11 @@ > + return NULL; > +} > Index: qemu/usb-bsd.c >-@@ -0,0 +1,592 @@ >+@@ -0,0 +1,603 @@ > +/* > + * BSD host USB redirector > + * >-+ * Copyright (c) 2005 Lonnie Mendez >++ * Copyright (c) 2006 Lonnie Mendez > + * Portions of code and concepts borrowed from > + * usb-linux.c and libusb's bsd.c and are copyright their respective owners. > + * >@@ -336,6 +335,23 @@ > + } > +} > + >++static void usb_host_handle_destroy(USBDevice *opaque) >++{ >++ USBHostDevice *s = (USBHostDevice *)opaque; >++ int i; >++ >++ for (i = 0; i < USB_MAX_ENDPOINTS; i++) >++ if (s->ep_fd[i] >= 0) >++ close(s->ep_fd[i]); >++ >++ if (s->devfd < 0) >++ return; >++ >++ close(s->devfd); >++ >++ qemu_free(s); >++} >++ > +USBDevice *usb_host_device_open(const char *devname) > +{ > + struct usb_device_info bus_info, dev_info; >@@ -409,8 +425,16 @@ > + dev->dev.handle_reset = usb_host_handle_reset; > + dev->dev.handle_control = usb_host_handle_control; > + dev->dev.handle_data = usb_host_handle_data; >++ dev->dev.handle_destroy = usb_host_handle_destroy; >++ >++ if (strncmp(dev_info.udi_product, "product", 7) != 0) >++ pstrcpy(dev->dev.devname, sizeof(dev->dev.devname), >++ dev_info.udi_product); >++ else >++ snprintf(dev->dev.devname, sizeof(dev->dev.devname), >++ "host:%s", devname); > + >-+ strcpy(dev->devpath, "/dev/"); >++ pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/"); > + strcat(dev->devpath, dev_info.udi_devnames[0]); > + > + /* Mark the endpoints as not yet open */ >@@ -426,21 +450,6 @@ > + return NULL; > +} > + >-+void usb_host_device_close(USBDevice *opaque) >-+{ >-+ USBHostDevice *s = (USBHostDevice *)opaque; >-+ int i; >-+ >-+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) >-+ if (s->ep_fd[i] >= 0) >-+ close(s->ep_fd[i]); >-+ >-+ if (s->devfd < 0) >-+ return; >-+ >-+ close(s->devfd); >-+} >-+ > +static int usb_host_scan(void *opaque, USBScanFunc *func) > +{ > + struct usb_device_info bus_info; >@@ -494,7 +503,8 @@ > + speed = dev_info.udi_speed; > + > + if (strncmp(dev_info.udi_product, "product", 7) != 0) >-+ strcpy(product_name, dev_info.udi_product); >++ pstrcpy(product_name, sizeof(product_name), >++ dev_info.udi_product); > + else > + product_name[0] = '\0'; > + >@@ -653,55 +663,6 @@ > +{ > + usb_host_scan(NULL, usb_host_info_device); > +} >-Index: qemu/vl.c >-@@ -3245,14 +3258,17 @@ >- dev = usb_host_device_open(p); >- if (!dev) >- return -1; >-+ dev->isproxied = 1; >- } else if (!strcmp(devname, "mouse")) { >- dev = usb_mouse_init(); >- if (!dev) >- return -1; >-+ dev->isproxied = 0; >- } else if (!strcmp(devname, "tablet")) { >- dev = usb_tablet_init(); >- if (!dev) >- return -1; >-+ dev->isproxied = 0; >- } else { >- return -1; >- } >-@@ -3281,6 +3297,8 @@ >- if (dev && dev->addr == addr) >- break; >- } >-+ if (dev && dev->isproxied) >-+ usb_host_device_close(dev); >- if (i == MAX_VM_USB_PORTS) >- return -1; >- usb_attach(vm_usb_ports[i], NULL); >-Index: qemu/hw/usb.h >-@@ -135,6 +146,8 @@ >- int setup_state; >- int setup_len; >- int setup_index; >-+ >-+ int isproxied; >- }; >- >- /* USB port on which a device can be connected */ >-@@ -157,8 +170,9 @@ >- /* usb-uhci.c */ >- void usb_uhci_init(PCIBus *bus, USBPort **usb_ports); >- >--/* usb-linux.c */ >-+/* host proxy functions */ >- USBDevice *usb_host_device_open(const char *devname); >-+void usb_host_device_close(USBDevice *dev); >- void usb_host_info(void); >- >- /* usb-hid.c */ > Index: qemu/usb-linux.c > @@ -23,7 +23,6 @@ > */ >@@ -710,23 +671,8 @@ > -#if defined(__linux__) > #include <dirent.h> > #include <sys/ioctl.h> >- #include <linux/usbdevice_fs.h> >-@@ -255,6 +254,14 @@ >- return q - buf; >- } >- >-+void usb_host_device_close(USBDevice *opaque) >-+{ >-+ USBHostDevice *s = (USBHostDevice *)opaque; >-+ >-+ if (s->fd >= 0) >-+ close(s->fd); >-+} >-+ >- static int usb_host_scan(void *opaque, USBScanFunc *func) >- { >- FILE *f; >-@@ -468,18 +475,3 @@ >+ #include <linux/compiler.h> >+@@ -505,18 +504,3 @@ > { > usb_host_scan(NULL, usb_host_info_device); > } >Index: files/patch-fbsd >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v >retrieving revision 1.7 >diff -u -r1.7 patch-fbsd >--- files/patch-fbsd 6 May 2006 16:15:41 -0000 1.7 >+++ files/patch-fbsd 3 Aug 2006 17:27:01 -0000 >@@ -1,21 +1,17 @@ > Index: qemu/Makefile >-@@ -13,11 +13,14 @@ >+@@ -25,7 +25,10 @@ >+ DOCS= > endif >- DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 >- >--all: dyngen$(EXESUF) $(TOOLS) $(DOCS) >-+all: bsd/libmath.a dyngen$(EXESUF) $(TOOLS) $(DOCS) >- for d in $(TARGET_DIRS); do \ >- $(MAKE) -C $$d $@ || exit 1 ; \ >- done > >+-all: $(TOOLS) $(DOCS) recurse-all >++all: bsd/libmath.a $(TOOLS) $(DOCS) recurse-all >++ > +bsd/libmath.a: > + ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) >-+ >- qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c >- $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) > >-@@ -26,6 +29,7 @@ >+ subdir-%: dyngen$(EXESUF) >+ $(MAKE) -C $(subst subdir-,,$@) all >+@@ -40,6 +43,7 @@ > > clean: > # avoid old build problems by removing potentially incorrect old files >@@ -36,7 +32,7 @@ > cocoa.o: cocoa.m > $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< > Index: qemu/fpu/softfloat-native.c >-@@ -2,11 +2,15 @@ >+@@ -2,11 +2,16 @@ > context is supported */ > #include "softfloat.h" > #include <math.h> >@@ -47,21 +43,22 @@ > void set_float_rounding_mode(int val STATUS_PARAM) > { > STATUS(float_rounding_mode) = val; >--#if defined(_BSD) && !defined(__APPLE__) >-+#if defined(_BSD) && !defined(__APPLE__) && \ >-+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) >+-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) >++#if defined(_BSD) && !defined(__APPLE__) && !defined(__FreeBSD__) || \ >++ (defined(__FreeBSD__) && __FreeBSD_version < 500000) || \ >++ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > fpsetround(val); > #elif defined(__arm__) > /* nothing to do */ >-@@ -22,7 +26,7 @@ >+@@ -22,7 +25,7 @@ > } > #endif > >--#if defined(_BSD) >-+#if defined(_BSD) && !defined(__FreeBSD__) >- #define lrint(d) ((long)rint(d)) >- #define llrint(d) ((long long)rint(d)) >- #endif >+-#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) >++#if (defined(_BSD) && !defined(__FreeBSD__)) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) >+ #define lrint(d) ((int32_t)rint(d)) >+ #define llrint(d) ((int64_t)rint(d)) >+ #define lrintf(f) ((int32_t)rint(f)) > Index: qemu/fpu/softfloat-native.h > @@ -1,8 +1,28 @@ > /* Native implementation of soft float functions */ >Index: files/patch-vl.c >=================================================================== >RCS file: /home/ncvs/ports/emulators/qemu/files/patch-vl.c,v >retrieving revision 1.3 >diff -u -r1.3 patch-vl.c >--- files/patch-vl.c 3 Dec 2005 03:18:40 -0000 1.3 >+++ files/patch-vl.c 25 Jul 2006 17:19:37 -0000 >@@ -1,6 +1,5 @@ >---- vl.c.orig Mon Nov 14 15:55:56 2005 >-+++ vl.c Mon Nov 14 15:57:25 2005 >-@@ -1363,7 +1367,7 @@ >+Index: qemu/vl.c >+@@ -1510,7 +1510,7 @@ > return chr; > } > >@@ -8,8 +7,8 @@ > +#if defined(__linux__) || defined(__FreeBSD__) > CharDriverState *qemu_chr_open_pty(void) > { >- char slave_name[1024]; >-@@ -1509,6 +1513,7 @@ >+ struct termios tty; >+@@ -1665,6 +1665,7 @@ > return chr; > } > >@@ -17,11 +16,11 @@ > static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) > { > int fd = (int)chr->opaque; >-@@ -1571,6 +1576,7 @@ >+@@ -1727,6 +1728,7 @@ > chr->chr_ioctl = pp_ioctl; > return chr; > } >-+#endif >++#endif /* defined(__linux__) */ > > #else > CharDriverState *qemu_chr_open_pty(void) >Index: files/rtl8139-re-patch Fri Aug 4 23:11:55 2006 >@@ -0,0 +1,10 @@ >+Index: hw/rtl8139.c >+@@ -58,7 +58,7 @@ >+ //#define RTL8139_CALCULATE_RXCRC 1 >+ >+ /* Uncomment to enable on-board timer interrupts */ >+-//#define RTL8139_ONBOARD_TIMER 1 >++#define RTL8139_ONBOARD_TIMER 1 >+ >+ #if defined(RTL8139_CALCULATE_RXCRC) >+ /* For crc32 */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 101381
: 69114