qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ronald <daimon55@free.fr>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [WIN32] qemu kqemu qvm86
Date: Tue, 26 Apr 2005 13:43:26 +0200	[thread overview]
Message-ID: <pan.2005.04.26.11.43.26.230712@free.fr> (raw)

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

             reply	other threads:[~2005-04-26 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26 11:43 Ronald [this message]
2005-04-26 13:07 ` [Qemu-devel] [WIN32] qemu kqemu qvm86 Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pan.2005.04.26.11.43.26.230712@free.fr \
    --to=daimon55@free.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).