summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/DESCR11
-rw-r--r--emulators/qemu/Makefile24
-rw-r--r--emulators/qemu/PLIST16
-rw-r--r--emulators/qemu/distinfo15
-rw-r--r--emulators/qemu/patches/patch-aa40
-rw-r--r--emulators/qemu/patches/patch-ab39
-rw-r--r--emulators/qemu/patches/patch-ac17
-rw-r--r--emulators/qemu/patches/patch-ad13
-rw-r--r--emulators/qemu/patches/patch-ae22
-rw-r--r--emulators/qemu/patches/patch-af41
-rw-r--r--emulators/qemu/patches/patch-ag31
-rw-r--r--emulators/qemu/patches/patch-ah20
-rw-r--r--emulators/qemu/patches/patch-ai20
-rw-r--r--emulators/qemu/patches/patch-aj24
-rw-r--r--emulators/qemu/patches/patch-ak44
15 files changed, 377 insertions, 0 deletions
diff --git a/emulators/qemu/DESCR b/emulators/qemu/DESCR
new file mode 100644
index 00000000000..8c743e5720e
--- /dev/null
+++ b/emulators/qemu/DESCR
@@ -0,0 +1,11 @@
+QEMU is a FAST! processor emulator using dynamic translation to achieve
+good emulation speed, QEMU has two operating modes:
+
+ * Full system emulation. In this mode, QEMU emulates a full system
+ (for example a PC), including a processor and various peripherals.
+ It can be used to launch different Operating Systems without rebooting
+ the PC or to debug system code.
+ * User mode emulation (Linux host only). In this mode, QEMU can launch
+ Linux processes compiled for one CPU on another CPU. It can be used
+ to launch the Wine Windows API emulator or to ease cross-compilation
+ and cross-debugging.
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
new file mode 100644
index 00000000000..47cd4af1d42
--- /dev/null
+++ b/emulators/qemu/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/11/09 13:05:33 xtraeme Exp $
+#
+
+DISTNAME= qemu-0.6.0
+CATEGORIES= emulators
+MASTER_SITES= http://fabrice.bellard.free.fr/qemu/
+
+MAINTAINER= dhowland@users.sourceforge.net
+HOMEPAGE= http://fabrice.bellard.free.fr/qemu/
+COMMENT= CPU emulator using dynamic translation
+
+ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-*
+CONFLICTS+= qemu-bin-*
+
+USE_BUILDLINK3= yes
+USE_GNU_TOOLS+= make
+USE_X11= yes
+HAS_CONFIGURE= yes
+
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --interp-prefix=${PREFIX}/share/qemu
+
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/qemu/PLIST b/emulators/qemu/PLIST
new file mode 100644
index 00000000000..47f26afcc0d
--- /dev/null
+++ b/emulators/qemu/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/11/09 13:05:33 xtraeme Exp $
+bin/qemu
+bin/qemu-mkcow
+bin/qemu-system-ppc
+bin/vmdk2raw
+man/man1/qemu-mkcow.1
+man/man1/qemu.1
+share/doc/qemu/qemu-doc.html
+share/doc/qemu/qemu-tech.html
+share/qemu/bios.bin
+share/qemu/linux_boot.bin
+share/qemu/ppc_rom.bin
+share/qemu/vgabios-cirrus.bin
+share/qemu/vgabios.bin
+@dirrm share/qemu
+@dirrm share/doc/qemu
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
new file mode 100644
index 00000000000..6642b718ee7
--- /dev/null
+++ b/emulators/qemu/distinfo
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/11/09 13:05:33 xtraeme Exp $
+
+SHA1 (qemu-0.6.0.tar.gz) = e7e8b30704af11eacad521800d4bf08cdbe5a137
+Size (qemu-0.6.0.tar.gz) = 874397 bytes
+SHA1 (patch-aa) = 2c288ab638c5fea542c10ad6b5f23d8f6d011080
+SHA1 (patch-ab) = 4c22f01fedddad7b7095f066e3d190c769648c19
+SHA1 (patch-ac) = 1a963d654984b9aa074f68c44e996f0ed4f86769
+SHA1 (patch-ad) = aa6df3ce9f70687f05141b504ad5d793510f2ed8
+SHA1 (patch-ae) = 70685c894298911028b72651fbe17622c39b1cb0
+SHA1 (patch-af) = 0ef3779e75f48e5a3b735a3cc94e5f5b753f61b3
+SHA1 (patch-ag) = 61783907cc301670e4c55207eb1ea768f6a015b8
+SHA1 (patch-ah) = 134f47583dbed94e83671ca6197106805b13f759
+SHA1 (patch-ai) = 480cc80a451488a1376f99ed152a917116759cbf
+SHA1 (patch-aj) = 5917569d9d5e2bfc0f8d47522fc39efade6f8dd9
+SHA1 (patch-ak) = 9309fb1386e746f12d03f9caa16b880247552410
diff --git a/emulators/qemu/patches/patch-aa b/emulators/qemu/patches/patch-aa
new file mode 100644
index 00000000000..7d077c0e669
--- /dev/null
+++ b/emulators/qemu/patches/patch-aa
@@ -0,0 +1,40 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/11/09 13:05:33 xtraeme Exp $
+
+--- bswap.h.orig 2004-07-10 21:20:09.000000000 +0300
++++ bswap.h
+@@ -4,11 +4,13 @@
+ #include "config-host.h"
+
+ #include <inttypes.h>
++#include <sys/types.h>
++#include <machine/bswap.h>
+
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
+ #else
+-
++/*
+ #define bswap_16(x) \
+ ({ \
+ uint16_t __x = (x); \
+@@ -40,9 +42,9 @@
+ (uint64_t)(((uint64_t)(__x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
+ (uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \
+ })
+-
++*/
+ #endif /* !HAVE_BYTESWAP_H */
+-
++/*
+ static inline uint16_t bswap16(uint16_t x)
+ {
+ return bswap_16(x);
+@@ -57,7 +59,7 @@ static inline uint64_t bswap64(uint64_t
+ {
+ return bswap_64(x);
+ }
+-
++*/
+ static inline void bswap16s(uint16_t *s)
+ {
+ *s = bswap16(*s);
diff --git a/emulators/qemu/patches/patch-ab b/emulators/qemu/patches/patch-ab
new file mode 100644
index 00000000000..296b2afdafe
--- /dev/null
+++ b/emulators/qemu/patches/patch-ab
@@ -0,0 +1,39 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- vmdk2raw.c.orig 2004-07-10 21:20:09.000000000 +0300
++++ vmdk2raw.c
+@@ -84,7 +84,9 @@ static size_t copy_virtual(struct vmdk_p
+ unsigned int granule_offset;
+ unsigned int grain_index;
+ unsigned int sector_map_idx;
+-
++
++ const char nil = 0;
++
+ granule_offset = offset % granule_size;
+ length = MIN(length, granule_size - granule_offset);
+ length = MIN(length, disk_limit - offset);
+@@ -132,7 +134,6 @@ zero_fill:
+ if (lseek64(out_fd, length-1, SEEK_CUR) == (off_t)-1)
+ perror("lseek");
+ /* write the last NULL byte instead of seeking */
+- const char nil = 0;
+ write(out_fd, &nil, 1);
+ } else {
+ if (lseek64(out_fd, length, SEEK_CUR) == (off_t)-1)
+@@ -185,13 +186,14 @@ static int open_vmdk3(int fd)
+
+ static int open_vmdk(const char *filename)
+ {
++ char magic[4];
++
+ int fd = open(filename, O_RDONLY | O_LARGEFILE);
+ if (fd == -1) {
+ perror(filename);
+ return -1;
+ }
+
+- char magic[4];
+ if (read(fd, &magic, sizeof(magic)) != sizeof(magic)) {
+ perror("read from disk");
+ return -1;
diff --git a/emulators/qemu/patches/patch-ac b/emulators/qemu/patches/patch-ac
new file mode 100644
index 00000000000..7cca0379b45
--- /dev/null
+++ b/emulators/qemu/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- vl.c.orig 2004-07-10 21:20:09.000000000 +0300
++++ vl.c
+@@ -40,9 +40,9 @@
+ #include <sys/socket.h>
+ #ifdef _BSD
+ #include <sys/stat.h>
+-#ifndef __APPLE__
+-#include <libutil.h>
+-#endif
++//#ifndef __APPLE__
++//#include <libutil.h>
++//#endif
+ #else
+ #include <linux/if.h>
+ #include <linux/if_tun.h>
diff --git a/emulators/qemu/patches/patch-ad b/emulators/qemu/patches/patch-ad
new file mode 100644
index 00000000000..f83b60e53d0
--- /dev/null
+++ b/emulators/qemu/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- oss.c.orig 2004-07-10 21:20:09.000000000 +0300
++++ oss.c
+@@ -23,7 +23,7 @@
+ */
+ #include "vl.h"
+
+-#if !defined(_WIN32) && !defined(__APPLE__)
++#if !defined(_WIN32) && !defined(__APPLE__) && !defined(_BSD)
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <errno.h>
diff --git a/emulators/qemu/patches/patch-ae b/emulators/qemu/patches/patch-ae
new file mode 100644
index 00000000000..29ac70a9d80
--- /dev/null
+++ b/emulators/qemu/patches/patch-ae
@@ -0,0 +1,22 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- slirp/slirp_config.h.orig 2004-07-10 21:20:09.000000000 +0300
++++ slirp/slirp_config.h
+@@ -61,7 +61,7 @@
+ #define HAVE_STDLIB_H
+
+ /* Define if you have sys/ioctl.h */
+-#undef HAVE_SYS_IOCTL_H
++#define HAVE_SYS_IOCTL_H
+
+ /* Define if you have sys/filio.h */
+ #undef HAVE_SYS_FILIO_H
+@@ -162,7 +162,7 @@
+ #define HAVE_MEMMOVE
+
+ /* Define if you have <termios.h> */
+-#undef HAVE_TERMIOS_H
++#define HAVE_TERMIOS_H
+
+ /* Define if you have gethostid */
+ #undef HAVE_GETHOSTID
diff --git a/emulators/qemu/patches/patch-af b/emulators/qemu/patches/patch-af
new file mode 100644
index 00000000000..5ab6345105b
--- /dev/null
+++ b/emulators/qemu/patches/patch-af
@@ -0,0 +1,41 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- dyngen-exec.h.orig 2004-07-10 21:20:09.000000000 +0300
++++ dyngen-exec.h
+@@ -43,7 +43,7 @@ typedef signed long int64_t;
+ #else
+ typedef signed long long int64_t;
+ #endif
+-
++/*
+ #define INT8_MIN (-128)
+ #define INT16_MIN (-32767-1)
+ #define INT32_MIN (-2147483647-1)
+@@ -56,13 +56,17 @@ typedef signed long long int64_t;
+ #define UINT16_MAX (65535)
+ #define UINT32_MAX (4294967295U)
+ #define UINT64_MAX ((uint64_t)(18446744073709551615))
+-
++*/
++#ifdef __NetBSD__
++typedef struct __sFILE FILE;
++#else
+ typedef struct FILE FILE;
++#endif
+ extern int fprintf(FILE *, const char *, ...);
+ extern int printf(const char *, ...);
+ #undef NULL
+ #define NULL 0
+-#if defined(_BSD) && !defined(__APPLE__)
++#if defined(_BSD) || !defined(__APPLE__)
+ #include <ieeefp.h>
+
+ #define FE_TONEAREST FP_RN
+@@ -70,6 +74,7 @@ extern int printf(const char *, ...);
+ #define FE_UPWARD FP_RP
+ #define FE_TOWARDZERO FP_RZ
+ #define fesetround(x) fpsetround(x)
++#define fegetround() fpgetround()
+ #else
+ #include <fenv.h>
+ #endif
diff --git a/emulators/qemu/patches/patch-ag b/emulators/qemu/patches/patch-ag
new file mode 100644
index 00000000000..21f56a49ee6
--- /dev/null
+++ b/emulators/qemu/patches/patch-ag
@@ -0,0 +1,31 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- configure.orig 2004-07-10 21:20:09.000000000 +0300
++++ configure
+@@ -241,7 +241,7 @@ aa="no"
+ `$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
+ sdl_static_libs=`$sdl_config --static-libs`
+ if [ "$aa" = "yes" ] ; then
+- sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
++ sdl_static_libs="$sdl_static_libs `aalib-x11-config --static-libs`"
+ fi
+
+ if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
+@@ -293,7 +293,7 @@ else
+ if test -z "$prefix" ; then
+ prefix="/usr/local"
+ fi
+-mandir="$prefix/share/man"
++mandir="$prefix/man"
+ datadir="$prefix/share/qemu"
+ docdir="$prefix/share/doc/qemu"
+ bindir="$prefix/bin"
+@@ -529,7 +529,7 @@ if test "$target_user_only" = "no"; then
+ fi
+ echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
+ if [ "${aa}" = "yes" ] ; then
+- echo -n " `aalib-config --cflags`" >> $config_mak ;
++ echo -n " `aalib-x11-config --cflags`" >> $config_mak ;
+ fi
+ echo "" >> $config_mak
+ fi
diff --git a/emulators/qemu/patches/patch-ah b/emulators/qemu/patches/patch-ah
new file mode 100644
index 00000000000..2f82d82e86e
--- /dev/null
+++ b/emulators/qemu/patches/patch-ah
@@ -0,0 +1,20 @@
+$NetBSD: patch-ah,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- target-i386/cpu.h.orig 2004-07-10 21:20:09.000000000 +0300
++++ target-i386/cpu.h
+@@ -441,9 +441,15 @@ void cpu_x86_frstor(CPUX86State *s, uint
+ /* you can call this signal handler from your SIGBUS and SIGSEGV
+ signal handlers to inform the virtual CPU of exceptions. non zero
+ is returned if the signal was handled by the virtual CPU. */
++#ifdef __NetBSD__
++union siginfo;
++int cpu_x86_signal_handler(int host_signum, union siginfo *info,
++ void *puc);
++#else
+ struct siginfo;
+ int cpu_x86_signal_handler(int host_signum, struct siginfo *info,
+ void *puc);
++#endif
+ void cpu_x86_set_a20(CPUX86State *env, int a20_state);
+
+ uint64_t cpu_get_tsc(CPUX86State *env);
diff --git a/emulators/qemu/patches/patch-ai b/emulators/qemu/patches/patch-ai
new file mode 100644
index 00000000000..242d5610a4e
--- /dev/null
+++ b/emulators/qemu/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1.1.1 2004/11/09 13:05:34 xtraeme Exp $
+
+--- target-ppc/cpu.h.orig 2004-07-10 21:20:09.000000000 +0300
++++ target-ppc/cpu.h
+@@ -182,9 +182,15 @@ void cpu_ppc_close(CPUPPCState *s);
+ /* you can call this signal handler from your SIGBUS and SIGSEGV
+ signal handlers to inform the virtual CPU of exceptions. non zero
+ is returned if the signal was handled by the virtual CPU. */
++#ifdef __NetBSD__
++union siginfo;
++int cpu_ppc_signal_handler(int host_signum, union siginfo *info,
++ void *puc);
++#else
+ struct siginfo;
+ int cpu_ppc_signal_handler(int host_signum, struct siginfo *info,
+ void *puc);
++#endif
+
+ void do_interrupt (CPUPPCState *env);
+ void cpu_loop_exit(void);
diff --git a/emulators/qemu/patches/patch-aj b/emulators/qemu/patches/patch-aj
new file mode 100644
index 00000000000..3578af9cce0
--- /dev/null
+++ b/emulators/qemu/patches/patch-aj
@@ -0,0 +1,24 @@
+$NetBSD: patch-aj,v 1.1.1.1 2004/11/09 13:05:33 xtraeme Exp $
+
+--- Makefile.target.orig 2004-11-09 13:20:37.000000000 +0100
++++ Makefile.target 2004-11-09 13:22:17.000000000 +0100
+@@ -7,8 +7,8 @@
+ VPATH+=:$(SRC_PATH)/linux-user
+ DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
+ endif
+-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+-LDFLAGS=-g
++#CFLAGS=-Wall -O2 -g -fno-strict-aliasing
++#LDFLAGS=-g
+ LIBS=
+ HELPER_CFLAGS=$(CFLAGS)
+ DYNGEN=../dyngen$(EXESUF)
+@@ -340,7 +340,7 @@
+
+ install: all
+ ifneq ($(PROGS),)
+- install -m 755 -s $(PROGS) "$(bindir)"
++ $(BSD_INSTALL_PROGRAM) $(PROGS) "$(bindir)"
+ endif
+
+ ifneq ($(wildcard .depend),)
diff --git a/emulators/qemu/patches/patch-ak b/emulators/qemu/patches/patch-ak
new file mode 100644
index 00000000000..f940092e9e5
--- /dev/null
+++ b/emulators/qemu/patches/patch-ak
@@ -0,0 +1,44 @@
+$NetBSD: patch-ak,v 1.1.1.1 2004/11/09 13:05:35 xtraeme Exp $
+
+--- Makefile.orig 2004-11-09 13:24:28.000000000 +0100
++++ Makefile 2004-11-09 13:25:58.000000000 +0100
+@@ -1,13 +1,13 @@
+ include config-host.mak
+
+-CFLAGS=-Wall -O2 -g
++#CFLAGS=-Wall -O2 -g
+ ifdef CONFIG_DARWIN
+ CFLAGS+= -mdynamic-no-pic
+ endif
+ ifdef CONFIG_WIN32
+ CFLAGS+=-fpack-struct
+ endif
+-LDFLAGS=-g
++#LDFLAGS=-g
+ LIBS=
+ DEFINES+=-D_GNU_SOURCE
+ ifndef CONFIG_WIN32
+@@ -47,17 +47,17 @@
+ done
+
+ install: all
+- mkdir -p "$(bindir)"
++ $(BSD_INSTALL_PROGRAM_DIR) $(bindir)
+ ifndef CONFIG_WIN32
+ install -m 755 -s $(TOOLS) "$(bindir)"
+ endif
+- mkdir -p "$(datadir)"
+- install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
++ $(BSD_INSTALL_DATA_DIR) $(datadir)
++ $(BSD_INSTALL_DATA) pc-bios/bios.bin pc-bios/vgabios.bin \
+ pc-bios/vgabios-cirrus.bin \
+ pc-bios/ppc_rom.bin \
+- pc-bios/linux_boot.bin "$(datadir)"
+- mkdir -p "$(docdir)"
+- install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
++ pc-bios/linux_boot.bin $(datadir)
++ $(BSD_INSTALL_DATA_DIR) $(docdir)
++ $(BSD_INSTALL_DATA) qemu-doc.html qemu-tech.html $(docdir)
+ ifndef CONFIG_WIN32
+ mkdir -p "$(mandir)/man1"
+ install qemu.1 qemu-mkcow.1 "$(mandir)/man1"