Qemu 1.6.0 for Win32

I updated my glib2 to the same version that works great on OS X, and it feels like the Win32 binaries are just slower than ever.  Now I am running this under VMWare, so maybe that is why it is so slow.

Can someone give this a shot?

Any and all feedback would be nice.

Oh I included the Doom 1.1 in there run it like this:

qemu-system-i386 -L pc-bios -m 16 -hda doom11.img -soundhw sb16,adlib

And you should be able to run doom with sound.

35 thoughts on “Qemu 1.6.0 for Win32

  1. I use glib 2.37 and Qemu 1.6 is really fast and, as usual, I applied patches to the following c files:
    scsi-disk.c
    scsi-bus.c
    cirrus_vga.c
    cirrus_vga_rop.h
    ioport.c
    pc.c
    scsi.h
    cpu.c (target-i386)

    and of course:

    sdl.c

    • I don’t suppose you have a patch for all those changes…? It sounds like youve got something pretty extensive going on there!

      I think I’m missing something fundamental from my MinGW build system…

      $ ./configure –target-list=i386-softmmu
      Install prefix c:/Program Files/QEMU
      BIOS directory c:/Program Files/QEMU
      binary directory c:/Program Files/QEMU
      library directory c:/Program Files/QEMU/lib
      libexec directory c:/Program Files/QEMU/libexec
      include directory c:/Program Files/QEMU/include
      config directory c:/Program Files/QEMU
      local state directory queried at runtime
      Source path /usr/src/qemu-1.6.0
      C compiler cc
      Host C compiler cc
      Objective-C compiler cc
      CFLAGS -O2 -D_FORTIFY_SOURCE=2 -g
      QEMU_CFLAGS -march=i486 -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_M
      EAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wst
      rict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-protot
      ypes -fno-strict-aliasing -Wendif-labels -Wmissing-include-dirs -Wempty-body -W
      nested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers –
      Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-al
      l -I$(SRC_PATH)/pixman/pixman -I$(BUILD_DIR)/pixman/pixman -I$(SRC_PATH)/dtc/lib
      fdt
      LDFLAGS -Wl,–nxcompat -Wl,–no-seh -Wl,–dynamicbase -Wl,–warn-commo
      n -m32 -g
      make make
      install install
      python python
      smbd /usr/sbin/smbd
      host CPU i386
      host big endian no
      target list i386-softmmu
      tcg debug enabled no
      gprof enabled no
      sparse enabled no
      strip binaries yes
      profiler no
      static build no
      -Werror enabled no
      pixman internal
      SDL support yes
      GTK support no
      curses support no
      curl support no
      mingw32 support yes
      Audio drivers winwave
      Block whitelist (rw)
      Block whitelist (ro)
      Mixer emulation no
      VirtFS support no
      VNC support yes
      VNC TLS support no
      VNC SASL support no
      VNC JPEG support no
      VNC PNG support no
      VNC WS support no
      xen support no
      brlapi support no
      bluez support no
      Documentation yes
      GUEST_BASE yes
      PIE no
      vde support no
      Linux AIO support no
      ATTR/XATTR support no
      Install blobs yes
      KVM support no
      RDMA support no
      TCG interpreter no
      fdt support yes
      preadv support no
      fdatasync no
      madvise no
      posix_madvise no
      sigev_thread_id no
      uuid support no
      libcap-ng support no
      vhost-net support no
      vhost-scsi support no
      Trace backend nop
      Trace output file trace- spice support no (/)
      rbd support no
      xfsctl support no
      nss used no
      libusb no
      usb net redir no
      GLX support no
      libiscsi support no
      build guest agent no
      seccomp support no
      coroutine backend win32
      GlusterFS support no
      virtio-blk-data-plane no
      gcov gcov
      gcov enabled no
      TPM support no
      libssh2 support no
      TPM passthrough no
      QOM debugging yes

      I don’t suppose you could upload your mingw directory somewhere…. … 😉

      • basically, I ported the scsi files from 1.2.2 to 1.6.0 since those from 1.3.x onwards crash the entire emulator when using a scsi hard disk with a boot file (int13.bin for dc390) on NT 3.5x while partitioning the hard disk, and commeting out the assert line does nothing.

    • OpenBSD 5.0 working OK with a serial console
      qemu-system-i386 -L pc-bios -serial telnet:127.0.0.1:4444,server
      And I can connect out over the nat so networking looks promising.

    • Huh I wonder why my machine doesn’t complain for the library… I added the one I built into the archive in case there is any kind of message mismatch.

      Thanks for testing!

  2. Works here. With the main menu running with music and sound, it pegs my Core2Duo E8400 at around 55-60%. Certainly not a “light weight” emulation.

    • I forget what kind of Xeon’s are in my 2006 MacPro, but yeah it rides around 50% of all my cores when I run the OS X version of 1.6.0 with Doom….

  3. Someone should test NT/MIPS on QEMU/Windows. Looks like something got f*cked on recent versions, firmware doesn’t load anymore, and a black window opens instead.

    Also, some skilled guy would compile PPC binaries with Hervé RFC patches, to test how much has improved RS/6000 emulation on recent times (i’ve seen some recent commits to 43p machine).

    • Here is all I have regarding the MIPS crash….

      (gdb) run
      The program being debugged has been started already.
      Start it from the beginning? (y or n) y
      Starting program: /usr/src/qemu-1.6.0/mips64el-softmmu/qemu-system-mips64el -L /tmp -M magnum
      Reading symbols for shared libraries . done

      Program received signal EXC_BAD_ACCESS, Could not access memory.
      Reason: KERN_PROTECTION_FAILURE at address: 0x0000000101e29940
      [Switching to process 48544 thread 0x5d07]
      0x0000000101e29940 in ?? ()
      (gdb) bt
      #0 0x0000000101e29940 in ?? ()
      #1 0x000000010018df79 in tcg_cpu_exec [inlined] () at /usr/src/qemu-1.6.0/cpus.c:1159
      #2 tcg_exec_all [inlined] () at /usr/src/qemu-1.6.0/cpus.c:1192
      #3 0x000000010018df79 in qemu_tcg_cpu_thread_fn (arg=) at /usr/src/qemu-1.6.0/cpus.c:868
      #4 0x00007fff92e727a2 in _pthread_start ()
      #5 0x00007fff92e5f1e1 in thread_start ()

      • Nice 🙂

        Tell to Hervé that we found the ROM for the IBM Power Series 850. Maybe he can fix some day his 43p patches to work with it, and be able to install finally OS/2 for PPC in QEMU.

  4. Hi… i’m trying to cross build qemu 1.6 for win32/win64 from scratch but I can’t get a fresh and clean instructions list from Qemu.org -hosts/w32- (it ain’t updated nor detailed as it should be 🙁 )… If anyone can lend a hand by a few tips, i’ll make a detailed walk through for begginers, in order to bring attention qemu for windows again (sure, binaries for windows exist; but they are generally built with common settings)…

    Common first brick in the wall for beginners:

    Libraries prerequisites: how and which libraries should be met/build/install in order to cross build with mingw in Linux (SDL, POSIX thread, GLIB, etc., etc.) prior to essential “configure/make/make install” of qemu…

        • I’m starting with http://wiki.qemu.org/Hosts/W32 , but i’m totally overwhelmed by (just a simple) SDL / PTHREADS compilation mingw32 in Debian Squeeze… it seems so simple just to cross-compile in linux for w32/w64 opposed to the native building alternative (which indeed kindly and detailed TC wrote for us to fit, although it seems much more difficult for a beginner to handle 🙁 !) according to that (official ?) wiki page…

          • I followed TC1988’s instructions and I’ve managed to get i386 and x86_64 built. I did look at the wiki but decided to try the Win32 method first.

          • Yeah… this night i´ll be on TC1988’s way… though i think it’s a pitty it can’t be (simple) cross compiled to win32 from linux… And I’m a little shocked for all the struggle he’d been just to get those binaries working….

  5. I’d just like to add that this is broken as far as the Cisco ASA Emulation is concerned. Mine works fine on Linux 1.6.0 but on W32 (running in W8/64) it crashes at the point where it tries to mount the virtual hard drive. I’ve spent a lot of time tweaking command-line and kernel parameters without any joy.

          • NB; Would you be so kind just to share the same version with tpm support built-in??? I’m stuck trying all the alternatives ranging from gcc (4.5, 4.6, 4.7), glib (built or not), mingw (32 or 64) just to get qemu working in windows 7 with tpm support in order to get a PoC working on… btw, my issues are gettext-3.0.13.1 build erros, GLIB 2.26.1 unstable with another gettex, (if you try gtk+ 2.16 in order to avoid GLIB building) qemu segmentation fault, and the qemu-coroutine-lock.c assertion too…arrrggghhhhh… getting a linux 3.8 running inside a Raspberry Pi isn’t that hard 😛

          • It builds OK for me with tpm.
            TPM device options:
            -tpmdev passthrough,id=id[,path=path][,cancel-path=path]
            use path to provide path to a character device; default is /dev/tpm0
            use cancel-path to provide path to TPM's cancel sysfs entry; if
            not provided it will be searched for in /sys/class/misc/tpm?/device

            Here is a link to the binaries.

          • Gosh… thank you in advance NB!!!!… this night i’m following these articles from screaming monkeys on my quest… 😛

            http://screamingmonkeys.blogspot.com.ar/2013/05/qemu-mingw-w64-working-at-last.html

            http://screamingmonkeys.blogspot.com.ar/2013/05/return-to-linux-compiling-qemu-with.html

            I’m fixated with the idea of not been able to get the building done… meanwhile I work on my PoC (on Win32) with your binaries, I’ll keep the fight… thank you, once more for your fast, kind and warm attention a LOT!!!!

        • Updated the above build. I found a serious memory leak =80 which I tracked down to me not setting the mingw environment variables. I’ve also added a README with the output of my configure script and a few other notes.

          • Even tough all the fight… can’t get it done… came to binaries build but they crashed… no reason to gdb if you guys are getting them straigh-out… something msys/mingw environment deploy? I install mingw as usual and MSYS-64 .zip is deployed in another directory with “postinstall.bat” recognizing cc.exe and mounting mingw partition… is that right???

  6. Just noticed that 1.6.1 was released 10 days ago. This has what appears to be a fix for the broken host-mode nat (-net user).
    e8601a4: w32: Fix access to host devices (regression) (Stefan Weil)

    I’ll have to try a build and see if it is fixed.

Leave a Reply