qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [WIN32] qemu kqemu qvm86
@ 2005-04-26 11:43 Ronald
  2005-04-26 13:07 ` Paul Brook
  0 siblings, 1 reply; 2+ messages in thread
From: Ronald @ 2005-04-26 11:43 UTC (permalink / raw)
  To: qemu-devel

Hi,

I had some troubles building current cvs, the build process abort on
kqemu.o with

i386-mingw32-gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer
-I. -I/home/ronald/cvs/win32/qemu/target-i386
-I/home/ronald/cvs/win32/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -I/home/ronald/cvs/win32/qemu/fpu
-I/home/ronald/cvs/win32/qemu/slirp -c -o kqemu.o
/home/ronald/cvs/win32/qemu/kqemu.c /home/ronald/cvs/win32/qemu/kqemu.c:
In function `kqemu_cpu_exec': /home/ronald/cvs/win32/qemu/kqemu.c:459:
warning: implicit declaration of function `_IOWR'
/home/ronald/cvs/win32/qemu/kqemu.c:459: error: parse error before
"struct" /home/ronald/cvs/win32/qemu/kqemu.c:463: error: structure has no
member named `retval' /home/ronald/cvs/win32/qemu/kqemu.c:412: warning:
unused variable `temp' make: *** [kqemu.o] Erreur 1

I have found 3 possibles solutions:

a minor fix to configure script and build without kqemu support:

--- configure	2005-04-23 20:36:13.109807951 +0200
+++ configure.new	2005-04-26 13:02:24.063395921 +0200
@@ -205,7 +205,7 @@
     EXESUF=".exe"
     gdbstub="no"
     oss="no"
-    if [ "$cpu" = "i386" ] ; then
+    if [ "$cpu" = "i386" ] && [ "$kqemu" != "no" ] ; then
         kqemu="yes"
     fi
 fi
@@ -566,9 +566,11 @@
 
 if test $kqemu = "yes" ; then
   echo "CONFIG_KQEMU=yes" >> $config_mak
-  echo "KERNEL_PATH=$kernel_path" >> $config_mak
-  if test $kbuild26 = "yes" ; then
-    echo "CONFIG_KBUILD26=yes" >> $config_mak
+  if test $linux = "yes" ; then
+    echo "KERNEL_PATH=$kernel_path" >> $config_mak
+    if test $kbuild26 = "yes" ; then
+      echo "CONFIG_KBUILD26=yes" >> $config_mak
+    fi
   fi
 fi
 echo "SRC_PATH=$source_path" >> $config_mak


import the missing definitions from qvm86's kqemu.h:

--- kqemu/kqemu.h	2005-04-26 12:06:43.862955430 +0200 
+++ kqemu/kqemu.h.new	2005-04-26 12:16:25.183034739 +0200 
@@ -47,6 +47,9 @@
                                        KQEMU_FLUSH_ALL means full flush
                                        */
 #define KQEMU_MAX_PAGES_TO_FLUSH 512
 #define KQEMU_FLUSH_ALL (KQEMU_MAX_PAGES_TO_FLUSH + 1)
+#ifdef _WIN32
+	uint32_t retval;
+#endif
 };
 
 struct kqemu_init {
@@ -64,9 +67,15 @@
                                       unsupported INSN) */
 #define KQEMU_RET_INTR      0x0201 /* interrupted by a signal */
 
+#ifdef _WIN32
+#define KQEMU_EXEC		CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_BUFFERED,
FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define KQEMU_INIT	
CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_BUFFERED, FILE_WRITE_ACCESS)
+#define KQEMU_GET_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 3,
METHOD_BUFFERED, FILE_READ_ACCESS)
+#else
 #define KQEMU_EXEC           _IOWR('q', 1, struct kqemu_cpu_state)
 #define KQEMU_INIT           _IOW('q', 2, struct kqemu_init) #define
 KQEMU_GET_VERSION    _IOR('q', 3, int)
+#endif
 
 #ifdef __KERNEL__
 struct kqemu_state;


or include qmv86/kqemu.h instead of kqemu/kqemu.h in kqemu.c:

--- kqemu.c	2005-04-26 12:49:30.204071396 +0200 
+++ kqemu.c.new	2005-04-26 13:16:02.567414095 +0200 
@@ -43,7 +43,11 @@
 
 #include <unistd.h>
 #include <fcntl.h>
+#ifdef _WIN32
+#include "qvm86/kqemu.h"
+#else
 #include "kqemu/kqemu.h"
+#endif
 
 /* compatibility stuff */
 #ifndef KQEMU_RET_SYSCALL
@@ -51,7 +55,7 @@
 #endif
 
 #ifdef _WIN32
-#define KQEMU_DEVICE "\\\\.\\kqemu"
+#define KQEMU_DEVICE "\\\\.\\qvm86"
 #else
 #define KQEMU_DEVICE "/dev/kqemu"
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [WIN32] qemu kqemu qvm86
  2005-04-26 11:43 [Qemu-devel] [WIN32] qemu kqemu qvm86 Ronald
@ 2005-04-26 13:07 ` Paul Brook
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2005-04-26 13:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ronald

On Tuesday 26 April 2005 12:43, Ronald wrote:
> Hi,
>
> I had some troubles building current cvs, the build process abort on
> kqemu.o with

<...>

kqemu doesn't support windows hosts. Either remove the kqemu directory, or 
configure with --disable-kqemu.

If you're using qvm86 you should apply patch.qvm86

Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-26 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26 11:43 [Qemu-devel] [WIN32] qemu kqemu qvm86 Ronald
2005-04-26 13:07 ` Paul Brook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).