qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Fwd: My progress with compiling QEMU Native on W32 Win7 P


From: Paul Gydos
Subject: [Qemu-discuss] Fwd: My progress with compiling QEMU Native on W32 Win7 Pro.
Date: Tue, 16 Sep 2014 16:11:18 -0400


---------- Forwarded message ----------
From: Paul Gydos <address@hidden>
Date: Sun, Sep 14, 2014 at 5:57 AM
Subject: My progress with compiling QEMU Native on W32 Win7 Pro.
To: address@hidden


To: Peter Maydell (address@hidden)
From: Paul Gydos (address@hidden)

Subject: Next step in compiling QEMU on W32 Win7 Pro
have now installed GTK+ and MinGW

NATIVE BUILD OF QEMU ON W32 WIN7

LONG PREFACE

   You advised me earlier this month on the QEMU IRC chat. Your handle there was pm215 and mine was pj55 - I'm not usually on IRC chat nor do I normally do much of anything development wise, nor do I have extensive linux, qemu, or microsoft command line experience.

   My goal right now is to bundle a small QEMU with 4MLinux Core [which is basically just a very minimal linux - smaller than MicroCore/TinyCore linux - which is basically an up-to-date linux kernel an up-to-date busybox and an an up-to-date glibc. So it resembles an up-to-date embedded linux system but with the choice of glibc instead of uclibc as a C Library (perhaps chosen since the 4MLinux Core is purposed as an x86 core to several other 4MLinux flavors which have specific uses - but it seems like perhaps glibc is a good choice for a core that may be made for various expansion rather than an embedded linux system which may have just one purpose)]

    The bundle's purpose is to eventually also carry Python2 and Git so it should be a small up-to-date virtual computer to learn the "short stack" (as defined by Mike Levin) - A small download which will set up a virtual computer with a simple busybox based command line linux which is suitable for learning a basic text editor like vi, a programming language like Python2, and a distributed version control tool like git, and also for learning very basic userland linux commands like in the busybox toolset - and even perhaps a bit about C language subroutines and linux scripting using ash, I doubt I'll learn much about actual kernel system calls but I suppose that's possible too.

   I was able to prove my concept (well just the core 4MLinux on QEMU) by using QEMU Manager + 4MLinux Core in .iso form and a virtual CD-R (Virtual Clone Drive) and get it to work. But it is running as a virutal live-CD not a viirtual harddrive install, and I don't like the way QEMU functions inside QEMU Manager. 

   I want to do this QEMU plus 4MLinux bundle for Win7/8.1, for Ubuntu 14.04 LTS and perhaps finally also a Mac OS X operating system.

   For now I would be happy just getting QEMU to compile on WIn7 Pro on a W32 machine because it is important to this project that eventually this little learning bundle on every platform and as it stands I don't know anything about using QEMU. So I aught to have it compiled on the machine and OS that I'm currently on so I can study and use QEMU.

   I currently have access to a Acer Aspire One D250-1125 which is a Netbook using  Win7 Pro SP1 on a 32bit 1.6 GHz Intel Atom N270 with 2GB of RAM. 

FOLLOWING UP ON PETER MAYDELL ADVICE PART 1
NATIVE BUILD OF QEMU ON W32 WIN7 
UNINSTALL EVERYTHING PREVIOUSLY DONE

    I finally had time to follow up on your advice:  I uninstalled everything that I was using based on these instructions under Native Builds from this QEMU wiki help page:  http://wiki.qemu.org/Hosts/W32 - Your advice was that just because it worked 2 years ago doesn't mean it will work now. So I installed everything I was working on based on those instructions.

FOLLOWING UP ON PETER MAYDELL ADVICE PART 2
NATIVE BUILD OF QEMU ON W32 WIN7 
USE GTK+ FOR ALL THE MINGW DEPENDENCIES

I downloaded the all-in-one bundle from http://www.gtk.org/download/win32.php
called gtk+-bundle_3.6.4-20130921_win32

I read this tutorial http://www.gtk.org/download/win32_tutorial.php

1) extracted files to a new folder which I named C:\gtk

2) changed my path variable by adding:

  ;c:\gtk\bin

3) typed in at Command Prompt:

  pango-querymodules > gtk\etc\pango\pango.modules

  gdk-pixbuf-query-loaders > gtk\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache

  gtk-query-immodules-3.0 > gtk\lib\gtk-3.0\3.0.0\immodules.cache


4) tested by typing in terminal

  gtk3-demo

All seemed well!

FOLLOWING UP ON PETER MAYDELL ADVICE PART 3
NATIVE BUILD OF QEMU ON W32 WIN7 
USE THE 32 BIT VERSION OF MINGW-W64

So to try and implement Mingw-w64 32bit version
(http://mingw-w64.sourceforge.net/) instead of mingw32 (http://www.mingw.org/)

I'm using this tutorial  http://sourceforge.net/p/mingw-w64/wiki2/GeneralUsageInstructions/ under the headings "Installing the toolchain" and "Windows native"

1) I choose the "MinGW-builds" after reading under the headings "General Usage Instructions" and "Downloading the toolchain" from the same tutorial - it seemed like a good middle of the road choice.

2) I choose "32-bit target" under the MinGW-builds heading as it seems to most closely correspond to my current goal which take me to  http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/32-bit/

3) I choose the "threads-win32" folder as it seems to most closely correspond to my current goal.

