Index: head/emulators/qemu/Makefile =================================================================== --- head/emulators/qemu/Makefile (revision 175960) +++ head/emulators/qemu/Makefile (revision 175961) @@ -1,116 +1,111 @@ # New ports collection makefile for: qemu # Date created: 2004/05/31 # Whom: Juergen Lock # # $FreeBSD$ # PORTNAME= qemu -PORTVERSION= 0.8.2 -PORTREVISION= 2 +PORTVERSION= 0.8.2s.20061031 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ + http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \ http://people.fruitsalad.org/nox/qemu/:snapshot \ http://www.volny.cz/xnavara/qemu/:snapshot \ - 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_CIRRUS) || defined (WITH_HACKS) -DISTFILES+= patch3_cirrus:misc -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-10-31_05 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot DIST_SUBDIR= qemu EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator -BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html -.if defined(WITH_SAMBA) -RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3 -.endif -.if defined(WITH_KQEMU) -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 USE_PERL5= yes +USE_GCC= 3.4 PATCH_STRIP= -p1 CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} MAKE_ENV+= BSD_MAKE="${MAKE}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" MAN1= qemu.1 qemu-img.1 ONLY_FOR_ARCHS= amd64 i386 + +OPTIONS= KQEMU "Build with (alpha!) accelerator module" Off \ + HACKS_CIRRUS "Large display speedup (buggy!)" Off \ + RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \ + SAMBA "samba dependency (for -smb)" Off \ + SDL "SDL/X dependency (graphical output)" On \ + CDROM_DMA "IDE CDROM DMA" On + +.include + WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation +.if defined(WITHOUT_SDL) +CONFIGURE_ARGS+= --disable-sdl --disable-gfx-check +.else +USE_SDL= sdl +.endif + +.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) +DISTFILES+= patch3_cirrus:misc +.endif + +.if defined(WITH_SAMBA) +RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3 +.endif + .if defined(WITH_KQEMU) +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod CONFIGURE_ARGS+= --enable-kqemu .else CONFIGURE_ARGS+= --disable-kqemu .endif -.include +.if defined(NOPORTDOCS) +MAKE_ARGS+= NOPORTDOCS=${NOPORTDOCS} +.else +BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html +.endif .if ${ARCH} == "amd64" MAKE_ARGS+= ARCH=x86_64 .endif -USE_GCC= 3.4 -pre-everything:: -.if !defined(WITH_KQEMU) - @${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_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} "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)" - @${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 @${TOUCH} ${WRKSRC}/kqemu/Makefile @${ECHO} all: > ${WRKSRC}/kqemu/Makefile.freebsd pre-patch: @for A in ${ONLY_FOR_ARCHS}; do \ ${MKDIR} ${WRKSRC}/bsd/$$A; \ done post-patch: .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 +.if !defined(WITHOUT_CDROM_DMA) + @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch .endif @${REINPLACE_CMD} -E \ -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing," \ -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ ${WRKSRC}/Makefile.target @${REINPLACE_CMD} -E \ -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing -I.," \ -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ ${WRKSRC}/Makefile post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/emulators/qemu/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.57 \ No newline at end of property +1.58 \ No newline at end of property Index: head/emulators/qemu/distinfo =================================================================== --- head/emulators/qemu/distinfo (revision 175960) +++ head/emulators/qemu/distinfo (revision 175961) @@ -1,6 +1,6 @@ -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/qemu-snapshot-2006-10-31_05.tar.bz2) = ff3943d14548b6e1b99ad3a052af5df6 +SHA256 (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = af189f92043e7280589021e2ddabe3758f413ada6db674504b67358f153bf766 +SIZE (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = 1493895 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 Property changes on: head/emulators/qemu/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.32 \ No newline at end of property +1.33 \ No newline at end of property Index: head/emulators/qemu/files/cdrom-dma-patch =================================================================== --- head/emulators/qemu/files/cdrom-dma-patch (nonexistent) +++ head/emulators/qemu/files/cdrom-dma-patch (revision 175961) @@ -0,0 +1,10 @@ +Index: hw/ide.c +@@ -27,7 +27,7 @@ + //#define DEBUG_IDE + //#define DEBUG_IDE_ATAPI + //#define DEBUG_AIO +-#define USE_DMA_CDROM ++// #define USE_DMA_CDROM + + /* Bits of HD_STATUS */ + #define ERR_STAT 0x01 Property changes on: head/emulators/qemu/files/cdrom-dma-patch ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu/files/patch-Makefile =================================================================== --- head/emulators/qemu/files/patch-Makefile (nonexistent) +++ head/emulators/qemu/files/patch-Makefile (revision 175961) @@ -0,0 +1,11 @@ +Index: qemu/Makefile +@@ -28,7 +28,8 @@ + ifndef CONFIG_DARWIN + ifndef CONFIG_WIN32 + ifndef CONFIG_SOLARIS +-LIBS+=-lrt ++# XXX need ifndef CONFIG_BSD ++# LIBS+=-lrt + endif + endif + endif Property changes on: head/emulators/qemu/files/patch-Makefile ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu/files/patch-vl.c-serial =================================================================== --- head/emulators/qemu/files/patch-vl.c-serial (nonexistent) +++ head/emulators/qemu/files/patch-vl.c-serial (revision 175961) @@ -0,0 +1,17 @@ +Index: qemu/vl.c +@@ -1606,10 +1606,13 @@ + cfsetospeed(&tty, spd); + + tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP +- |INLCR|IGNCR|ICRNL|IXON); +- tty.c_oflag |= OPOST; ++ |INLCR|IGNCR|ICRNL|IXON|IMAXBEL); ++ tty.c_oflag &= ~OPOST; /* Don't do any output processing! */ + tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG); + tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB); ++#ifdef __FreeBSD__ ++ cfmakeraw(&tty); ++#endif + switch(data_bits) { + default: + case 8: Property changes on: head/emulators/qemu/files/patch-vl.c-serial ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu/files/patch-vl.h =================================================================== --- head/emulators/qemu/files/patch-vl.h (nonexistent) +++ head/emulators/qemu/files/patch-vl.h (revision 175961) @@ -0,0 +1,12 @@ +Index: qemu/vl.h +@@ -73,6 +73,10 @@ + #define PRIo64 "I64o" + #endif + ++#ifndef ENOMEDIUM ++#define ENOMEDIUM 4097 ++#endif ++ + #ifdef QEMU_TOOL + + /* we use QEMU_TOOL in the command line tools which do not depend on Property changes on: head/emulators/qemu/files/patch-vl.h ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu/pkg-message =================================================================== --- head/emulators/qemu/pkg-message (revision 175960) +++ head/emulators/qemu/pkg-message (revision 175961) @@ -1,59 +1,68 @@ ==== FreeBSD host notes: - needs to run as root in order to use /dev/tap* networking (why?) (actually RELENG_6 and above now has a sysctl net.link.tap.user_open to allow users to use it too. don't forget to adjust device node permissions in /etc/devfs.rules.) - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but i've been told that that's normal. (fixed on FreeSBIE 1.1.) and you have to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is routed to 127.1 on the host. - expect timer problems when guest kernel HZ is > hosts, for example time sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000, and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.) The linux 2.6 kernel uses 1000 by default btw (changed to 250 recently). Enabling /dev/rtc doesn't seem to help either (not included since it needs a patch to emulators/rtc.) - using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl.) - the -smb option (smb-export local dir to guest) needs the net/samba3 port/package installed in addition to qemu. - RELENG_6 and up guests often crash while accessing the emulated cdrom (see kern/84102, http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/84102), using a kernel without PREEMPTION has been reported to fix this problem. (or do an ftp install instead of installing from the emulated cdrom, and then make a new kernel.) [fixed since 6.0-R.] - 6.0-RC1 was released with an ed driver that doesn't like qemu's emulated RTL8029 nic, this has been fixed in the meantime but if for some reason you need to use that version as a guest you can temporarily add the patch in this message: http://docs.freebsd.org/cgi/mid.cgi?200510131428.21211.jkim (not included in the port since the used VIA VT86C926 PCI ID does not really match the emulated nic exactly, it just `happens' to work with 6.0-RC1's driver.) - if you want to use usb devices connected to the host in the guest (usb_add host:... monitor command) you need to make sure the host isn't claiming them, e.g. for umass devices (like memory sticks or external harddrives) make sure umass isn't in the kernel (you can then still load it as a kld when needed), also unless you are running qemu as root you then need to fix permissions for /dev/ugen* device nodes: if you are on 5.x or later (devfs) put a rule in /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs restart. example devfs.rules: [ugen_ruleset=20] 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. +rtl8139 timer by building the port with RTL8139_TIMER enabled. (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.) +- qemu now uses aio at least for ide dma, so if you get `Bad system call' +crashes that is because aio is not (kld)loaded. +- if you get repeated `atapi_poll called!' console messages with FreeBSD +guests or other weird cdrom problems then thats probably because the guest +has atapicam loaded, which for reasons still to be determined has problems +with qemu's now by default enabled cdrom dma. You can build the port with +CDROM_DMA disabled to disable it. +- if you build qemu wihout SDL and then get crashes running it try passing +it -nographic. This should probably be default in that case... ==== Property changes on: head/emulators/qemu/pkg-message ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.15 \ No newline at end of property +1.16 \ No newline at end of property Index: head/emulators/qemu/pkg-plist =================================================================== --- head/emulators/qemu/pkg-plist (revision 175960) +++ head/emulators/qemu/pkg-plist (revision 175961) @@ -1,55 +1,55 @@ bin/qemu bin/qemu-img bin/qemu-system-arm bin/qemu-system-mips bin/qemu-system-mipsel bin/qemu-system-ppc bin/qemu-system-sparc bin/qemu-system-x86_64 %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/bios.bin %%DATADIR%%/linux_boot.bin %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/ppc_rom.bin %%DATADIR%%/openbios-sparc32 %%DATADIR%%/video.x %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/common %%DATADIR%%/keymaps/da %%DATADIR%%/keymaps/de %%DATADIR%%/keymaps/de-ch %%DATADIR%%/keymaps/en-gb %%DATADIR%%/keymaps/en-us %%DATADIR%%/keymaps/es %%DATADIR%%/keymaps/et %%DATADIR%%/keymaps/fi %%DATADIR%%/keymaps/fo %%DATADIR%%/keymaps/fr %%DATADIR%%/keymaps/fr-be %%DATADIR%%/keymaps/fr-ca %%DATADIR%%/keymaps/fr-ch %%DATADIR%%/keymaps/hr %%DATADIR%%/keymaps/hu %%DATADIR%%/keymaps/is %%DATADIR%%/keymaps/it %%DATADIR%%/keymaps/ja %%DATADIR%%/keymaps/lt %%DATADIR%%/keymaps/lv %%DATADIR%%/keymaps/mk %%DATADIR%%/keymaps/modifiers %%DATADIR%%/keymaps/nl %%DATADIR%%/keymaps/nl-be %%DATADIR%%/keymaps/no %%DATADIR%%/keymaps/pl %%DATADIR%%/keymaps/pt %%DATADIR%%/keymaps/pt-br %%DATADIR%%/keymaps/ru %%DATADIR%%/keymaps/sl %%DATADIR%%/keymaps/sv %%DATADIR%%/keymaps/th %%DATADIR%%/keymaps/tr @dirrm %%DATADIR%%/keymaps @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% Property changes on: head/emulators/qemu/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.16 \ No newline at end of property +1.17 \ No newline at end of property Index: head/emulators/qemu-devel/Makefile =================================================================== --- head/emulators/qemu-devel/Makefile (revision 175960) +++ head/emulators/qemu-devel/Makefile (revision 175961) @@ -1,116 +1,111 @@ # New ports collection makefile for: qemu # Date created: 2004/05/31 # Whom: Juergen Lock # # $FreeBSD$ # PORTNAME= qemu -PORTVERSION= 0.8.2 -PORTREVISION= 2 +PORTVERSION= 0.8.2s.20061031 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ + http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \ http://people.fruitsalad.org/nox/qemu/:snapshot \ http://www.volny.cz/xnavara/qemu/:snapshot \ - 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_CIRRUS) || defined (WITH_HACKS) -DISTFILES+= patch3_cirrus:misc -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-10-31_05 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot DIST_SUBDIR= qemu EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator -BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html -.if defined(WITH_SAMBA) -RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3 -.endif -.if defined(WITH_KQEMU) -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 USE_PERL5= yes +USE_GCC= 3.4 PATCH_STRIP= -p1 CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} MAKE_ENV+= BSD_MAKE="${MAKE}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" MAN1= qemu.1 qemu-img.1 ONLY_FOR_ARCHS= amd64 i386 + +OPTIONS= KQEMU "Build with (alpha!) accelerator module" Off \ + HACKS_CIRRUS "Large display speedup (buggy!)" Off \ + RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \ + SAMBA "samba dependency (for -smb)" Off \ + SDL "SDL/X dependency (graphical output)" On \ + CDROM_DMA "IDE CDROM DMA" On + +.include + WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation +.if defined(WITHOUT_SDL) +CONFIGURE_ARGS+= --disable-sdl --disable-gfx-check +.else +USE_SDL= sdl +.endif + +.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) +DISTFILES+= patch3_cirrus:misc +.endif + +.if defined(WITH_SAMBA) +RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3 +.endif + .if defined(WITH_KQEMU) +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod CONFIGURE_ARGS+= --enable-kqemu .else CONFIGURE_ARGS+= --disable-kqemu .endif -.include +.if defined(NOPORTDOCS) +MAKE_ARGS+= NOPORTDOCS=${NOPORTDOCS} +.else +BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html +.endif .if ${ARCH} == "amd64" MAKE_ARGS+= ARCH=x86_64 .endif -USE_GCC= 3.4 -pre-everything:: -.if !defined(WITH_KQEMU) - @${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_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} "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)" - @${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 @${TOUCH} ${WRKSRC}/kqemu/Makefile @${ECHO} all: > ${WRKSRC}/kqemu/Makefile.freebsd pre-patch: @for A in ${ONLY_FOR_ARCHS}; do \ ${MKDIR} ${WRKSRC}/bsd/$$A; \ done post-patch: .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 +.if !defined(WITHOUT_CDROM_DMA) + @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch .endif @${REINPLACE_CMD} -E \ -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing," \ -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ ${WRKSRC}/Makefile.target @${REINPLACE_CMD} -E \ -e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing -I.," \ -e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \ ${WRKSRC}/Makefile post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/emulators/qemu-devel/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.57 \ No newline at end of property +1.58 \ No newline at end of property Index: head/emulators/qemu-devel/distinfo =================================================================== --- head/emulators/qemu-devel/distinfo (revision 175960) +++ head/emulators/qemu-devel/distinfo (revision 175961) @@ -1,6 +1,6 @@ -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/qemu-snapshot-2006-10-31_05.tar.bz2) = ff3943d14548b6e1b99ad3a052af5df6 +SHA256 (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = af189f92043e7280589021e2ddabe3758f413ada6db674504b67358f153bf766 +SIZE (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = 1493895 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 Property changes on: head/emulators/qemu-devel/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.32 \ No newline at end of property +1.33 \ No newline at end of property Index: head/emulators/qemu-devel/files/cdrom-dma-patch =================================================================== --- head/emulators/qemu-devel/files/cdrom-dma-patch (nonexistent) +++ head/emulators/qemu-devel/files/cdrom-dma-patch (revision 175961) @@ -0,0 +1,10 @@ +Index: hw/ide.c +@@ -27,7 +27,7 @@ + //#define DEBUG_IDE + //#define DEBUG_IDE_ATAPI + //#define DEBUG_AIO +-#define USE_DMA_CDROM ++// #define USE_DMA_CDROM + + /* Bits of HD_STATUS */ + #define ERR_STAT 0x01 Property changes on: head/emulators/qemu-devel/files/cdrom-dma-patch ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu-devel/files/patch-Makefile =================================================================== --- head/emulators/qemu-devel/files/patch-Makefile (nonexistent) +++ head/emulators/qemu-devel/files/patch-Makefile (revision 175961) @@ -0,0 +1,11 @@ +Index: qemu/Makefile +@@ -28,7 +28,8 @@ + ifndef CONFIG_DARWIN + ifndef CONFIG_WIN32 + ifndef CONFIG_SOLARIS +-LIBS+=-lrt ++# XXX need ifndef CONFIG_BSD ++# LIBS+=-lrt + endif + endif + endif Property changes on: head/emulators/qemu-devel/files/patch-Makefile ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu-devel/files/patch-vl.c-serial =================================================================== --- head/emulators/qemu-devel/files/patch-vl.c-serial (nonexistent) +++ head/emulators/qemu-devel/files/patch-vl.c-serial (revision 175961) @@ -0,0 +1,17 @@ +Index: qemu/vl.c +@@ -1606,10 +1606,13 @@ + cfsetospeed(&tty, spd); + + tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP +- |INLCR|IGNCR|ICRNL|IXON); +- tty.c_oflag |= OPOST; ++ |INLCR|IGNCR|ICRNL|IXON|IMAXBEL); ++ tty.c_oflag &= ~OPOST; /* Don't do any output processing! */ + tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG); + tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB); ++#ifdef __FreeBSD__ ++ cfmakeraw(&tty); ++#endif + switch(data_bits) { + default: + case 8: Property changes on: head/emulators/qemu-devel/files/patch-vl.c-serial ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu-devel/files/patch-vl.h =================================================================== --- head/emulators/qemu-devel/files/patch-vl.h (nonexistent) +++ head/emulators/qemu-devel/files/patch-vl.h (revision 175961) @@ -0,0 +1,12 @@ +Index: qemu/vl.h +@@ -73,6 +73,10 @@ + #define PRIo64 "I64o" + #endif + ++#ifndef ENOMEDIUM ++#define ENOMEDIUM 4097 ++#endif ++ + #ifdef QEMU_TOOL + + /* we use QEMU_TOOL in the command line tools which do not depend on Property changes on: head/emulators/qemu-devel/files/patch-vl.h ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/emulators/qemu-devel/pkg-message =================================================================== --- head/emulators/qemu-devel/pkg-message (revision 175960) +++ head/emulators/qemu-devel/pkg-message (revision 175961) @@ -1,59 +1,68 @@ ==== FreeBSD host notes: - needs to run as root in order to use /dev/tap* networking (why?) (actually RELENG_6 and above now has a sysctl net.link.tap.user_open to allow users to use it too. don't forget to adjust device node permissions in /etc/devfs.rules.) - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but i've been told that that's normal. (fixed on FreeSBIE 1.1.) and you have to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is routed to 127.1 on the host. - expect timer problems when guest kernel HZ is > hosts, for example time sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000, and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.) The linux 2.6 kernel uses 1000 by default btw (changed to 250 recently). Enabling /dev/rtc doesn't seem to help either (not included since it needs a patch to emulators/rtc.) - using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl.) - the -smb option (smb-export local dir to guest) needs the net/samba3 port/package installed in addition to qemu. - RELENG_6 and up guests often crash while accessing the emulated cdrom (see kern/84102, http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/84102), using a kernel without PREEMPTION has been reported to fix this problem. (or do an ftp install instead of installing from the emulated cdrom, and then make a new kernel.) [fixed since 6.0-R.] - 6.0-RC1 was released with an ed driver that doesn't like qemu's emulated RTL8029 nic, this has been fixed in the meantime but if for some reason you need to use that version as a guest you can temporarily add the patch in this message: http://docs.freebsd.org/cgi/mid.cgi?200510131428.21211.jkim (not included in the port since the used VIA VT86C926 PCI ID does not really match the emulated nic exactly, it just `happens' to work with 6.0-RC1's driver.) - if you want to use usb devices connected to the host in the guest (usb_add host:... monitor command) you need to make sure the host isn't claiming them, e.g. for umass devices (like memory sticks or external harddrives) make sure umass isn't in the kernel (you can then still load it as a kld when needed), also unless you are running qemu as root you then need to fix permissions for /dev/ugen* device nodes: if you are on 5.x or later (devfs) put a rule in /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs restart. example devfs.rules: [ugen_ruleset=20] 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. +rtl8139 timer by building the port with RTL8139_TIMER enabled. (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.) +- qemu now uses aio at least for ide dma, so if you get `Bad system call' +crashes that is because aio is not (kld)loaded. +- if you get repeated `atapi_poll called!' console messages with FreeBSD +guests or other weird cdrom problems then thats probably because the guest +has atapicam loaded, which for reasons still to be determined has problems +with qemu's now by default enabled cdrom dma. You can build the port with +CDROM_DMA disabled to disable it. +- if you build qemu wihout SDL and then get crashes running it try passing +it -nographic. This should probably be default in that case... ==== Property changes on: head/emulators/qemu-devel/pkg-message ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.15 \ No newline at end of property +1.16 \ No newline at end of property Index: head/emulators/qemu-devel/pkg-plist =================================================================== --- head/emulators/qemu-devel/pkg-plist (revision 175960) +++ head/emulators/qemu-devel/pkg-plist (revision 175961) @@ -1,55 +1,55 @@ bin/qemu bin/qemu-img bin/qemu-system-arm bin/qemu-system-mips bin/qemu-system-mipsel bin/qemu-system-ppc bin/qemu-system-sparc bin/qemu-system-x86_64 %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/bios.bin %%DATADIR%%/linux_boot.bin %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/ppc_rom.bin %%DATADIR%%/openbios-sparc32 %%DATADIR%%/video.x %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/common %%DATADIR%%/keymaps/da %%DATADIR%%/keymaps/de %%DATADIR%%/keymaps/de-ch %%DATADIR%%/keymaps/en-gb %%DATADIR%%/keymaps/en-us %%DATADIR%%/keymaps/es %%DATADIR%%/keymaps/et %%DATADIR%%/keymaps/fi %%DATADIR%%/keymaps/fo %%DATADIR%%/keymaps/fr %%DATADIR%%/keymaps/fr-be %%DATADIR%%/keymaps/fr-ca %%DATADIR%%/keymaps/fr-ch %%DATADIR%%/keymaps/hr %%DATADIR%%/keymaps/hu %%DATADIR%%/keymaps/is %%DATADIR%%/keymaps/it %%DATADIR%%/keymaps/ja %%DATADIR%%/keymaps/lt %%DATADIR%%/keymaps/lv %%DATADIR%%/keymaps/mk %%DATADIR%%/keymaps/modifiers %%DATADIR%%/keymaps/nl %%DATADIR%%/keymaps/nl-be %%DATADIR%%/keymaps/no %%DATADIR%%/keymaps/pl %%DATADIR%%/keymaps/pt %%DATADIR%%/keymaps/pt-br %%DATADIR%%/keymaps/ru %%DATADIR%%/keymaps/sl %%DATADIR%%/keymaps/sv %%DATADIR%%/keymaps/th %%DATADIR%%/keymaps/tr @dirrm %%DATADIR%%/keymaps @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% Property changes on: head/emulators/qemu-devel/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.16 \ No newline at end of property +1.17 \ No newline at end of property