Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2004 01:48:33 +0200 (CEST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68298: update emulators/qemu, add ppc system emulation
Message-ID:  <200406242348.i5ONmXZ64030@saturn.kn-bremen.de>
Resent-Message-ID: <200406250110.i5P1AN9r063552@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         68298
>Category:       ports
>Synopsis:       update emulators/qemu, add ppc system emulation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 25 01:10:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Juergen Lock
>Release:        FreeBSD 5.2.1-SECURITY i386
>Organization:
me?  organized??
>Environment:
System: FreeBSD neptun 5.2.1-SECURITY FreeBSD 5.2.1-SECURITY #0: Wed May 26 04:19:54 GMT 2004     root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386


>Description:

	ppc system emulation, fix qemu-mkcow with raw devices
(New files files/patch-bg, files/patch-bh)

>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	23 Jun 2004 07:22:24 -0000	1.9
+++ Makefile	24 Jun 2004 21:49:55 -0000
@@ -6,10 +6,10 @@
 #
 
 PORTNAME=	qemu
-PORTVERSION=	0.5.5.s.20040622
+PORTVERSION=	0.5.5.s.20040624
 CATEGORIES=	emulators
 MASTER_SITES=	http://dad-answers.com/qemu/FreeBSD/
-DISTNAME=	${PORTNAME}-snapshot-2004-06-22_23
+DISTNAME=	${PORTNAME}-snapshot-2004-06-24_23
 
 MAINTAINER=	nox@jelal.kn-bremen.de
 COMMENT=	QEMU CPU Emulator
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo	23 Jun 2004 07:22:24 -0000	1.7
+++ distinfo	24 Jun 2004 21:05:25 -0000
@@ -1,2 +1,2 @@
-MD5 (qemu-snapshot-2004-06-22_23.tar.bz2) = 1ee0aa7cb03979d1696e6c2dd1115425
-SIZE (qemu-snapshot-2004-06-22_23.tar.bz2) = 711054
+MD5 (qemu-snapshot-2004-06-24_23.tar.bz2) = cc23ade5426a2caf2289999189c1e92c
+SIZE (qemu-snapshot-2004-06-24_23.tar.bz2) = 711284
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- pkg-plist	23 Jun 2004 07:22:24 -0000	1.5
+++ pkg-plist	24 Jun 2004 21:30:21 -0000
@@ -1,5 +1,6 @@
 bin/qemu
 bin/qemu-mkcow
+bin/qemu-system-ppc
 bin/vmdk2raw
 %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html
 %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html
--- /dev/null	Fri Jun 25 01:22:00 2004
+++ files/patch-bg	Thu Jun 24 23:24:20 2004
@@ -0,0 +1,37 @@
+Index: qemu/qemu-mkcow.c
+@@ -21,6 +21,8 @@
+  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+  * THE SOFTWARE.
+  */
++#include "config-host.h"
++ 
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+@@ -36,6 +38,12 @@
+ #include <sys/stat.h>
+ #include <netinet/in.h>
+ 
++#ifdef _BSD
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/disk.h>
++#endif
++
+ #include "cow.h"
+ 
+ #include "bswap.h"
+@@ -56,6 +64,13 @@ int cow_create(int cow_fd, const char *i
+             perror(image_filename);
+             exit(1);
+         }
++#ifdef _BSD
++        struct stat sb;
++        if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) {
++            if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&image_sectors))
++                image_sectors = lseek(fd, 0LL, SEEK_END);
++        } else
++#endif                      
+         image_sectors = lseek64(fd, 0, SEEK_END);
+         if (fstat(fd, &st) != 0) {
+             close(fd);
--- /dev/null	Fri Jun 25 01:22:00 2004
+++ files/patch-bh	Thu Jun 24 23:28:18 2004
@@ -0,0 +1,115 @@
+Index: qemu/configure
+===================================================================
+RCS file: /cvsroot/qemu/qemu/configure,v
+retrieving revision 1.39
+diff -w -u -d -r1.39 configure
+--- configure	20 May 2004 13:23:39 -0000	1.39
++++ configure	21 May 2004 15:00:41 -0000
+@@ -93,7 +93,7 @@
+ 
+ if [ "$bsd" = "yes" ] ; then
+   make="gmake"
+-  target_list="i386-softmmu"
++  target_list="i386-softmmu ppc-softmmu"
+ fi
+ 
+ # find source path
+Index: qemu/dyngen-exec.h
+===================================================================
+RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v
+retrieving revision 1.12
+diff -w -u -d -r1.12 dyngen-exec.h
+--- dyngen-exec.h	12 May 2004 19:32:15 -0000	1.12
++++ dyngen-exec.h	21 May 2004 15:00:41 -0000
+@@ -21,6 +21,8 @@
+ #define __DYNGEN_EXEC_H__
+ 
+ #include <stddef.h>
++#include <stdio.h>
++#include "config.h"
+ 
+ typedef unsigned char uint8_t;
+ typedef unsigned short uint16_t;
+@@ -54,9 +56,6 @@
+ #define UINT32_MAX		(4294967295U)
+ #define UINT64_MAX		((uint64_t)(18446744073709551615))
+ 
+-typedef struct FILE FILE;
+-extern int fprintf(FILE *, const char *, ...);
+-extern int printf(const char *, ...);
+ #undef NULL
+ #define NULL 0
+ #ifdef _BSD
+Index: qemu/target-ppc/op_helper.c
+===================================================================
+RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v
+retrieving revision 1.6
+diff -w -u -d -r1.6 op_helper.c
+--- target-ppc/op_helper.c	21 May 2004 12:59:31 -0000	1.6
++++ target-ppc/op_helper.c	21 May 2004 15:00:49 -0000
+@@ -210,6 +210,22 @@
+     }
+     /* TODO: update FEX & VX */
+     /* Set rounding mode */
++#ifdef _BSD
++    switch(env->fpscr[0] & 0x3) {
++    case 0:
++        fpsetround(FP_RN);
++        break;
++    case 1:
++        fpsetround(FP_RZ);
++        break;
++    case 2:
++        fpsetround(FP_RP);
++        break;
++    case 3:
++        fpsetround(FP_RM);
++        break;
++    }
++#else
+     switch (env->fpscr[0] & 0x3) {
+     case 0:
+         /* Best approximation (round to nearest) */
+@@ -228,6 +244,7 @@
+         fesetround(FE_DOWNWARD);
+         break;
+     }
++#endif
+ }
+ 
+ void do_fctiw (void)
+@@ -253,9 +270,13 @@
+         double d;
+         uint64_t i;
+     } *p = (void *)&FT1;
++#ifdef _BSD
++    int cround = fpgetround();
++    fpsetround(FP_RZ);
++#else
+     int cround = fegetround();
+-
+     fesetround(FE_TOWARDZERO);
++#endif
+     if (FT0 > (double)0x7FFFFFFF)
+         p->i = 0x7FFFFFFFULL << 32;
+     else if (FT0 < -(double)0x80000000)
+@@ -264,7 +285,11 @@
+         p->i = 0;
+     p->i |= (uint32_t)FT0;
+     FT0 = p->d;
++#ifdef _BSD
++    fpsetround(cround);
++#else
+     fesetround(cround);
++#endif
+ }
+ 
+ void do_fnmadds (void)
+@@ -379,7 +404,6 @@
+ 
+ /*****************************************************************************/
+ /* Special helpers for debug */
+-extern FILE *stdout;
+ 
+ void dump_state (void)
+ {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406242348.i5ONmXZ64030>