qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED)
With the help of Lonnie Mendez (he updated his usb host support patch) I just put together an experimental qemu port update. For some reason my usb cardreader didnt want to work today:
uhub1: device problem (SET_ADDR_FAILED), disabling port 1
(anyone have an idea about this one? this is the first time i tried using it since I updated this box to 6.1), so the usb host support is untested.
To test usb best run qemu with -monitor stdio, then do `info usbhost'
when its running and then usb_add host:<x.y>' where x.y is the host device you want to add (plug into' the guest). also see the port's pkg-message.
enjoy,
Juergen
Removed files: files/patch-malc-17h_aqemu files/patch-sdl.c files/patch-vl.c
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.53
Makefile +1 -2
@@ -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 \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.31
distinfo +3 -3
@@ -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
pkg-descr +2 -2
@@ -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-plist
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v retrieving revision 1.15
pkg-plist +1 -1
@@ -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
patch-be +12 -16
@@ -1,16 +1,12 @@ -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; +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: files/patch-bsdusb.patch
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.4
patch-bsdusb.patch +44 -98
219 lines not on this page · raw message
Index: files/patch-fbsd
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.7
patch-fbsd +17 -22
@@ -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,14 @@ context is supported */ #include "softfloat.h" #include <math.h>
@@ -47,21 +43,20 @@ 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(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (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 */
[Qemu-devel] FreeBSD! :) (was: Re: qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED))
Quoted 2 lines · Juergen Lock
With the help of Lonnie Mendez (he updated his usb host support patch) I just put together an experimental qemu port update. ...
As you maybe guessed from the mail header (To:) I'm talking about the FreeBSD port of qemu. Sorry if I confused anyone by not saying so... (was about to post to FreeBSD lists, then only added qemu-devel later :)
[Qemu-devel] Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED)
In reply to Juergen LockQuoted 11 lines · Juergen Lock
With the help of Lonnie Mendez (he updated his usb host support patch) I just put together an experimental qemu port update. For some reason my usb cardreader didnt want to work today:
uhub1: device problem (SET_ADDR_FAILED), disabling port 1
(anyone have an idea about this one? this is the first time i tried using it since I updated this box to 6.1), so the usb host support is untested.To test usb best run qemu with -monitor stdio, then do `info usbhost'
when its running and thenusb_add host:<x.y>' where x.y is the host device you want to add (plug into' the guest). also see the port's pkg-message.
some quick test have been done on usb now (cardreader started working again without me doing anything), also Bakul Shah tested usb with a w2k guest. usb is slow tho... (and watch out for the new pkg-message note below.)
Also Jung-uk Kim made me aware that FreeBSD has clock_gettime(2) too
and provided a patch to enable it.
And I noted -kernel-kqemu doesnt seem to be faster than `regular'
kqemu anymore (subjectively it once even seemd a little slower!), example startup time of root shell xterm on KANOTIX-2006-Easter-RC4.iso went up from maybe 5 to over 20 seconds, and qemu now takes some 30% cpu here even when the guest is idle. And, I got two qemu hangs (guest suddenly hangs completly, qemu eating 99% cpu) with -kernel-kqemu. So, if anyone has any ideas about this... (can the new timing code slow things down that much?)
Oh, host has a single 2.0something GHz athlon cpu and 512 MB ram.
new qemu port update below, enjoy,
Juergen
Removed files: files/patch-malc-17h_aqemu files/patch-sdl.c
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.53
Makefile +1 -2
@@ -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 \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.31
distinfo +3 -3
@@ -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
pkg-descr +2 -2
@@ -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
pkg-message +5 -0
@@ -45,4 +45,9 @@ 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. ====
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v retrieving revision 1.15
pkg-plist +1 -1
@@ -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
patch-be +30 -15
46 lines not on this page · raw message
Index: files/patch-bsdusb.patch
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.4
patch-bsdusb.patch +44 -98
219 lines not on this page · raw message
Index: files/patch-fbsd
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.7
patch-fbsd +17 -22
@@ -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,14 @@ context is supported */ #include "softfloat.h" #include <math.h>
@@ -47,21 +43,20 @@ 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(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (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
patch-vl.c +6 -7
@@ -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 )
[Qemu-devel] Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED)
patch-fbsd line 50
Quoted 12 lines · Juergen Lock
patch-fbsd +2
-3@@ -47,21 +43,20 @@ 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(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */
FYI, a parenthesis is misplaced (Note: I just rearranged the order to be more clearer):
+-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && !defined(__APPLE__) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) || \ ++ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
Actually it is an upstream bug, though.
Thanks,
Jung-uk Kim
[Qemu-devel] Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED)
Quoted 17 lines · Jung-uk Kim
patch-fbsd line 50
Quoted 12 lines · Juergen Lock
patch-fbsd +2
-3@@ -47,21 +43,20 @@ 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(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */FYI, a parenthesis is misplaced (Note: I just rearranged the order to be more clearer):
Quoted 3 lines
+-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && !defined(__APPLE__) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) || \ ++ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
Well this should actually be:
#if defined(_BSD) && !defined(__APPLE__) && !defined(__FreeBSD__) || \
(defined(__FreeBSD__) && __FreeBSD_version < 500000) || \
(defined(HOST_SOLARIS) && HOST_SOLARIS < 10)if it ever was going to be merged back. (wrongly excluded non-FreeBSD BSDs)
Quoted 2 lines
Actually it is an upstream bug, though.
Nah, the parens there are okay... (|| binds less than &&, i.e.
1 || 0 && 0 evaluates to 1.)
On another note, am i the only one seeing those -kernel-kqemu problems?
thanx,
Juergen