Here is an update to QEMU 0.9.1.
Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- Makefile 1 Apr 2008 08:51:18 -0000 1.31
+++ Makefile 8 Apr 2008 04:21:04 -0000
@@ -5,15 +5,14 @@ ONLY_FOR_ARCHS= amd64 arm i386 powerpc
COMMENT= multi system emulator
-DISTNAME= qemu-0.9.0
-PKGNAME= ${DISTNAME}p5
+DISTNAME= qemu-0.9.1
CATEGORIES= emulators
HOMEPAGE= http://fabrice.bellard.free.fr/qemu/
MAINTAINER= Todd T. Fries <[EMAIL PROTECTED]>
-# GPLv2 - LGPL
+# GPL/LGPL/BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
@@ -23,8 +22,10 @@ MASTER_SITES= ${HOMEPAGE}
BUILD_DEPENDS= ::textproc/texi2html
USE_GMAKE= Yes
-WANTLIB= m z ossaudio c
-CONFIGURE_STYLE= gnu
+WANTLIB= c m ossaudio z
+CONFIGURE_STYLE= simple
+CONFIGURE_ARGS+= --prefix=${PREFIX} \
+ --disable-vnc-tls
# Currently, the regression tests are utterly broken.
REGRESS_TARGET= test test2
@@ -36,17 +37,14 @@ PATCH_LIST= patch-* misc-*
FLAVORS= no_x11
FLAVOR?=
-CONFIGURE_ENV+= USE_KQEMU=yes
-
.if ${FLAVOR:L:Mno_x11}
CONFIGURE_ARGS+= --disable-gfx-check \
--disable-sdl
.else
-LIB_DEPENDS= SDL::devel/sdl \
- aa::graphics/aalib
+LIB_DEPENDS= SDL::devel/sdl
USE_X11= Yes
-WANTLIB+= X11 Xext pthread usbhid
+WANTLIB+= pthread
.endif
pre-configure:
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo 1 May 2007 12:55:13 -0000 1.8
+++ distinfo 1 Apr 2008 05:10:21 -0000
@@ -1,5 +1,5 @@
-MD5 (qemu-0.9.0.tar.gz) = ab11a03ba30cf4a70641f0f170473d69
-RMD160 (qemu-0.9.0.tar.gz) = 4296542b6da18a6ac93d20787330d3c1c2ac0a19
-SHA1 (qemu-0.9.0.tar.gz) = 1e57e48a06eb8729913d92601000466eecef06cb
-SHA256 (qemu-0.9.0.tar.gz) =
491facf9335654967ee53d8fb3540a274bfcbdcc225506bd38c4ee8e9ab405c1
-SIZE (qemu-0.9.0.tar.gz) = 1901741
+MD5 (qemu-0.9.1.tar.gz) = ZZHfjpJw6zWMiB3k6+oSYg==
+RMD160 (qemu-0.9.1.tar.gz) = 7nvbVaRUDfIILUvenr/S9ObyAaU=
+SHA1 (qemu-0.9.1.tar.gz) = Yw6iC1mJ8N8AEo3n975mHFc+0EE=
+SHA256 (qemu-0.9.1.tar.gz) = R1bQtKTcfdiDVLxrN9OB5EYt0yjQ/u+UgD6QwEVYNaU=
+SIZE (qemu-0.9.1.tar.gz) = 2804104
Index: patches/misc-target-i386_helper_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/misc-target-i386_helper_c,v
retrieving revision 1.2
diff -u -p -r1.2 misc-target-i386_helper_c
--- patches/misc-target-i386_helper_c 19 Jan 2008 23:53:58 -0000 1.2
+++ patches/misc-target-i386_helper_c 2 Apr 2008 05:43:54 -0000
@@ -1,11 +1,10 @@
$OpenBSD: misc-target-i386_helper_c,v 1.2 2008/01/19 23:53:58 todd Exp $
---- target-i386/helper.c.orig Mon Feb 5 17:01:54 2007
-+++ target-i386/helper.c Wed Jan 16 11:22:08 2008
-@@ -3838,3 +3838,13 @@ void tlb_fill(target_ulong addr, int is_write, int is_
- }
+--- target-i386/helper.c.orig Sun Jan 6 14:38:45 2008
++++ target-i386/helper.c Wed Apr 2 01:43:09 2008
+@@ -3954,6 +3954,16 @@ void tlb_fill(target_ulong addr, int is_write, int mmu
env = saved_env;
}
-+
+
+void helper_fchs_ST0(void)
+{
+ ST0 = floatx_chs(ST0);
@@ -15,3 +14,7 @@ $OpenBSD: misc-target-i386_helper_c,v 1.
+{
+ ST0 = floatx_abs(ST0);
+}
++
+
+ /* Secure Virtual Machine helpers */
+
Index: patches/misc-target-i386_op_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/misc-target-i386_op_c,v
retrieving revision 1.2
diff -u -p -r1.2 misc-target-i386_op_c
--- patches/misc-target-i386_op_c 19 Jan 2008 23:53:58 -0000 1.2
+++ patches/misc-target-i386_op_c 2 Apr 2008 05:43:40 -0000
@@ -1,7 +1,7 @@
$OpenBSD: misc-target-i386_op_c,v 1.2 2008/01/19 23:53:58 todd Exp $
---- target-i386/op.c.orig Mon Feb 5 17:01:54 2007
-+++ target-i386/op.c Wed Jan 16 11:22:08 2008
-@@ -2164,12 +2164,12 @@ void OPPROTO op_fdivr_STN_ST0(void)
+--- target-i386/op.c.orig Sun Jan 6 14:38:45 2008
++++ target-i386/op.c Wed Apr 2 01:43:10 2008
+@@ -2214,12 +2214,12 @@ void OPPROTO op_fdivr_STN_ST0(void)
/* misc FPU operations */
void OPPROTO op_fchs_ST0(void)
{
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 patch-Makefile
--- patches/patch-Makefile 1 May 2007 12:55:14 -0000 1.6
+++ patches/patch-Makefile 1 Apr 2008 06:56:53 -0000
@@ -1,17 +1,8 @@
$OpenBSD: patch-Makefile,v 1.6 2007/05/01 12:55:14 todd Exp $
---- Makefile.orig Mon Feb 5 17:01:54 2007
-+++ Makefile Tue Mar 20 19:21:54 2007
-@@ -27,7 +27,7 @@ endif
- ifndef CONFIG_DARWIN
- ifndef CONFIG_WIN32
- ifndef CONFIG_SOLARIS
--LIBS+=-lrt
-+#LIBS+=-lrt
- endif
- endif
- endif
-@@ -51,7 +51,7 @@ clean:
- rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
+--- Makefile.orig Sun Jan 6 14:38:41 2008
++++ Makefile Tue Apr 1 01:33:38 2008
+@@ -149,7 +149,7 @@ clean:
+ rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d
$(MAKE) -C tests clean
for d in $(TARGET_DIRS); do \
- $(MAKE) -C $$d $@ || exit 1 ; \
@@ -19,7 +10,7 @@ $OpenBSD: patch-Makefile,v 1.6 2007/05/0
done
distclean: clean
-@@ -106,7 +106,7 @@ cscope:
+@@ -206,7 +206,7 @@ cscope:
# documentation
%.html: %.texi
Index: patches/patch-Makefile_target
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-Makefile_target,v
retrieving revision 1.11
diff -u -p -r1.11 patch-Makefile_target
--- patches/patch-Makefile_target 1 May 2007 12:55:14 -0000 1.11
+++ patches/patch-Makefile_target 8 Apr 2008 04:31:48 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile_target,v 1.11 2007/05/01 12:55:14 todd Exp $
---- Makefile.target.orig Mon Feb 5 17:01:54 2007
-+++ Makefile.target Tue Apr 3 08:21:24 2007
-@@ -150,7 +150,7 @@ BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
+--- Makefile.target.orig Sun Jan 6 14:38:41 2008
++++ Makefile.target Tue Apr 8 00:31:39 2008
+@@ -188,7 +188,7 @@ BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
endif
ifeq ($(ARCH),arm)
@@ -10,8 +10,8 @@ $OpenBSD: patch-Makefile_target,v 1.11 2
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
endif
-@@ -163,6 +163,12 @@ ifeq ($(ARCH),mips)
- BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
+@@ -215,6 +215,16 @@ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
+ endif
endif
+# Very important for this 'ifeq' block to be after other
@@ -20,10 +20,14 @@ $OpenBSD: patch-Makefile_target,v 1.11 2
+OP_CFLAGS+= -fno-stack-protector
+endif
+
- ifeq ($(HAVE_GCC3_OPTIONS),yes)
- # very important to generate a return at the end of every operation
- OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
-@@ -182,6 +188,7 @@ OP_CFLAGS+=$(OS_CFLAGS)
++ifdef CONFIG_OSS_LIBRARY
++LIBS+=-lossaudio
++endif
++
+ ifeq ($(CONFIG_DARWIN),yes)
+ LIBS+=-lmx
+ endif
+@@ -232,6 +242,7 @@ OP_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
#########################################################
CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
@@ -31,22 +35,31 @@ $OpenBSD: patch-Makefile_target,v 1.11 2
LIBS+=-lm
ifndef CONFIG_USER_ONLY
LIBS+=-lz
-@@ -329,6 +336,9 @@ endif
-
- SOUND_HW = sb16.o es1370.o
- AUDIODRV = audio.o noaudio.o wavaudio.o
-+ifdef CONFIG_OSS_LIBRARY
-+LIBS += -lossaudio
-+endif
- ifdef CONFIG_SDL
- AUDIODRV += sdlaudio.o
- endif
-@@ -440,7 +450,7 @@ endif
+@@ -537,7 +548,7 @@ endif
ifndef CONFIG_DARWIN
ifndef CONFIG_WIN32
ifndef CONFIG_SOLARIS
--VL_LIBS=-lutil -lrt
-+#VL_LIBS=-lutil -lrt
+-VL_LIBS+=-lutil
++#VL_LIBS+=-lutil
endif
endif
endif
+@@ -557,12 +568,12 @@ ifeq ($(ARCH),sparc64)
+ endif
+ endif
+
+-ifeq ($(ARCH),x86_64)
+- VL_LDFLAGS+=-m64
+- ifneq ($(CONFIG_SOLARIS),yes)
+- VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
+- endif
+-endif
++#ifeq ($(ARCH),x86_64)
++# VL_LDFLAGS+=-m64
++# ifneq ($(CONFIG_SOLARIS),yes)
++# VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
++# endif
++#endif
+
+ ifdef CONFIG_WIN32
+ SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
Index: patches/patch-audio_ossaudio_c
===================================================================
RCS file: patches/patch-audio_ossaudio_c
diff -N patches/patch-audio_ossaudio_c
--- patches/patch-audio_ossaudio_c 1 May 2007 12:55:14 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-$OpenBSD: patch-audio_ossaudio_c,v 1.3 2007/05/01 12:55:14 todd Exp $
---- audio/ossaudio.c.orig Mon Feb 5 17:01:54 2007
-+++ audio/ossaudio.c Sat Mar 10 16:39:38 2007
-@@ -21,10 +21,15 @@
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-+#include <stdlib.h>
- #include <sys/mman.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
-+#ifdef __OpenBSD__
-+#include <soundcard.h>
-+#else
- #include <sys/soundcard.h>
-+#endif
- #include "vl.h"
-
- #define AUDIO_CAP "oss"
Index: patches/patch-block-qcow2_c
===================================================================
RCS file: patches/patch-block-qcow2_c
diff -N patches/patch-block-qcow2_c
--- patches/patch-block-qcow2_c 1 May 2007 12:55:14 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-block-qcow2_c,v 1.1 2007/05/01 12:55:14 todd Exp $
---- block-qcow2.c.orig Mon Feb 5 17:01:54 2007
-+++ block-qcow2.c Fri Apr 6 13:05:45 2007
-@@ -1884,6 +1884,8 @@ static int grow_refcount_table(BlockDriverState *bs, i
- int new_table_size, new_table_size2, refcount_table_clusters, i, ret;
- uint64_t *new_table;
- int64_t table_offset;
-+ int old_table_size;
-+ int64_t old_table_offset;
- uint64_t data64;
- uint32_t data32;
-
-@@ -1931,10 +1933,14 @@ static int grow_refcount_table(BlockDriverState *bs, i
- &data32, sizeof(data32)) != sizeof(data32))
- goto fail;
- qemu_free(s->refcount_table);
-+ old_table_offset = s->refcount_table_offset;
-+ old_table_size = s->refcount_table_size;
- s->refcount_table = new_table;
- s->refcount_table_size = new_table_size;
-+ s->refcount_table_offset = table_offset;
-
- update_refcount(bs, table_offset, new_table_size2, 1);
-+ free_clusters(bs, old_table_offset, old_table_size * sizeof(uint64_t));
- return 0;
- fail:
- free_clusters(bs, table_offset, new_table_size2);
Index: patches/patch-block-raw-posix_c
===================================================================
RCS file: patches/patch-block-raw-posix_c
diff -N patches/patch-block-raw-posix_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-block-raw-posix_c 2 Apr 2008 02:38:56 -0000
@@ -0,0 +1,133 @@
+$OpenBSD$
+--- block-raw-posix.c.orig Sun Jan 6 14:38:42 2008
++++ block-raw-posix.c Tue Apr 1 22:38:47 2008
+@@ -28,7 +28,9 @@
+ #endif
+ #include "block_int.h"
+ #include <assert.h>
++#ifndef CONFIG_NO_AIO
+ #include <aio.h>
++#endif
+
+ #ifdef CONFIG_COCOA
+ #include <paths.h>
+@@ -55,6 +57,11 @@
+ #ifdef __FreeBSD__
+ #include <sys/disk.h>
+ #endif
++#ifdef __OpenBSD__
++#include <sys/ioctl.h>
++#include <sys/disklabel.h>
++#include <sys/dkio.h>
++#endif
+
+ //#define DEBUG_FLOPPY
+
+@@ -231,6 +238,7 @@ label__raw_write__success:
+ }
+
+ /***********************************************************/
++#ifndef CONFIG_NO_AIO
+ /* Unix AIO using POSIX AIO */
+
+ typedef struct RawAIOCB {
+@@ -456,6 +464,37 @@ static void raw_aio_cancel(BlockDriverAIOCB *blockacb)
+ }
+ }
+
++# else /* !CONFIG_NO_AIO */
++
++void qemu_aio_init(void)
++{
++}
++
++void qemu_aio_poll(void)
++{
++}
++
++void qemu_aio_flush(void)
++{
++}
++
++void qemu_aio_wait_start(void)
++{
++}
++
++void qemu_aio_wait(void)
++{
++#ifndef QEMU_IMG
++ qemu_bh_poll();
++#endif
++}
++
++void qemu_aio_wait_end(void)
++{
++}
++
++#endif /* !CONFIG_NO_AIO */
++
+ static void raw_close(BlockDriverState *bs)
+ {
+ BDRVRawState *s = bs->opaque;
+@@ -475,8 +514,25 @@ static int raw_truncate(BlockDriverState *bs, int64_t
+ return 0;
+ }
+
++#ifdef __OpenBSD__
+ static int64_t raw_getlength(BlockDriverState *bs)
+ {
++ int fd = ((BDRVRawState*)bs->opaque)->fd;
++ struct stat st;
++ if (fstat(fd, &st))
++ return -1;
++ if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
++ struct disklabel dl;
++ if (ioctl(fd, DIOCGDINFO, &dl))
++ return -1;
++ return (uint64_t)dl.d_secsize *
++ dl.d_partitions[DISKPART(st.st_rdev)].p_size;
++ } else
++ return st.st_size;
++}
++#else /* !__OpenBSD__ */
++static int64_t raw_getlength(BlockDriverState *bs)
++{
+ BDRVRawState *s = bs->opaque;
+ int fd = s->fd;
+ int64_t size;
+@@ -521,6 +577,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
+ }
+ return size;
+ }
++#endif
+
+ static int raw_create(const char *filename, int64_t total_size,
+ const char *backing_file, int flags)
+@@ -555,11 +612,12 @@ BlockDriver bdrv_raw = {
+ raw_close,
+ raw_create,
+ raw_flush,
+-
++#ifndef CONFIG_NO_AIO
+ .bdrv_aio_read = raw_aio_read,
+ .bdrv_aio_write = raw_aio_write,
+ .bdrv_aio_cancel = raw_aio_cancel,
+ .aiocb_size = sizeof(RawAIOCB),
++#endif
+ .protocol_name = "file",
+ .bdrv_pread = raw_pread,
+ .bdrv_pwrite = raw_pwrite,
+@@ -907,11 +965,12 @@ BlockDriver bdrv_host_device = {
+ raw_close,
+ NULL,
+ raw_flush,
+-
++#ifndef CONFIG_NO_AIO
+ .bdrv_aio_read = raw_aio_read,
+ .bdrv_aio_write = raw_aio_write,
+ .bdrv_aio_cancel = raw_aio_cancel,
+ .aiocb_size = sizeof(RawAIOCB),
++#endif
+ .bdrv_pread = raw_pread,
+ .bdrv_pwrite = raw_pwrite,
+ .bdrv_getlength = raw_getlength,
Index: patches/patch-block-raw_c
===================================================================
RCS file: patches/patch-block-raw_c
diff -N patches/patch-block-raw_c
--- patches/patch-block-raw_c 1 May 2007 12:55:14 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,141 +0,0 @@
-$OpenBSD: patch-block-raw_c,v 1.1 2007/05/01 12:55:14 todd Exp $
---- block-raw.c.orig Mon Feb 5 17:01:54 2007
-+++ block-raw.c Tue Apr 3 08:21:25 2007
-@@ -25,7 +25,9 @@
- #include "block_int.h"
- #include <assert.h>
- #ifndef _WIN32
-+#ifndef CONFIG_NO_AIO
- #include <aio.h>
-+#endif
-
- #ifndef QEMU_TOOL
- #include "exec-all.h"
-@@ -53,10 +55,16 @@
- #include <linux/cdrom.h>
- #include <linux/fd.h>
- #endif
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__)
- #include <sys/disk.h>
- #endif
-
-+#ifdef __OpenBSD__
-+#include <sys/ioctl.h>
-+#include <sys/disklabel.h>
-+#include <sys/dkio.h>
-+#endif
-+
- //#define DEBUG_FLOPPY
-
- #define FTYPE_FILE 0
-@@ -158,6 +166,7 @@ static int raw_pwrite(BlockDriverState *bs, int64_t of
- }
-
- /***********************************************************/
-+#ifndef CONFIG_NO_AIO
- /* Unix AIO using POSIX AIO */
-
- typedef struct RawAIOCB {
-@@ -380,6 +389,37 @@ static void raw_aio_cancel(BlockDriverAIOCB *blockacb)
- }
- }
-
-+# else /* !CONFIG_NO_AIO */
-+
-+void qemu_aio_init(void)
-+{
-+}
-+
-+void qemu_aio_poll(void)
-+{
-+}
-+
-+void qemu_aio_flush(void)
-+{
-+}
-+
-+void qemu_aio_wait_start(void)
-+{
-+}
-+
-+void qemu_aio_wait(void)
-+{
-+#ifndef QEMU_TOOL
-+ qemu_bh_poll();
-+#endif
-+}
-+
-+void qemu_aio_wait_end(void)
-+{
-+}
-+
-+#endif /* !CONFIG_NO_AIO */
-+
- static void raw_close(BlockDriverState *bs)
- {
- BDRVRawState *s = bs->opaque;
-@@ -399,8 +439,25 @@ static int raw_truncate(BlockDriverState *bs, int64_t
- return 0;
- }
-
-+#ifdef __OpenBSD__
- static int64_t raw_getlength(BlockDriverState *bs)
- {
-+ int fd = ((BDRVRawState*)bs->opaque)->fd;
-+ struct stat st;
-+ if(fstat(fd, &st))
-+ return -1;
-+ if(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)){
-+ struct disklabel dl;
-+ if(ioctl(fd, DIOCGDINFO, &dl))
-+ return -1;
-+ return (uint64_t)dl.d_secsize *
-+ dl.d_partitions[DISKPART(st.st_rdev)].p_size;
-+ }else
-+ return st.st_size;
-+}
-+#else /* !__OpenBSD__ */
-+static int64_t raw_getlength(BlockDriverState *bs)
-+{
- BDRVRawState *s = bs->opaque;
- int fd = s->fd;
- int64_t size;
-@@ -445,6 +502,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
- }
- return size;
- }
-+#endif
-
- static int raw_create(const char *filename, int64_t total_size,
- const char *backing_file, int flags)
-@@ -479,11 +537,13 @@ BlockDriver bdrv_raw = {
- raw_close,
- raw_create,
- raw_flush,
--
-+
-+#ifndef CONFIG_NO_AIO
- .bdrv_aio_read = raw_aio_read,
- .bdrv_aio_write = raw_aio_write,
- .bdrv_aio_cancel = raw_aio_cancel,
- .aiocb_size = sizeof(RawAIOCB),
-+#endif /* !CONFIG_NO_AIO */
- .protocol_name = "file",
- .bdrv_pread = raw_pread,
- .bdrv_pwrite = raw_pwrite,
-@@ -815,11 +875,13 @@ BlockDriver bdrv_host_device = {
- raw_close,
- NULL,
- raw_flush,
--
-+
-+#ifndef CONFIG_NO_AIO
- .bdrv_aio_read = raw_aio_read,
- .bdrv_aio_write = raw_aio_write,
- .bdrv_aio_cancel = raw_aio_cancel,
- .aiocb_size = sizeof(RawAIOCB),
-+#endif /* !CONFIG_NO_AIO */
- .bdrv_pread = raw_pread,
- .bdrv_pwrite = raw_pwrite,
- .bdrv_getlength = raw_getlength,
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-configure,v
retrieving revision 1.9
diff -u -p -r1.9 patch-configure
--- patches/patch-configure 19 Jan 2008 23:53:58 -0000 1.9
+++ patches/patch-configure 1 Apr 2008 07:19:14 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-configure,v 1.9 2008/01/19 23:53:58 todd Exp $
---- configure.orig Mon Feb 5 17:01:54 2007
-+++ configure Wed Jan 16 11:23:08 2008
+--- configure.orig Sun Jan 6 14:38:42 2008
++++ configure Tue Apr 1 03:18:05 2008
@@ -21,10 +21,10 @@ prefix=""
interp_prefix="/usr/gnemul/qemu-%M"
static="no"
@@ -8,7 +8,7 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
-cc="gcc"
+cc="${CC:-cc}"
gcc3_search="yes"
- gcc3_list="gcc-3.4 gcc34 gcc-3.3 gcc33 gcc-3.2 gcc32"
+ gcc3_list="gcc-3.4.6 gcc-3.4 gcc34 gcc-3.3.6 gcc-3.3 gcc33 gcc-3.2 gcc32"
-host_cc="gcc"
+host_cc="${CC:-cc}"
ar="ar"
@@ -23,7 +23,7 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
cpu="powerpc"
;;
mips)
-@@ -68,6 +68,9 @@ case "$cpu" in
+@@ -74,6 +74,9 @@ case "$cpu" in
x86_64|amd64)
cpu="x86_64"
;;
@@ -33,28 +33,28 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
*)
cpu="unknown"
;;
-@@ -122,7 +125,11 @@ oss="yes"
+@@ -142,7 +145,11 @@ oss="yes"
;;
OpenBSD)
bsd="yes"
+openbsd="yes"
oss="yes"
-+if [ "$USE_KQEMU" = "yes" ] ; then
++if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
+ kqemu="yes"
+fi
;;
Darwin)
bsd="yes"
-@@ -573,7 +580,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"
-@@ -601,9 +608,7 @@ if test "$darwin" = "yes" ; then
+@@ -680,7 +687,7 @@ else
+ if test -z "$prefix" ; then
+ prefix="/usr/local"
+ fi
+- mansuffix="/share/man"
++ mansuffix="/man"
+ datasuffix="/share/qemu"
+ docsuffix="/share/doc/qemu"
+ binsuffix="/bin"
+@@ -709,9 +716,7 @@ if test "$darwin" = "yes" ; then
echo "Cocoa support $cocoa"
fi
echo "SDL support $sdl"
@@ -65,15 +65,15 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
echo "mingw32 support $mingw32"
echo "Adlib support $adlib"
echo "CoreAudio support $coreaudio"
-@@ -648,6 +653,7 @@ echo "mandir=$mandir" >> $config_mak
- echo "datadir=$datadir" >> $config_mak
- echo "docdir=$docdir" >> $config_mak
- echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
+@@ -772,6 +777,7 @@ echo "mandir=\${prefix}$mansuffix" >> $config_mak
+ echo "datadir=\${prefix}$datasuffix" >> $config_mak
+ echo "docdir=\${prefix}$docsuffix" >> $config_mak
+ echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
+echo "#define CONFIG_NO_AIO 1" >> $config_h
echo "MAKE=$make" >> $config_mak
echo "INSTALL=$install" >> $config_mak
echo "CC=$cc" >> $config_mak
-@@ -667,6 +673,9 @@ if test "$cpu" = "i386" ; then
+@@ -793,6 +799,9 @@ if test "$cpu" = "i386" ; then
elif test "$cpu" = "x86_64" ; then
echo "ARCH=x86_64" >> $config_mak
echo "#define HOST_X86_64 1" >> $config_h
@@ -83,7 +83,7 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
elif test "$cpu" = "armv4b" ; then
echo "ARCH=arm" >> $config_mak
echo "#define HOST_ARM 1" >> $config_h
-@@ -746,6 +755,9 @@ fi
+@@ -892,6 +901,9 @@ fi
if test "$oss" = "yes" ; then
echo "CONFIG_OSS=yes" >> $config_mak
echo "#define CONFIG_OSS 1" >> $config_h
@@ -93,9 +93,9 @@ $OpenBSD: patch-configure,v 1.9 2008/01/
fi
if test "$coreaudio" = "yes" ; then
echo "CONFIG_COREAUDIO=yes" >> $config_mak
-@@ -777,6 +789,13 @@ echo "TARGET_DIRS=$target_list" >> $config_mak
- if [ "$build_docs" = "yes" ] ; then
- echo "BUILD_DOCS=yes" >> $config_mak
+@@ -952,6 +964,13 @@ if test "$cocoa" = "yes" ; then
+ echo "#define CONFIG_COCOA 1" >> $config_h
+ echo "CONFIG_COCOA=yes" >> $config_mak
fi
+
+if [ "$openbsd" = "yes" ] ; then
Index: patches/patch-cpu-all_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-cpu-all_h,v
retrieving revision 1.2
diff -u -p -r1.2 patch-cpu-all_h
--- patches/patch-cpu-all_h 1 May 2007 12:55:14 -0000 1.2
+++ patches/patch-cpu-all_h 1 Apr 2008 06:56:53 -0000
@@ -1,13 +1,13 @@
$OpenBSD: patch-cpu-all_h,v 1.2 2007/05/01 12:55:14 todd Exp $
---- cpu-all.h.orig Mon Feb 5 17:01:54 2007
-+++ cpu-all.h Tue Apr 3 08:21:26 2007
-@@ -1002,13 +1002,22 @@ static inline int64_t cpu_get_real_ticks (void)
- #endif
+--- cpu-all.h.orig Sun Jan 6 14:38:42 2008
++++ cpu-all.h Tue Apr 1 01:43:57 2008
+@@ -1008,13 +1008,22 @@ static inline int64_t cpu_get_real_ticks(void)
}
+
#else
-/* The host CPU doesn't have an easily accessible cycle counter.
-- Just return a monotonically increasing vlue. This will be totally wrong,
-- but hopefully better than nothing. */
+- Just return a monotonically increasing value. This will be
+- totally wrong, but hopefully better than nothing. */
+# warning non-optimized CPU
+#include <sys/time.h>
+#include <time.h>
@@ -16,16 +16,16 @@ $OpenBSD: patch-cpu-all_h,v 1.2 2007/05/
{
- static int64_t ticks = 0;
- return ticks++;
-+ struct timeval tv;
-+ static int64_t i = 0;
-+ int64_t j;
-+
-+ gettimeofday(&tv, NULL);
-+ do {
-+ j = (tv.tv_sec * (uint64_t) 1000000) + tv.tv_usec;
-+ } while (i == j);
-+ i = j;
-+ return j;
++ struct timeval tv;
++ static int64_t i = 0;
++ int64_t j;
++
++ gettimeofday(&tv, NULL);
++ do {
++ j = (tv.tv_sec * (uint64_t) 1000000) + tv.tv_usec;
++ } while (i == j);
++ i = j;
++ return j;
}
#endif
Index: patches/patch-cutils_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-cutils_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-cutils_c
--- patches/patch-cutils_c 1 May 2007 12:55:14 -0000 1.1
+++ patches/patch-cutils_c 1 Apr 2008 06:56:53 -0000
@@ -1,9 +1,9 @@
$OpenBSD: patch-cutils_c,v 1.1 2007/05/01 12:55:14 todd Exp $
---- cutils.c.orig Mon Feb 5 17:01:54 2007
-+++ cutils.c Tue Apr 3 08:21:27 2007
+--- cutils.c.orig Sun Jan 6 14:38:42 2008
++++ cutils.c Tue Apr 1 01:33:39 2008
@@ -23,7 +23,7 @@
*/
- #include "vl.h"
+ #include "qemu-common.h"
-void pstrcpy(char *buf, int buf_size, const char *str)
+void pstrcpy(char *buf, size_t buf_size, const char *str)
Index: patches/patch-dyngen-exec_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-dyngen-exec_h,v
retrieving revision 1.5
diff -u -p -r1.5 patch-dyngen-exec_h
--- patches/patch-dyngen-exec_h 1 May 2007 12:55:14 -0000 1.5
+++ patches/patch-dyngen-exec_h 1 Apr 2008 06:56:53 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-dyngen-exec_h,v 1.5 2007/05/01 12:55:14 todd Exp $
---- dyngen-exec.h.orig Mon Feb 5 17:01:54 2007
-+++ dyngen-exec.h Sat Mar 10 16:39:39 2007
+--- dyngen-exec.h.orig Sun Jan 6 14:38:42 2008
++++ dyngen-exec.h Tue Apr 1 01:40:00 2008
@@ -27,11 +27,15 @@
#define _FILEDEFED
#endif
@@ -12,7 +12,7 @@ $OpenBSD: patch-dyngen-exec_h,v 1.5 2007
host headers do not allow that. */
#include <stddef.h>
-
-+#ifdef __OpenBSD__
++#ifdef _BSD
+#include <sys/types.h>
+#else
typedef unsigned char uint8_t;
@@ -26,19 +26,17 @@ $OpenBSD: patch-dyngen-exec_h,v 1.5 2007
/* XXX: This may be wrong for 64-bit ILP32 hosts. */
typedef void * host_reg_t;
-@@ -78,11 +83,15 @@ typedef void * host_reg_t;
- #define UINT32_MAX (4294967295U)
- #define UINT64_MAX ((uint64_t)(18446744073709551615))
-
-+#ifdef __OpenBSD__
-+typedef struct __sFILE FILE;
-+#else
+@@ -82,12 +87,12 @@ typedef void * host_reg_t;
+ typedef struct __sFILE FILE;
+ #else
typedef struct FILE FILE;
+-#endif
extern int fprintf(FILE *, const char *, ...);
+ extern int fputs(const char *, FILE *);
extern int printf(const char *, ...);
#undef NULL
#define NULL 0
+#endif
- #ifdef __i386__
+ #if defined(__i386__)
#define AREG0 "ebp"
Index: patches/patch-exec_c
===================================================================
RCS file: patches/patch-exec_c
diff -N patches/patch-exec_c
--- patches/patch-exec_c 1 May 2007 12:55:14 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-exec_c,v 1.6 2007/05/01 12:55:14 todd Exp $
---- exec.c.orig Mon Feb 5 17:01:54 2007
-+++ exec.c Tue Apr 3 08:21:30 2007
-@@ -2027,7 +2027,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, u
- target_phys_addr_t page;
- unsigned long pd;
- PhysPageDesc *p;
--
-+
- while (len > 0) {
- page = addr & TARGET_PAGE_MASK;
- l = (page + TARGET_PAGE_SIZE) - addr;
Index: patches/patch-fpu_softfloat-native_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-fpu_softfloat-native_h,v
retrieving revision 1.3
diff -u -p -r1.3 patch-fpu_softfloat-native_h
--- patches/patch-fpu_softfloat-native_h 1 May 2007 12:55:14 -0000
1.3
+++ patches/patch-fpu_softfloat-native_h 1 Apr 2008 06:57:25 -0000
@@ -1,13 +1,13 @@
$OpenBSD: patch-fpu_softfloat-native_h,v 1.3 2007/05/01 12:55:14 todd Exp $
---- fpu/softfloat-native.h.orig Mon Feb 5 17:01:54 2007
-+++ fpu/softfloat-native.h Sat Mar 10 16:39:40 2007
+--- fpu/softfloat-native.h.orig Sun Jan 6 14:38:42 2008
++++ fpu/softfloat-native.h Tue Apr 1 01:33:39 2008
@@ -1,4 +1,5 @@
/* Native implementation of soft float functions */
+#include "gnu-c99-math.h"
#include <math.h>
#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
-@@ -61,6 +62,11 @@ typedef union {
+@@ -84,6 +85,11 @@ typedef union {
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
Index: patches/patch-hw_ne2000_c
===================================================================
RCS file: patches/patch-hw_ne2000_c
diff -N patches/patch-hw_ne2000_c
--- patches/patch-hw_ne2000_c 1 May 2007 12:55:14 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-hw_ne2000_c,v 1.4 2007/05/01 12:55:14 todd Exp $
---- hw/ne2000.c.orig Thu Apr 5 17:24:58 2007
-+++ hw/ne2000.c Thu Apr 5 17:25:11 2007
-@@ -206,7 +206,7 @@ static int ne2000_buffer_full(NE2000State *s)
-
- index = s->curpag << 8;
- boundary = s->boundary << 8;
-- if (index <= boundary)
-+ if (index < boundary)
- avail = boundary - index;
- else
- avail = (s->stop - s->start) - (index - boundary);
Index: patches/patch-hw_pc_c
===================================================================
RCS file: patches/patch-hw_pc_c
diff -N patches/patch-hw_pc_c
--- patches/patch-hw_pc_c 1 May 2007 12:55:14 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
-$OpenBSD: patch-hw_pc_c,v 1.6 2007/05/01 12:55:14 todd Exp $
---- hw/pc.c.orig Mon Feb 5 17:01:54 2007
-+++ hw/pc.c Fri Apr 6 13:07:38 2007
-@@ -711,23 +711,36 @@ static void pc_init1(int ram_size, int vga_ram_size, i
- if (i440fx_state) {
- i440fx_init_memory_mappings(i440fx_state);
- }
--#if 0
- /* ??? Need to figure out some way for the user to
- specify SCSI devices. */
-- if (pci_enabled) {
-+ if (pci_enabled && scsi_enabled) {
- void *scsi;
- BlockDriverState *bdrv;
-
- scsi = lsi_scsi_init(pci_bus, -1);
-- bdrv = bdrv_new("scsidisk");
-- bdrv_open(bdrv, "scsi_disk.img", 0);
-+ bdrv = bdrv_new("scsidisk0");
-+ bdrv_open(bdrv, "scsi_disk0.img", 0);
- lsi_scsi_attach(scsi, bdrv, -1);
-- bdrv = bdrv_new("scsicd");
-- bdrv_open(bdrv, "scsi_cd.iso", 0);
-+ bdrv = bdrv_new("scsidisk1");
-+ bdrv_open(bdrv, "scsi_disk1.img", 0);
-+ lsi_scsi_attach(scsi, bdrv, -1);
-+ bdrv = bdrv_new("scsidisk2");
-+ bdrv_open(bdrv, "scsi_disk2.img", 0);
-+ lsi_scsi_attach(scsi, bdrv, -1);
-+ bdrv = bdrv_new("scsidisk3");
-+ bdrv_open(bdrv, "scsi_disk3.img", 0);
-+ lsi_scsi_attach(scsi, bdrv, -1);
-+ bdrv = bdrv_new("scsidisk4");
-+ bdrv_open(bdrv, "scsi_disk4.img", 0);
-+ lsi_scsi_attach(scsi, bdrv, -1);
-+ bdrv = bdrv_new("scsidisk5");
-+ bdrv_open(bdrv, "scsi_disk5.img", 0);
-+ lsi_scsi_attach(scsi, bdrv, -1);
-+ bdrv = bdrv_new("scsicd0");
-+ bdrv_open(bdrv, "scsi_cd0.iso", 0);
- bdrv_set_type_hint(bdrv, BDRV_TYPE_CDROM);
- lsi_scsi_attach(scsi, bdrv, -1);
- }
--#endif
- }
-
- static void pc_init_pci(int ram_size, int vga_ram_size, int boot_device,
Index: patches/patch-hw_rtl8139_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-hw_rtl8139_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-hw_rtl8139_c
--- patches/patch-hw_rtl8139_c 31 Mar 2008 06:49:27 -0000 1.3
+++ patches/patch-hw_rtl8139_c 1 Apr 2008 06:56:52 -0000
@@ -1,8 +1,8 @@
$OpenBSD: patch-hw_rtl8139_c,v 1.3 2008/03/31 06:49:27 todd Exp $
---- hw/rtl8139.c.orig Fri Mar 21 16:19:01 2008
-+++ hw/rtl8139.c Fri Mar 21 16:19:18 2008
-@@ -58,7 +58,7 @@
- //#define RTL8139_CALCULATE_RXCRC 1
+--- hw/rtl8139.c.orig Sun Jan 6 14:38:42 2008
++++ hw/rtl8139.c Tue Apr 1 01:33:39 2008
+@@ -60,7 +60,7 @@
+ #define RTL8139_CALCULATE_RXCRC 1
/* Uncomment to enable on-board timer interrupts */
-//#define RTL8139_ONBOARD_TIMER 1
Index: patches/patch-monitor_c
===================================================================
RCS file: patches/patch-monitor_c
diff -N patches/patch-monitor_c
--- patches/patch-monitor_c 31 Mar 2008 20:16:52 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,78 +0,0 @@
-$OpenBSD: patch-monitor_c,v 1.1 2008/03/31 20:16:52 todd Exp $
---- monitor.c.orig Mon Mar 31 21:41:53 2008
-+++ monitor.c Mon Mar 31 21:42:05 2008
-@@ -362,6 +362,8 @@ static void do_eject(int force, const char *filename)
- eject_device(bs, force);
- }
-
-+static int changing_rem_device;
-+
- static void do_change(const char *device, const char *filename)
- {
- BlockDriverState *bs;
-@@ -377,6 +379,7 @@ static void do_change(const char *device, const char *
- return;
- bdrv_open(bs, filename, 0);
- if (bdrv_is_encrypted(bs)) {
-+ changing_rem_device=1;
- term_printf("%s is encrypted.\n", device);
- for(i = 0; i < 3; i++) {
- monitor_readline("Password: ", 1, password, sizeof(password));
-@@ -384,6 +387,7 @@ static void do_change(const char *device, const char *
- break;
- term_printf("invalid password\n");
- }
-+ changing_rem_device=0;
- }
- }
-
-@@ -2441,6 +2445,8 @@ static void monitor_start_input(void)
- readline_start("(qemu) ", 0, monitor_handle_command1, NULL);
- }
-
-+static int monitor_readline_started;
-+
- static void term_event(void *opaque, int event)
- {
- if (event != CHR_EVENT_RESET)
-@@ -2449,7 +2455,8 @@ static void term_event(void *opaque, int event)
- if (!hide_banner)
- term_printf("QEMU %s monitor - type 'help' for more information\n",
- QEMU_VERSION);
-- monitor_start_input();
-+ if (!monitor_readline_started)
-+ monitor_start_input();
- }
-
- void monitor_init(CharDriverState *hd, int show_banner)
-@@ -2462,7 +2469,6 @@ void monitor_init(CharDriverState *hd, int show_banner
-
- /* XXX: use threads ? */
- /* modal monitor readline */
--static int monitor_readline_started;
- static char *monitor_readline_buf;
- static int monitor_readline_buf_size;
-
-@@ -2472,6 +2478,8 @@ static void monitor_readline_cb(void *opaque, const ch
- monitor_readline_started = 0;
- }
-
-+void gui_update(void);
-+
- void monitor_readline(const char *prompt, int is_password,
- char *buf, int buf_size)
- {
-@@ -2483,6 +2491,12 @@ void monitor_readline(const char *prompt, int is_passw
- monitor_readline_buf_size = buf_size;
- monitor_readline_started = 1;
- while (monitor_readline_started) {
-- main_loop_wait(10);
-+ if (!changing_rem_device)
-+ main_loop_wait(10);
-+ else
-+ gui_update();
- }
-+
-+ if (!changing_rem_device)
-+ monitor_start_input();
- }
Index: patches/patch-osdep_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-osdep_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-osdep_c
--- patches/patch-osdep_c 19 Jan 2008 23:53:58 -0000 1.1
+++ patches/patch-osdep_c 1 Apr 2008 06:56:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-osdep_c,v 1.1 2008/01/19 23:53:58 todd Exp $
---- osdep.c.orig Mon Feb 5 17:01:54 2007
-+++ osdep.c Mon Jan 7 19:01:42 2008
-@@ -79,7 +79,14 @@ void qemu_vfree(void *ptr)
+--- osdep.c.orig Sun Jan 6 14:38:42 2008
++++ osdep.c Tue Apr 1 01:36:02 2008
+@@ -83,7 +83,14 @@ void qemu_vfree(void *ptr)
#if defined(USE_KQEMU)
@@ -16,7 +16,7 @@ $OpenBSD: patch-osdep_c,v 1.1 2008/01/19
#include <sys/mman.h>
#include <fcntl.h>
-@@ -87,9 +94,15 @@ void *kqemu_vmalloc(size_t size)
+@@ -91,9 +98,15 @@ static void *kqemu_vmalloc(size_t size)
{
static int phys_ram_fd = -1;
static int phys_ram_size = 0;
@@ -33,7 +33,7 @@ $OpenBSD: patch-osdep_c,v 1.1 2008/01/19
#ifdef HOST_SOLARIS
struct statvfs stfs;
#else
-@@ -151,11 +164,13 @@ void *kqemu_vmalloc(size_t size)
+@@ -155,11 +168,13 @@ static void *kqemu_vmalloc(size_t size)
}
unlink(phys_ram_file);
}
@@ -41,10 +41,10 @@ $OpenBSD: patch-osdep_c,v 1.1 2008/01/19
+
size = (size + 4095) & ~4095;
ftruncate(phys_ram_fd, phys_ram_size + size);
- ptr = mmap(NULL,
- size,
-- PROT_WRITE | PROT_READ, MAP_SHARED,
-+ PROT_WRITE | PROT_READ, map_anon|MAP_SHARED,
+ ptr = mmap(NULL,
+ size,
+- PROT_WRITE | PROT_READ, MAP_SHARED,
++ PROT_WRITE | PROT_READ, map_anon|MAP_SHARED,
phys_ram_fd, phys_ram_size);
if (ptr == MAP_FAILED) {
fprintf(stderr, "Could not map physical memory\n");
Index: patches/patch-osdep_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-osdep_h,v
retrieving revision 1.3
diff -u -p -r1.3 patch-osdep_h
--- patches/patch-osdep_h 1 May 2007 12:55:14 -0000 1.3
+++ patches/patch-osdep_h 1 Apr 2008 06:56:53 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-osdep_h,v 1.3 2007/05/01 12:55:14 todd Exp $
---- osdep.h.orig Mon Feb 5 17:01:54 2007
-+++ osdep.h Sat Mar 10 16:39:40 2007
+--- osdep.h.orig Sun Jan 6 14:38:42 2008
++++ osdep.h Tue Apr 1 01:33:39 2008
@@ -2,6 +2,10 @@
#define QEMU_OSDEP_H
@@ -10,5 +10,5 @@ $OpenBSD: patch-osdep_h,v 1.3 2007/05/01
+#include <sys/signal.h>
+#endif
- #define qemu_printf printf
-
+ #ifndef glue
+ #define xglue(x, y) x ## y
Index: patches/patch-qemu-common_h
===================================================================
RCS file: patches/patch-qemu-common_h
diff -N patches/patch-qemu-common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-qemu-common_h 1 Apr 2008 06:56:53 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- qemu-common.h.orig Tue Apr 1 01:45:33 2008
++++ qemu-common.h Tue Apr 1 01:45:59 2008
+@@ -77,8 +77,8 @@ int qemu_bh_poll(void);
+ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c);
+
+ /* cutils.c */
+-void pstrcpy(char *buf, int buf_size, const char *str);
+-char *pstrcat(char *buf, int buf_size, const char *s);
++void pstrcpy(char *buf, size_t buf_size, const char *str);
++char *pstrcat(char *buf, size_t buf_size, const char *s);
+ int strstart(const char *str, const char *val, const char **ptr);
+ int stristart(const char *str, const char *val, const char **ptr);
+ time_t mktimegm(struct tm *tm);
Index: patches/patch-qemu-doc_texi
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-qemu-doc_texi,v
retrieving revision 1.2
diff -u -p -r1.2 patch-qemu-doc_texi
--- patches/patch-qemu-doc_texi 31 Mar 2008 14:26:00 -0000 1.2
+++ patches/patch-qemu-doc_texi 1 Apr 2008 06:56:53 -0000
@@ -1,17 +1,17 @@
$OpenBSD: patch-qemu-doc_texi,v 1.2 2008/03/31 14:26:00 todd Exp $
---- qemu-doc.texi.orig Tue Feb 6 00:01:54 2007
-+++ qemu-doc.texi Sun Feb 10 02:32:12 2008
-@@ -461,7 +461,7 @@ or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windo
- Then @file{dir} can be accessed in @file{\\smbserver\qemu}.
+--- qemu-doc.texi.orig Sun Jan 6 14:38:42 2008
++++ qemu-doc.texi Tue Apr 1 01:33:39 2008
+@@ -632,7 +632,7 @@ or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windo
+ Then @[EMAIL PROTECTED] can be accessed in @file{\\smbserver\qemu}.
Note that a SAMBA server must be installed on the host OS in
[EMAIL PROTECTED]/usr/sbin/smbd}. QEMU was tested successfully with smbd
version
[EMAIL PROTECTED]/libexec/smbd}. QEMU was tested successfully with smbd version
2.2.7a from the Red Hat 9 and version 3.0.10-1.fc3 from Fedora Core 3.
- @item -redir [tcp|udp]:host-port:[guest-host]:guest-port
-@@ -511,6 +511,16 @@ Use @var{cmdline} as kernel command line
- @item -initrd file
+ @item -redir [tcp|udp]:@var{host-port}:[EMAIL PROTECTED]:@var{guest-port}
+@@ -682,6 +682,16 @@ Use @var{cmdline} as kernel command line
+ @item -initrd @var{file}
Use @var{file} as initial ram disk.
[EMAIL PROTECTED] table
Index: patches/patch-target-i386_helper2_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-target-i386_helper2_c,v
retrieving revision 1.5
diff -u -p -r1.5 patch-target-i386_helper2_c
--- patches/patch-target-i386_helper2_c 1 May 2007 12:55:14 -0000 1.5
+++ patches/patch-target-i386_helper2_c 1 Apr 2008 06:56:52 -0000
@@ -1,21 +1,21 @@
$OpenBSD: patch-target-i386_helper2_c,v 1.5 2007/05/01 12:55:14 todd Exp $
---- target-i386/helper2.c.orig Mon Feb 5 17:01:54 2007
-+++ target-i386/helper2.c Mon Mar 12 15:48:39 2007
-@@ -127,7 +127,7 @@ CPUX86State *cpu_x86_init(void)
- env->cpuid_model[i >> 2] |= c << (8 * (i & 3));
- }
- }
+--- target-i386/helper2.c.orig Sun Jan 6 14:38:45 2008
++++ target-i386/helper2.c Tue Apr 1 01:49:51 2008
+@@ -133,7 +133,7 @@ typedef struct x86_def_t {
+ CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
+ CPUID_PAE | CPUID_SEP | CPUID_APIC)
+ static x86_def_t x86_defs[] = {
-#ifdef TARGET_X86_64
-+/* #ifdef TARGET_X86_64 -- You must enable it for Mac OS X x86 */
- /* currently not enabled for std i386 because not fully tested */
- env->cpuid_ext2_features = (env->cpuid_features & 0x0183F3FF);
- env->cpuid_ext2_features |= CPUID_EXT2_LM | CPUID_EXT2_SYSCALL |
CPUID_EXT2_NX;
-@@ -137,7 +137,7 @@ CPUX86State *cpu_x86_init(void)
- env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA;
- /* this feature is needed for Solaris and isn't fully implemented */
- env->cpuid_features |= CPUID_PSE36;
++/* #ifdef TARGET_X86_64 -- You must enable it for Mac OS X x86 */
+ {
+ .name = "qemu64",
+ .level = 2,
+@@ -154,7 +154,7 @@ static x86_def_t x86_defs[] = {
+ .ext3_features = CPUID_EXT3_SVM,
+ .xlevel = 0x8000000A,
+ },
-#endif
+/* #endif -- To run Mac OS X x86 */
- }
- cpu_reset(env);
- #ifdef USE_KQEMU
+ {
+ .name = "qemu32",
+ .level = 2,
Index: patches/patch-target-ppc_op_helper_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-target-ppc_op_helper_c,v
retrieving revision 1.4
diff -u -p -r1.4 patch-target-ppc_op_helper_c
--- patches/patch-target-ppc_op_helper_c 1 May 2007 12:55:14 -0000
1.4
+++ patches/patch-target-ppc_op_helper_c 1 Apr 2008 06:56:53 -0000
@@ -1,11 +1,11 @@
$OpenBSD: patch-target-ppc_op_helper_c,v 1.4 2007/05/01 12:55:14 todd Exp $
---- target-ppc/op_helper.c.orig Mon Feb 5 17:01:54 2007
-+++ target-ppc/op_helper.c Sat Mar 10 16:39:41 2007
+--- target-ppc/op_helper.c.orig Sun Jan 6 14:38:45 2008
++++ target-ppc/op_helper.c Tue Apr 1 01:33:40 2008
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <math.h>
#include "exec.h"
+ #include "host-utils.h"
- #define MEMSUFFIX _raw
Index: patches/patch-vl_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-vl_c,v
retrieving revision 1.16
diff -u -p -r1.16 patch-vl_c
--- patches/patch-vl_c 31 Mar 2008 20:16:52 -0000 1.16
+++ patches/patch-vl_c 2 Apr 2008 02:43:52 -0000
@@ -1,8 +1,8 @@
$OpenBSD: patch-vl_c,v 1.16 2008/03/31 20:16:52 todd Exp $
---- vl.c.orig Tue Feb 6 00:01:54 2007
-+++ vl.c Mon Mar 31 21:42:05 2008
-@@ -44,7 +44,8 @@
- #include <netdb.h>
+--- vl.c.orig Sun Jan 6 14:38:42 2008
++++ vl.c Tue Apr 1 22:43:39 2008
+@@ -61,7 +61,8 @@
+ #include <arpa/inet.h>
#ifdef _BSD
#include <sys/stat.h>
-#ifndef __APPLE__
@@ -10,8 +10,8 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
#include <libutil.h>
#endif
- #else
-@@ -92,7 +93,7 @@
+ #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
+@@ -136,7 +137,7 @@ int inet_aton(const char *cp, struct in_addr *ia);
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
@@ -20,16 +20,8 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
#endif
//#define DEBUG_UNUSED_IOPORT
-@@ -168,6 +169,7 @@ const char *vnc_display;
- int acpi_enabled = 1;
- int fd_bootchk = 1;
- int no_reboot = 0;
-+int scsi_enabled = 0;
- int daemonize = 0;
- const char *option_rom[MAX_OPTION_ROMS];
- int nb_option_roms;
-@@ -2808,7 +2810,7 @@ static int parse_macaddr(uint8_t *macaddr, const char
- return 0;
+@@ -3491,7 +3492,7 @@ static int parse_macaddr(uint8_t *macaddr, const char
+ return -1;
}
-static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
@@ -37,13 +29,13 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
{
const char *p, *p1;
int len;
-@@ -3226,11 +3228,85 @@ static int tap_open(char *ifname, int ifname_size)
+@@ -3922,11 +3923,85 @@ static int tap_open(char *ifname, int ifname_size)
char *dev;
struct stat s;
+ /* If the device was specified on the command line, use it */
+ if (ifname[0]) {
-+ fd = open(ifname, O_RDWR);
++ TFR(fd = open(ifname, O_RDWR));
+ if (fd < 0) {
+ fprintf(stderr, "warning: could not open %s: no virtual network
emulation\n", ifname);
+ return -1;
@@ -52,7 +44,7 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
+#ifdef __OpenBSD__
+ struct ifreq ifr;
+ int i = 0, enoentcount = 0, err = 0, sock;
-+ char dname[100], iname[100];
++ char dname[100];
+
+ bzero(&ifr, sizeof(ifr));
+ if (ifname != NULL && ifname[0] != '\0') {
@@ -62,17 +54,17 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
+ } else {
+ for (; i != -1; i++) {
+ snprintf(dname, sizeof dname, "/dev/tun%d", i);
-+ bzero(&ifr.ifr_name, sizeof(ifr.ifr_name));
++ bzero(&ifr.ifr_name, sizeof(ifr.ifr_name));
+ snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "tun%d", i);
-+ fd = open(dname, O_RDWR);
++ TFR(fd = open(dname, O_RDWR));
+ if (fd >= 0)
+ break;
+ else if (errno != ENOENT || ++enoentcount > 3) {
+ if (errno != EBUSY) {
+ err = errno;
+ break;
-+ }
-+ } else
++ }
++ } else
+ err = errno;
+ }
+ }
@@ -113,7 +105,7 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
+ }
+
+#else
- fd = open("/dev/tap", O_RDWR);
+ TFR(fd = open("/dev/tap", O_RDWR));
if (fd < 0) {
fprintf(stderr, "warning: could not open /dev/tap: no virtual network
emulation\n");
return -1;
@@ -123,25 +115,25 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
fstat(fd, &s);
dev = devname(s.st_rdev, S_IFCHR);
-@@ -3282,6 +3358,7 @@ static int net_tap_init(VLANState *vlan, const char *i
- char *args[3];
- char **parg;
+@@ -4141,6 +4216,7 @@ static int net_tap_init(VLANState *vlan, const char *i
+ TAPState *s;
+ int fd;
char ifname[128];
+ bzero(&ifname,sizeof(ifname));
if (ifname1 != NULL)
pstrcpy(ifname, sizeof(ifname), ifname1);
-@@ -3476,7 +3553,7 @@ static int net_socket_mcast_create(struct sockaddr_in
+@@ -4320,7 +4396,7 @@ static int net_socket_mcast_create(struct sockaddr_in
/* Force mcast msgs to loopback (eg. several QEMUs in same host */
val = 1;
- ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
+ ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
- (const char *)&val, sizeof(val));
+ (const char *)&val, sizeof(char));
if (ret < 0) {
perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
goto fail;
-@@ -3732,7 +3809,8 @@ static int net_socket_mcast_init(VLANState *vlan, cons
-
+@@ -4609,7 +4685,8 @@ static const char *get_word(char *buf, int buf_size, c
+ return p;
}
-static int get_param_value(char *buf, int buf_size,
@@ -150,16 +142,17 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
const char *tag, const char *str)
{
const char *p;
-@@ -3856,6 +3934,8 @@ static int net_client_init(const char *str)
- if (!strcmp(device, "tap")) {
+@@ -4748,6 +4825,9 @@ static int net_client_init(const char *str)
char ifname[64];
- char setup_script[1024];
-+ bzero(&ifname,sizeof(ifname));
-+ bzero(&setup_script,sizeof(setup_script));
+ char setup_script[1024], down_script[1024];
int fd;
++ bzero(&ifname, sizeof(ifname));
++ bzero(&setup_script, sizeof(setup_script));
++ bzero(&down_script, sizeof(down_script));
+ vlan->nb_host_devs++;
if (get_param_value(buf, sizeof(buf), "fd", p) > 0) {
fd = strtol(buf, NULL, 0);
-@@ -3863,13 +3943,13 @@ static int net_client_init(const char *str)
+@@ -4755,16 +4835,16 @@ static int net_client_init(const char *str)
if (net_tap_fd_init(vlan, fd))
ret = 0;
} else {
@@ -169,49 +162,18 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
if (get_param_value(setup_script, sizeof(setup_script), "script",
p) == 0) {
pstrcpy(setup_script, sizeof(setup_script),
DEFAULT_NETWORK_SCRIPT);
}
-- ret = net_tap_init(vlan, ifname, setup_script);
+ if (get_param_value(down_script, sizeof(down_script),
"downscript", p) == 0) {
+ pstrcpy(down_script, sizeof(down_script),
DEFAULT_NETWORK_DOWN_SCRIPT);
+ }
+- ret = net_tap_init(vlan, ifname, setup_script, down_script);
+ if (get_param_value(ifname, sizeof(ifname), "ifname", p) == 0)
-+ ret = net_tap_init(vlan, NULL, setup_script);
-+ else
-+ ret = net_tap_init(vlan, NULL, setup_script);
++ ret = net_tap_init(vlan, NULL, setup_script, down_script);
++ else
++ ret = net_tap_init(vlan, NULL, setup_script, down_script);
}
} else
#endif
-@@ -6117,6 +6197,7 @@ void help(void)
- "-no-acpi disable ACPI\n"
- #endif
- "-no-reboot exit instead of rebooting\n"
-+ "-scsienable enable scsi devices\n"
- "-loadvm file start right away with a saved state (loadvm in
monitor)\n"
- "-vnc display start a VNC server on display\n"
- #ifndef _WIN32
-@@ -6205,7 +6286,8 @@ enum {
- QEMU_OPTION_no_reboot,
- QEMU_OPTION_daemonize,
- QEMU_OPTION_option_rom,
-- QEMU_OPTION_semihosting
-+ QEMU_OPTION_semihosting,
-+ QEMU_OPTION_scsi
- };
-
- typedef struct QEMUOption {
-@@ -6281,6 +6363,7 @@ const QEMUOption qemu_options[] = {
- { "usbdevice", HAS_ARG, QEMU_OPTION_usbdevice },
- { "smp", HAS_ARG, QEMU_OPTION_smp },
- { "vnc", HAS_ARG, QEMU_OPTION_vnc },
-+ { "scsienable", 0, QEMU_OPTION_scsi },
-
- /* temporary options */
- { "usb", 0, QEMU_OPTION_usb },
-@@ -6329,6 +6412,7 @@ static void read_passwords(void)
- for(i = 0; i < 6; i++) {
- bs = get_bdrv(i);
- if (bs && bdrv_is_encrypted(bs)) {
-+ qemu_bh_poll();
- term_printf("%s is encrypted.\n", bdrv_get_device_name(bs));
- for(j = 0; j < 3; j++) {
- monitor_readline("Password: ",
-@@ -6570,7 +6654,11 @@ int main(int argc, char **argv)
+@@ -8130,19 +8210,23 @@ int main(int argc, char **argv)
gdbstub_port = DEFAULT_GDBSTUB_PORT;
#endif
snapshot = 0;
@@ -222,32 +184,19 @@ $OpenBSD: patch-vl_c,v 1.16 2008/03/31 2
+#endif
kernel_filename = NULL;
kernel_cmdline = "";
- #ifdef TARGET_PPC
-@@ -6580,14 +6668,14 @@ int main(int argc, char **argv)
- #endif
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
- pstrcpy(monitor_device, sizeof(monitor_device), "vc");
-+ pstrcpy(monitor_device, sizeof(monitor_device), nographic ? "stdio" :
"vc" );
++ pstrcpy(monitor_device, sizeof(monitor_device), nographic ? "stdio" :
"vc");
- pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc");
+ pstrcpy(serial_devices[0], sizeof(serial_devices[0]), nographic ? "stdio"
: "vc");
for(i = 1; i < MAX_SERIAL_PORTS; i++)
serial_devices[i][0] = '\0';
serial_device_index = 0;
-
+
- pstrcpy(parallel_devices[0], sizeof(parallel_devices[0]), "vc");
+ pstrcpy(parallel_devices[0], sizeof(parallel_devices[0]), "null");
for(i = 1; i < MAX_PARALLEL_PORTS; i++)
parallel_devices[i][0] = '\0';
parallel_device_index = 0;
-@@ -6940,6 +7028,9 @@ int main(int argc, char **argv)
- break;
- case QEMU_OPTION_no_acpi:
- acpi_enabled = 0;
-+ break;
-+ case QEMU_OPTION_scsi:
-+ scsi_enabled = 1;
- break;
- case QEMU_OPTION_no_reboot:
- no_reboot = 1;
Index: patches/patch-vl_h
===================================================================
RCS file: patches/patch-vl_h
diff -N patches/patch-vl_h
--- patches/patch-vl_h 1 May 2007 12:55:14 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-vl_h,v 1.7 2007/05/01 12:55:14 todd Exp $
---- vl.h.orig Mon Feb 5 17:01:54 2007
-+++ vl.h Fri Apr 6 13:18:16 2007
-@@ -101,8 +101,8 @@ static inline char *realpath(const char *path, char *r
- #endif
-
- /* cutils.c */
--void pstrcpy(char *buf, int buf_size, const char *str);
--char *pstrcat(char *buf, int buf_size, const char *s);
-+void pstrcpy(char *buf, size_t buf_size, const char *str);
-+char *pstrcat(char *buf, size_t buf_size, const char *s);
- int strstart(const char *str, const char *val, const char **ptr);
- int stristart(const char *str, const char *val, const char **ptr);
-
-@@ -114,6 +114,7 @@ void hw_error(const char *fmt, ...);
- extern const char *bios_dir;
-
- extern int vm_running;
-+extern int scsi_enabled;
-
- typedef struct vm_change_state_entry VMChangeStateEntry;
- typedef void VMChangeStateHandler(void *opaque, int running);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/emulators/qemu/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -r1.9 PLIST
--- pkg/PLIST 31 Mar 2008 20:59:21 -0000 1.9
+++ pkg/PLIST 2 Apr 2008 02:59:06 -0000
@@ -3,9 +3,17 @@
bin/qemu
bin/qemu-img
bin/qemu-system-arm
+bin/qemu-system-cris
+bin/qemu-system-m68k
bin/qemu-system-mips
+bin/qemu-system-mips64
+bin/qemu-system-mips64el
bin/qemu-system-mipsel
bin/qemu-system-ppc
+bin/qemu-system-ppc64
+bin/qemu-system-ppcemb
+bin/qemu-system-sh4
+bin/qemu-system-sh4eb
bin/qemu-system-sparc
bin/qemu-system-x86_64
@man man/man1/qemu-img.1
@@ -56,7 +64,6 @@ share/qemu/keymaps/sl
share/qemu/keymaps/sv
share/qemu/keymaps/th
share/qemu/keymaps/tr
-share/qemu/linux_boot.bin
share/qemu/openbios-sparc32
share/qemu/ppc_rom.bin
share/qemu/pxe-ne2k_pci.bin
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.