experimental FreeBSD {k,}qemu port update
Here is what I have tested on i386 with kqemu. I also tried -kernel-kqemu with a few linux 2.6 guests but only got panics, one screenshot of KANOTIX-2006-CeBIT-RC3.iso is at
http://www.mytempdir.com/562050 (all panics looked like that).
As amd64 guests with kqemu/amd64 are not supposed to work yet
I think we can't update the port yet, so i only post the following for ppl wanting to experiment...
First the patch for emulators/kqemu-kmod, after that after XXXX
the patch for the qemu port, updating it to today's cvs snapshot:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/kqemu-kmod/Makefile,v retrieving revision 1.3
Makefile +3 -5
@@ -6,15 +6,14 @@ # PORTNAME= kqemu -PORTVERSION= 0.7.2 -PORTREVISION= 1 +PORTVERSION= 1.3.0pre5 CATEGORIES= emulators MASTER_SITES= http://fabrice.bellard.free.fr/qemu/ PKGNAMESUFFIX= -kmod DIST_SUBDIR= kqemu -MAINTAINER= [email protected] -COMMENT= Kernel Acceralator for QEMU CPU Emulator +MAINTAINER= [email protected] +COMMENT= Kernel Acceralator for QEMU CPU Emulator (development version) ONLY_FOR_ARCHS= i386 amd64 NO_PACKAGE= "Depends on kernel, and module not redistributable"
@@ -24,7 +23,6 @@ PLIST_FILES+= "@cwd /" PLIST_FILES+= ${KMODDIR:C,^/,,}/kqemu.ko -WRKSRC= ${WRKDIR}/${PORTNAME} MAKEFILE= Makefile.freebsd .include <bsd.port.pre.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/kqemu-kmod/distinfo,v retrieving revision 1.2
distinfo +3 -3
@@ -1,3 +1,3 @@ -MD5 (kqemu/kqemu-0.7.2.tar.gz) = 02cfdecda90458d6393781496ec6b48b -SHA256 (kqemu/kqemu-0.7.2.tar.gz) = 4158b2c67603f5256a78d0065d715bde068a457aa58bbfef12dda20fe7f7ad8b -SIZE (kqemu/kqemu-0.7.2.tar.gz) = 79314 +MD5 (kqemu/kqemu-1.3.0pre5.tar.gz) = 2dc13fa4645a8d7c69f0f42aabf64cf5 +SHA256 (kqemu/kqemu-1.3.0pre5.tar.gz) = 2f2983393a4e007741685ef4e889fc91fe7619a038fc43998d414e441f5813a7 +SIZE (kqemu/kqemu-1.3.0pre5.tar.gz) = 189395
Index: files/patch-kqemu-freebsd.c
===================================================================
RCS file: /home/ncvs/ports/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c,v retrieving revision 1.2
patch-kqemu-freebsd.c +5 -502
511 lines not on this page · raw message
XXXX here is the patch for emulators/qemu:
Removed files: files/patch-dyngen.h files/patch-hw-ne2000.c files/patch-hw-usb-uhci.c files/patch-hw-usb.c files/patch-sdl.c files/patch-slirp-socket.c files/patch-slirp_throttle files/patch-target-i386-translate.c
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.47
Makefile +7 -13
@@ -6,8 +6,7 @@ # PORTNAME= qemu -PORTVERSION= 0.8.0 -PORTREVISION= 5 +PORTVERSION= 0.8.0s.20060401 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \
@@ -15,10 +14,8 @@ http://qemu.dad-answers.com/download/qemu/:snapshot \ http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \ http://people.freebsd.org/~maho/qemu/:misc -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release -.if defined (WITH_HACKS_IDEDMA) || defined (WITH_HACKS) -DISTFILES+= qemu_dma_patch.tar.gz:idedma -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-04-01_23 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot .if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) DISTFILES+= patch3_cirrus:misc .endif
@@ -33,10 +30,11 @@ RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba .endif .if defined(WITH_KQEMU) -BUILD_DEPENDS+= ${LOCALBASE}/include/kqemu/kqemu.h:${PORTSDIR}/emulators/kqemu-kmod +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod .endif HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl
@@ -48,6 +46,7 @@ ONLY_FOR_ARCHS= amd64 i386 .if defined(WITH_KQEMU) CONFIGURE_ARGS+= --enable-kqemu +CONFLICTS= kqemu-kmod-0* .else CONFIGURE_ARGS+= --disable-kqemu .endif
@@ -64,11 +63,9 @@ @${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_IDEDMA) && !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) +.if !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, 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. 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"
@@ -92,9 +89,6 @@ done post-patch: -.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
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.27
distinfo +3 -9
@@ -1,9 +1,3 @@ -MD5 (qemu/qemu-0.8.0.tar.gz) = eb175b26583280706fe7e4d8910d320d -SHA256 (qemu/qemu-0.8.0.tar.gz) = de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 -SIZE (qemu/qemu-0.8.0.tar.gz) = 1497965 -MD5 (qemu/qemu_dma_patch.tar.gz) = 5e339dc201d411af56bad684d3f89338 -SHA256 (qemu/qemu_dma_patch.tar.gz) = cdf74bf5e079d835e100f116d940686b13ec2b7ed6aee5a6a97a4441ea5f2b8f -SIZE (qemu/qemu_dma_patch.tar.gz) = 25837 -MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 -SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 -SIZE (qemu/patch3_cirrus) = 8817 +MD5 (qemu/qemu-snapshot-2006-04-01_23.tar.bz2) = e40bde18f4f9d5b9306002d4bd308255 +SHA256 (qemu/qemu-snapshot-2006-04-01_23.tar.bz2) = eac9c496d9710d1ecf9223ad7be3fbb674788ba81819b81a98337f8a42e09aed +SIZE (qemu/qemu-snapshot-2006-04-01_23.tar.bz2) = 1286796
Index: files/patch-bsdusb.patch
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.1
patch-bsdusb.patch +2 -1
@@ -1,8 +1,9 @@ Index: qemu/configure -@@ -122,6 +122,7 @@ +@@ -122,7 +122,8 @@ *) oss="yes" linux="yes" + user="yes" +usb="linux" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes"
Index: files/patch-fbsd
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.4
patch-fbsd +2 -29
@@ -1,5 +1,5 @@ Index: qemu/Makefile -@@ -13,7 +13,7 @@ +@@ -13,11 +13,14 @@ endif DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
@@ -8,14 +8,6 @@ for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ done -@@ -21,10 +21,13 @@ - ifdef CONFIG_WIN32 - $(MAKE) -C kqemu -f Makefile.winnt - else -- $(MAKE) -C kqemu -+ ( cd kqemu && $(BSD_MAKE) -f Makefile.freebsd ) - endif - endif +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) )
@@ -23,7 +15,7 @@ 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) -@@ -33,6 +36,7 @@ +@@ -26,6 +29,7 @@ clean: # avoid old build problems by removing potentially incorrect old files
@@ -31,25 +23,6 @@ rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean -@@ -40,7 +44,7 @@ - $(MAKE) -C $$d $@ || exit 1 ; \ - done - ifdef CONFIG_KQEMU -- $(MAKE) -C kqemu clean -+ cd kqemu && $(BSD_MAKE) -f Makefile.freebsd clean - endif - - distclean: clean -@@ -73,9 +77,6 @@ - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done --ifdef CONFIG_KQEMU -- cd kqemu ; ./install.sh --endif - - # various test targets - test speed test2: all Index: qemu/Makefile.target @@ -391,8 +391,8 @@ VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
Quoted 4 lines · Juergen Lock
Here is what I have tested on i386 with kqemu. I also tried -kernel-kqemu with a few linux 2.6 guests but only got panics, one screenshot of KANOTIX-2006-CeBIT-RC3.iso is at
http://www.mytempdir.com/562050 (all panics looked like that).
Update: installed the qemu port (at first i was only using it from within the work dir), and now it works! And pretty fast too! :)
Probably the bios got updated since 0.8.0, or something.
kudos to Fabrice for this nice kqemu update...
Juergen
Quoted 8 lines · Juergen Lock
Quoted 4 lines · Juergen Lock
Here is what I have tested on i386 with kqemu. I also tried -kernel-kqemu with a few linux 2.6 guests but only got panics, one screenshot of KANOTIX-2006-CeBIT-RC3.iso is at
http://www.mytempdir.com/562050 (all panics looked like that).Update: installed the qemu port (at first i was only using it from within the work dir), and now it works! And pretty fast too! :)
A small `benchmark':
1. `normal' kqemu:
480s from `return' in grub until kde desktop up with:
QEMU_AUDIO_DRV=sdl qemu -monitor stdio -cdrom ~/iso/KANOTIX-2006-CeBIT-RC3.iso -m 256 -usb -soundhw es1370 -localtime
then: 47s from clicking on `root shell' menu entry until rxvt up
2. -kernel-kqemu:
128s from `return' in grub until kde desktop up with:
QEMU_AUDIO_DRV=sdl qemu -monitor stdio -cdrom ~/iso/KANOTIX-2006-CeBIT-RC3.iso -m 256 -usb -soundhw es1370 -localtime -kernel-kqemu
then below 5s from clicking on `root shell' menu entry until rxvt up! (dmesg is filled with lines like:
npxdna: fpcurthread == curthread 38482 times
tho)
host CPU: AMD Athlon(tm) XP 2600+ (2075 MHz), 512 MB RAM.
...is vmware much faster? :)
Juergen
In Message-ID: <[email protected]>
Quoted 8 lines · Juergen Lock
Quoted 4 lines · Juergen Lock
Here is what I have tested on i386 with kqemu. I also tried -kernel-kqemu with a few linux 2.6 guests but only got panics, one screenshot of KANOTIX-2006-CeBIT-RC3.iso is at
http://www.mytempdir.com/562050 (all panics looked like that).Update: installed the qemu port (at first i was only using it from within the work dir), and now it works! And pretty fast too! :)
Huge thanks for Fabrice and Juergen!!!
I updated your port with IDE DMA hack:
http://people.freebsd.org/~maho/qemu/qemu20060405.tar.gz
-- NAKATA, Maho ([email protected])
John's IDE DMA patch and qemu cvs (was: Re: [Qemu-devel] Re: experimental FreeBSD {k, }qemu port update)
In article <[email protected]> you write:
Quoted 9 lines
In Message-ID: <[email protected]>
Quoted 6 lines · Juergen Lock
Quoted 4 lines · Juergen Lock
Here is what I have tested on i386 with kqemu. I also tried -kernel-kqemu with a few linux 2.6 guests but only got panics, one screenshot of KANOTIX-2006-CeBIT-RC3.iso is at
http://www.mytempdir.com/562050 (all panics looked like that).
Quoted 6 lines
Quoted 2 lines
Update: installed the qemu port (at first i was only using it from within the work dir), and now it works! And pretty fast too! :)
Huge thanks for Fabrice and Juergen!!!
I updated your port with IDE DMA hack:
http://people.freebsd.org/~maho/qemu/qemu20060405.tar.gz
I just played with this one and tried
qemu -monitor stdio -cdrom ~/iso/KANOTIX-2006-CeBIT-RC3.iso -m 256 -usb -soundhw es1370 -localtime -kernel-kqemu
that gave me the panic mentioned above again! Looks like at least
parts of the qemu-piix4-udma.patch from the IDE DMA hack are still
needed (you omitted this patch probably because it no longer applies to
the used cvs snapshot, which is also why I removed the entire DMA hack
from the update I posted, but then I forgot that I still had the
patched bios installed when I first tried -kernel-kqemu...)
Quoted 1 line · Juergen Lock
Here is what I have tested on i386 with kqemu. [...]
Updated version using yesterday's cvs snapshot and malc's latest sound patch (still needs the kqemu port update from the linked message which is archived here:
http://docs.freebsd.org/cgi/mid.cgi?20060401222151.GA45952
)
With this you no longer need QEMU_AUDIO_DRV=sdl to get sound working
with linux alsa guests. (thanks malc!)
Removed files:files/patch-dyngen.h files/patch-hw-ne2000.c files/patch-hw-usb-uhci.c files/patch-hw-usb.c files/patch-sdl.c files/patch-slirp-socket.c files/patch-slirp_throttle files/patch-target-i386-translate.c
New file:
files/patch-malc-17h_aqemu
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.47
Makefile +6 -13
@@ -6,8 +6,7 @@ # PORTNAME= qemu -PORTVERSION= 0.8.0 -PORTREVISION= 5 +PORTVERSION= 0.8.0s.20060408 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \
@@ -15,10 +14,8 @@ http://qemu.dad-answers.com/download/qemu/:snapshot \ http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \ http://people.freebsd.org/~maho/qemu/:misc -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release -.if defined (WITH_HACKS_IDEDMA) || defined (WITH_HACKS) -DISTFILES+= qemu_dma_patch.tar.gz:idedma -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-04-08_23 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot .if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) DISTFILES+= patch3_cirrus:misc .endif
@@ -33,10 +30,11 @@ RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba .endif .if defined(WITH_KQEMU) -BUILD_DEPENDS+= ${LOCALBASE}/include/kqemu/kqemu.h:${PORTSDIR}/emulators/kqemu-kmod +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod .endif HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl
@@ -64,11 +62,9 @@ @${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_IDEDMA) && !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) +.if !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, 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. 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"
@@ -92,9 +88,6 @@ done post-patch: -.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
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.27
distinfo +3 -6
@@ -1,9 +1,6 @@ -MD5 (qemu/qemu-0.8.0.tar.gz) = eb175b26583280706fe7e4d8910d320d -SHA256 (qemu/qemu-0.8.0.tar.gz) = de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 -SIZE (qemu/qemu-0.8.0.tar.gz) = 1497965 -MD5 (qemu/qemu_dma_patch.tar.gz) = 5e339dc201d411af56bad684d3f89338 -SHA256 (qemu/qemu_dma_patch.tar.gz) = cdf74bf5e079d835e100f116d940686b13ec2b7ed6aee5a6a97a4441ea5f2b8f -SIZE (qemu/qemu_dma_patch.tar.gz) = 25837 +MD5 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 74fd8046d94d5d800f1df35282dba733 +SHA256 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 5cdcab83fa0fa6188c846f2d9c96d019300f6c7742d2ecf3cceae0a014fd6318 +SIZE (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 1288264 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817
Index: files/patch-bsdusb.patch
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.1
patch-bsdusb.patch +2 -1
@@ -1,8 +1,9 @@ Index: qemu/configure -@@ -122,6 +122,7 @@ +@@ -122,7 +122,8 @@ *) oss="yes" linux="yes" + user="yes" +usb="linux" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes"
Index: files/patch-fbsd
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.4
patch-fbsd +2 -29
@@ -1,5 +1,5 @@ Index: qemu/Makefile -@@ -13,7 +13,7 @@ +@@ -13,11 +13,14 @@ endif DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
@@ -8,14 +8,6 @@ for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ done -@@ -21,10 +21,13 @@ - ifdef CONFIG_WIN32 - $(MAKE) -C kqemu -f Makefile.winnt - else -- $(MAKE) -C kqemu -+ ( cd kqemu && $(BSD_MAKE) -f Makefile.freebsd ) - endif - endif +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) )
@@ -23,7 +15,7 @@ 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) -@@ -33,6 +36,7 @@ +@@ -26,6 +29,7 @@ clean: # avoid old build problems by removing potentially incorrect old files
@@ -31,25 +23,6 @@ rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean -@@ -40,7 +44,7 @@ - $(MAKE) -C $$d $@ || exit 1 ; \ - done - ifdef CONFIG_KQEMU -- $(MAKE) -C kqemu clean -+ cd kqemu && $(BSD_MAKE) -f Makefile.freebsd clean - endif - - distclean: clean -@@ -73,9 +77,6 @@ - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done --ifdef CONFIG_KQEMU -- cd kqemu ; ./install.sh --endif - - # various test targets - test speed test2: all Index: qemu/Makefile.target @@ -391,8 +391,8 @@ VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
Index: files/patch-malc-17h_aqemu
@@ -0,0 +1,243 @@
+Index: qemu/audio/alsaaudio.c
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/audio/alsaaudio.c,v +retrieving revision 1.1.1.4
+retrieving revision 1.1.1.1.2.8
+diff -u -r1.1.1.4 -r1.1.1.1.2.8
+--- audio/alsaaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4
++++ audio/alsaaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.8
+@@ -61,8 +61,8 @@
+ .size_in_usec_in = 1,
+ .size_in_usec_out = 1,
+ #endif
+- .pcm_name_out = "hw:0,0", +- .pcm_name_in = "hw:0,0", ++ .pcm_name_out = "default", ++ .pcm_name_in = "default",
+ #ifdef HIGH_LATENCY
+ .buffer_size_in = 400000,
+ .period_size_in = 400000 / 4,
+Index: qemu/audio/audio.h
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/audio/audio.h,v +retrieving revision 1.1.1.3
+retrieving revision 1.1.1.1.2.5
+diff -u -r1.1.1.3 -r1.1.1.1.2.5
+--- audio/audio.h 21 Nov 2005 12:47:06 -0000 1.1.1.3
++++ audio/audio.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.5
+@@ -111,7 +111,7 @@
+ }
+
+ uint32_t popcount (uint32_t u);
+-inline uint32_t lsbindex (uint32_t u);
++uint32_t lsbindex (uint32_t u);
+
+ #ifdef __GNUC__
+ #define audio_MIN(a, b) ( __extension__ ({ \
+Index: qemu/audio/dsound_template.h
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsound_template.h,v +retrieving revision 1.1.1.2
+retrieving revision 1.1.1.1.2.2
+diff -u -r1.1.1.2 -r1.1.1.1.2.2
+--- audio/dsound_template.h 5 Nov 2005 20:42:14 -0000 1.1.1.2
++++ audio/dsound_template.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2
+@@ -70,7 +70,13 @@
+ int i; + LPVOID p1 = NULL, p2 = NULL; + DWORD blen1 = 0, blen2 = 0; ++ DWORD flag;
+
++#ifdef DSBTYPE_IN
++ flag = entire ? DSCBLOCK_ENTIREBUFFER : 0;
++#else
++ flag = entire ? DSBLOCK_ENTIREBUFFER : 0;
++#endif
+ for (i = 0; i < conf.lock_retries; ++i) {
+ hr = glue (IFACE, _Lock) (
+ buf,
+@@ -80,13 +86,7 @@
+ &blen1, + &p2, + &blen2, +- (entire +-#ifdef DSBTYPE_IN +- ? DSCBLOCK_ENTIREBUFFER +-#else +- ? DSBLOCK_ENTIREBUFFER +-#endif +- : 0) ++ flag + );
+
+ if (FAILED (hr)) {
+Index: qemu/audio/dsoundaudio.c
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsoundaudio.c,v +retrieving revision 1.1.1.2
+retrieving revision 1.1.1.1.2.2
+diff -u -r1.1.1.2 -r1.1.1.1.2.2
+--- audio/dsoundaudio.c 5 Nov 2005 20:42:14 -0000 1.1.1.2
++++ audio/dsoundaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2
+@@ -987,6 +987,12 @@
+ hr = IDirectSound_Initialize (s->dsound, NULL);
+ if (FAILED (hr)) {
+ dsound_logerr (hr, "Could not initialize DirectSound\n");
++
++ hr = IDirectSound_Release (s->dsound);
++ if (FAILED (hr)) {
++ dsound_logerr (hr, "Could not release DirectSound\n");
++ } ++ s->dsound = NULL; + return NULL;
+ }
+
+Index: qemu/audio/ossaudio.c
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/audio/ossaudio.c,v +retrieving revision 1.1.1.4
+retrieving revision 1.1.1.1.2.5
+diff -u -r1.1.1.4 -r1.1.1.1.2.5
+--- audio/ossaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4
++++ audio/ossaudio.c 7 Apr 2006 22:23:42 -0000 1.1.1.1.2.5
+@@ -324,9 +324,18 @@
+ return 0;
+ }
+
+- if (abinfo.bytes < 0 || abinfo.bytes > bufsize) {
+- ldebug ("warning: Invalid available size, size=%d bufsize=%d\n",
+- abinfo.bytes, bufsize);
++ if (abinfo.bytes > bufsize) {++#ifndef __FreeBSD__
++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n"
++ "please report your OS/audio hw to [email protected]\n",
++ abinfo.bytes, bufsize);
++#endif
++ abinfo.bytes = bufsize;
++ }
++
++ if (abinfo.bytes < 0) {
++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n",
++ abinfo.bytes, bufsize);
+ return 0;
+ }
+
+Index: qemu/hw/es1370.c
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/hw/es1370.c,v +retrieving revision 1.1.1.4
+retrieving revision 1.1.1.1.2.7
+diff -u -r1.1.1.4 -r1.1.1.1.2.7
+--- hw/es1370.c 21 Nov 2005 12:47:06 -0000 1.1.1.4
++++ hw/es1370.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.7
+@@ -479,9 +479,10 @@
+ IO_WRITE_PROTO (es1370_writeb)
+ {
+ ES1370State *s = opaque;
+- addr = es1370_fixup (s, addr);
+ uint32_t shift, mask;
+
++ addr = es1370_fixup (s, addr);
++
+ switch (addr) {
+ case ES1370_REG_CONTROL:
+ case ES1370_REG_CONTROL + 1:+Index: qemu/hw/sb16.c
+===================================================================
+RCS file: /home/malc/cvsroot/bellard/qemu/hw/sb16.c,v +retrieving revision 1.1.1.4
+retrieving revision 1.1.1.1.2.6
+diff -u -r1.1.1.4 -r1.1.1.1.2.6
+--- hw/sb16.c 21 Nov 2005 12:47:06 -0000 1.1.1.4
++++ hw/sb16.c 7 Apr 2006 22:23:59 -0000 1.1.1.1.2.6
+@@ -193,6 +193,31 @@
+ #define DMA8_AUTO 1
+ #define DMA8_HIGH 2
+
++static void continue_dma8 (SB16State *s) ++{
++ if (s->freq > 0) {
++ audsettings_t as;
++
++ s->audio_free = 0;
++
++ as.freq = s->freq; ++ as.nchannels = 1 << s->fmt_stereo; ++ as.fmt = s->fmt; ++ ++ s->voice = AUD_open_out ( ++ &s->card, ++ s->voice, ++ "sb16", ++ s, ++ SB_audio_callback, ++ &as, ++ 0 /* little endian */ ++ );
++ }
++
++ control (s, 1);
++}
++
+ static void dma_cmd8 (SB16State *s, int mask, int dma_len)
+ {
+ s->fmt = AUD_FMT_U8;
+@@ -201,7 +226,8 @@
+ s->fmt_signed = 0;
+ s->fmt_stereo = (s->mixer_regs[0x0e] & 2) != 0;
+ if (-1 == s->time_const) {
+- s->freq = 11025;
++ if (s->freq <= 0)
++ s->freq = 11025;
+ }
+ else {
+ int tmp = (256 - s->time_const);+@@ -239,27 +265,7 @@
+ s->freq, s->fmt_stereo, s->fmt_signed, s->fmt_bits,
+ s->block_size, s->dma_auto, s->fifo, s->highspeed);
+
+- if (s->freq) {
+- audsettings_t as;
+-
+- s->audio_free = 0;
+-
+- as.freq = s->freq;
+- as.nchannels = 1 << s->fmt_stereo;
+- as.fmt = s->fmt;
+-
+- s->voice = AUD_open_out (
+- &s->card,
+- s->voice,
+- "sb16",
+- s,
+- SB_audio_callback,
+- &as,
+- 0 /* little endian */
+- );
+- }
+-
+- control (s, 1);
++ continue_dma8 (s);
+ speaker (s, 1);+ }
+
+@@ -437,7 +443,7 @@
+ break;
+
+ case 0x1c: /* Auto-Initialize DMA DAC, 8-bit */
+- control (s, 1); ++ dma_cmd8 (s, DMA8_AUTO, -1); + break;
+
+ case 0x20: /* Direct ADC, Juice/PL */
+@@ -531,7 +537,9 @@
+ break;
+
+ case 0xd4: /* continue DMA operation. 8bit */
+- control (s, 1); ++ /* KQ6 (or maybe Sierras audblst.drv in general) resets ++ the frequency between halt/continue */ ++ continue_dma8 (s); + break;
+
+ case 0xd5: /* halt DMA operation. 16bit */