4) A note saying: "toolchains using DWARF for exception handling are also available and faster than SJLJ but you shouldn't use them unless you're aware of their bugs and limitations." found at: http://mingw-w64.sourceforge.net/download.php#win-builds

had me looking carefully between the choice of the "dwarf" or "sjlj" folders

I found an explanation here:
http://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh

and so I choose "sjlj" as it seems to most closely correspond to my current goal 

5) From http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/32-bit/threads-win32/sjlj/ I downloaded my SJLJ error handling Windows 32bit version of Mingw-w64  dated:2013-04-20 and named:

"x32-4.8.0-release-win32-sjlj-rev2.7z"

6) Extracted using 7zip to c:\mingw32 I extract the file to a new folder called C:\mingw32 and actually have to Ctrl-A / Ctrl-C everything in the folder and copy to C:\mingw32 so that the executable I need is in C:\mingw32\bin I also delete the original folder c:\ming32\ming32 which I copied the file hierarchy from 7) Changed my path variable by adding: ;c:\mingw32\bin 4) From the Command Prompt: i686-w64-mingw32-gcc -v result:
Using built-in specs. COLLECT_GCC=i686-w64-mingw32-gcc COLLECT_LTO_WRAPPER=c:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.8.0/lto-w pper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --bu d=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot= emp/x32-480-win32-sjlj-r2/mingw32 --enable-shared --enable-static --enable-tar ts=all --enable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdc -time=yes --enable-threads=win32 --enable-libgomp --enable-lto --enable-graphi --enable-checking=release --enable-fully-dynamic-string --enable-version-spec ic-runtime-libs --enable-sjlj-exceptions --disable-isl-version-check --disable loog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable ootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werr --disable-symvers --with-gnu-as --with-gnu-ld --with-arch-32=i686 --with-arch 4=nocona --with-tune-32=generic --with-tune-64=core2 --with-host-libstdcxx='-s tic -lstdc++' --with-libiconv --with-system-zlib --with-gmp=/temp/mingw-prereq 686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq/i686-w64-mingw32-static with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static --with-isl=/temp/mingw-pre q/i686-w64-mingw32-static --with-cloog=/temp/mingw-prereq/i686-w64-mingw32-sta c --enable-cloog-backend=isl --with-pkgversion='rev2, Built by MinGW-builds pr ect' --with-bugurl=http://sourceforge.net/projects/mingwbuilds/ CFLAGS='-O2 -p e -I/temp/x32-480-win32-sjlj-r2/libs/include -I/temp/mingw-prereq/x32-zlib/inc de -I/temp/mingw-prereq/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe - temp/x32-480-win32-sjlj-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include /temp/mingw-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe - temp/x32-480-win32-sjlj-r2/libs/lib -L/temp/mingw-prereq/x32-zlib/lib -L/temp/ ngw-prereq/i686-w64-mingw32-static/lib -L/temp/x32-480-win32-sjlj-r2/mingw32/o /lib' Thread model: win32 gcc version 4.8.0 (rev2, Built by MinGW-builds project)

All seemed well!

SO NOW WHAT?

As you can see I have documented what I have done as best I can as a new user to the environments and software technologies I am using so that there is not much of anything assumed and all described as specifically as possible and reasonable considering these are personal notes and not a tutorial for others (at least as of yet)

Best I can tell I need to download a QEMU tar.bz2 
Can I use one of these? http://wiki.qemu.org/Download

Either
* qemu-2.1.1.tar.bz2
* qemu-2.0.2.tar.bz2

or do I need to get another version from github - and if I do need another version from github can I use git with my current setup or so I need to add git to it?

Can I decompress these inside my windows file hierarchy in C:\ ?
Can I do it within the Command Prompt System now that I have my path assigned as described in PART 2 and PART 3 

Should I drop these into a new folder C:\qemu ? Is that a bad strategy?

What would be the exact commands to expand these files considering the windows file hierarchy rather than a linux hierarchy or do I still have to get msys and run it in a linux hierarchy (prefer 1st option if possible)

Do I need to modify my path further for gcc to work from the Windows Command Prompt? What would I type exactly at the end of my current path?

How do I configure and make in this situation? (Considering the windows file hierarchy or again do I need to use msys? I prefer the first over the lattter option).

Am I already a root user? 

I'm hoping this can all be done from the Command Prompt instead of using msys but I'm open to anyone's instructions as long as they are current (Its September 14th 2014 when I wrote these notes.

Peter, I hope you might have further advice for this terrible noob. I'm going to also post what I have so far wherever I can figure out where to post it and get advice and email it to anyone who I think might give me an answer also. 

I'm also hoping to continue on this path rather than a whole other solution but I am willing to deviate again at the point of PART 3 if getting another 32 bit version of MinGW-W64? Actually I'm willing to follow any simple directions. I hope you see I have given it my own time and effort - It doesn't seem as though there are current documentation available for a newer native build on W32 right now so if someone can help me see it through to the end I will rewrite it yet futher and post to all relevant parties where current documentation aught to exist

Thank You,

Paul Gydos (address@hidden)
POB 73
Burlington, NC 27216
USA
Cell +1-336-350-4234
Perm Google VM +1-336-BUZZ-212
Social Media: http://fb.com/paulgydos
Google+: http://google.com/+paulgydos








reply via email to

[Prev in Thread] Current Thread [Next in Thread]