📄 qemu-doc.html
字号:
</DL><P>More information is available at<A HREF="http://perso.magic.fr/l_indien/qemu-ppc/">http://perso.magic.fr/l_indien/qemu-ppc/</A>.<H2><A NAME="SEC43" HREF="qemu-doc.html#TOC43">4.2 Sparc32 System emulator invocation</A></H2><P>Use the executable <TT>`qemu-system-sparc'</TT> to simulate a JavaStation(sun4m architecture). The emulation is somewhat complete.<P>QEMU emulates the following sun4m peripherals:<UL><LI>IOMMU<LI>TCX Frame buffer<LI>Lance (Am7990) Ethernet<LI>Non Volatile RAM M48T08<LI>Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboardand power/reset logic<LI>ESP SCSI controller with hard disk and CD-ROM support<LI>Floppy drive</UL><P>The number of peripherals is fixed in the architecture.<P>QEMU uses the Proll, a PROM replacement available at<A HREF="http://people.redhat.com/@/zaitcev/linux/">http://people.redhat.com/@/zaitcev/linux/</A>. The requiredQEMU-specific patches are included with the sources.<P>A sample Linux 2.6 series kernel and ram disk image are available onthe QEMU web site. Please note that currently neither Linux 2.4series, NetBSD, nor OpenBSD kernels work.<P>The following options are specific to the Sparc emulation:<DL COMPACT><DT><SAMP>`-g WxH'</SAMP><DD>Set the initial TCX graphic mode. The default is 1024x768.</DL><H2><A NAME="SEC44" HREF="qemu-doc.html#TOC44">4.3 Sparc64 System emulator invocation</A></H2><P>Use the executable <TT>`qemu-system-sparc64'</TT> to simulate a Sun4u machine.The emulator is not usable for anything yet.<P>QEMU emulates the following sun4u peripherals:<UL><LI>UltraSparc IIi APB PCI Bridge <LI>PCI VGA compatible card with VESA Bochs Extensions<LI>Non Volatile RAM M48T59<LI>PC-compatible serial ports</UL><H2><A NAME="SEC45" HREF="qemu-doc.html#TOC45">4.4 MIPS System emulator invocation</A></H2><P>Use the executable <TT>`qemu-system-mips'</TT> to simulate a MIPS machine.The emulator is able to boot a Linux kernel and to run a Linux Debianinstallation from NFS. The following devices are emulated:<UL><LI>MIPS R4K CPU<LI>PC style serial port<LI>NE2000 network card</UL><P>More information is available in the QEMU mailing-list archive.<H2><A NAME="SEC46" HREF="qemu-doc.html#TOC46">4.5 ARM System emulator invocation</A></H2><P>Use the executable <TT>`qemu-system-arm'</TT> to simulate a ARMmachine. The ARM Integrator/CP board is emulated with the followingdevices:<UL><LI>ARM926E or ARM1026E CPU<LI>Two PL011 UARTs<LI>SMC 91c111 Ethernet adapter</UL><P>A Linux 2.6 test image is available on the QEMU web site. Moreinformation is available in the QEMU mailing-list archive.<H1><A NAME="SEC47" HREF="qemu-doc.html#TOC47">5. QEMU Linux User space emulator</A></H1><H2><A NAME="SEC48" HREF="qemu-doc.html#TOC48">5.1 Quick Start</A></H2><P>In order to launch a Linux process, QEMU needs the process executableitself and all the target (x86) dynamic libraries used by it. <UL><LI>On x86, you can just try to launch any process by using the nativelibraries:<PRE>qemu-i386 -L / /bin/ls</PRE><CODE>-L /</CODE> tells that the x86 dynamic linker must be searched with a<TT>`/'</TT> prefix.<LI>Since QEMU is also a linux process, you can launch qemu with qemu (NOTE: you can only do that if you compiled QEMU from the sources):<PRE>qemu-i386 -L / qemu-i386 -L / /bin/ls</PRE><LI>On non x86 CPUs, you need first to download at least an x86 glibc(<TT>`qemu-runtime-i386-XXX-.tar.gz'</TT> on the QEMU web page). Ensure that<CODE>LD_LIBRARY_PATH</CODE> is not set:<PRE>unset LD_LIBRARY_PATH </PRE>Then you can launch the precompiled <TT>`ls'</TT> x86 executable:<PRE>qemu-i386 tests/i386/ls</PRE>You can look at <TT>`qemu-binfmt-conf.sh'</TT> so thatQEMU is automatically launched by the Linux kernel when you try tolaunch x86 executables. It requires the <CODE>binfmt_misc</CODE> module in theLinux kernel.<LI>The x86 version of QEMU is also included. You can try weird things such as:<PRE>qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \ /usr/local/qemu-i386/bin/ls-i386</PRE></UL><H2><A NAME="SEC49" HREF="qemu-doc.html#TOC49">5.2 Wine launch</A></H2><UL><LI>Ensure that you have a working QEMU with the x86 glibcdistribution (see previous section). In order to verify it, you must beable to do:<PRE>qemu-i386 /usr/local/qemu-i386/bin/ls-i386</PRE><LI>Download the binary x86 Wine install(<TT>`qemu-XXX-i386-wine.tar.gz'</TT> on the QEMU web page). <LI>Configure Wine on your account. Look at the provided script<TT>`/usr/local/qemu-i386/@/bin/wine-conf.sh'</TT>. Your previous<CODE>${HOME}/.wine</CODE> directory is saved to <CODE>${HOME}/.wine.org</CODE>.<LI>Then you can try the example <TT>`putty.exe'</TT>:<PRE>qemu-i386 /usr/local/qemu-i386/wine/bin/wine \ /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe</PRE></UL><H2><A NAME="SEC50" HREF="qemu-doc.html#TOC50">5.3 Command line options</A></H2><PRE>usage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]</PRE><DL COMPACT><DT><SAMP>`-h'</SAMP><DD>Print the help<DT><SAMP>`-L path'</SAMP><DD>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)<DT><SAMP>`-s size'</SAMP><DD>Set the x86 stack size in bytes (default=524288)</DL><P>Debug options:<DL COMPACT><DT><SAMP>`-d'</SAMP><DD>Activate log (logfile=/tmp/qemu.log)<DT><SAMP>`-p pagesize'</SAMP><DD>Act as if the host page size was 'pagesize' bytes</DL><H1><A NAME="SEC51" HREF="qemu-doc.html#TOC51">6. Compilation from the sources</A></H1><H2><A NAME="SEC52" HREF="qemu-doc.html#TOC52">6.1 Linux/Unix</A></H2><H3><A NAME="SEC53" HREF="qemu-doc.html#TOC53">6.1.1 Compilation</A></H3><P>First you must decompress the sources:<PRE>cd /tmptar zxvf qemu-x.y.z.tar.gzcd qemu-x.y.z</PRE><P>Then you configure QEMU and build it (usually no options are needed):<PRE>./configuremake</PRE><P>Then type as root user:<PRE>make install</PRE><P>to install QEMU in <TT>`/usr/local'</TT>.<H3><A NAME="SEC54" HREF="qemu-doc.html#TOC54">6.1.2 Tested tool versions</A></H3><P>In order to compile QEMU succesfully, it is very important that youhave the right tools. The most important one is gcc. I cannot guarantythat QEMU works if you do not use a tested gcc version. Look at'configure' and 'Makefile' if you want to make a different gccversion work.<PRE>host gcc binutils glibc linux distribution----------------------------------------------------------------------x86 3.2 2.13.2 2.1.3 2.4.18 2.96 2.11.93.0.2 2.2.5 2.4.18 Red Hat 7.3 3.2.2 2.13.90.0.18 2.3.2 2.4.20 Red Hat 9PowerPC 3.3 [4] 2.13.90.0.18 2.3.1 2.4.20briq 3.2Alpha 3.3 [1] 2.14.90.0.4 2.2.5 2.2.20 [2] Debian 3.0Sparc32 2.95.4 2.12.90.0.1 2.2.5 2.4.18 Debian 3.0ARM 2.95.4 2.12.90.0.1 2.2.5 2.4.9 [3] Debian 3.0[1] On Alpha, QEMU needs the gcc 'visibility' attribute only available for gcc version >= 3.3.[2] Linux >= 2.4.20 is necessary for precise exception support (untested).[3] 2.4.9-ac10-rmk2-np1-cerf2[4] gcc 2.95.x generates invalid code when using too many registervariables. You must use gcc 3.x on PowerPC.</PRE><H2><A NAME="SEC55" HREF="qemu-doc.html#TOC55">6.2 Windows</A></H2><UL><LI>Install the current versions of MSYS and MinGW from<A HREF="http://www.mingw.org/">http://www.mingw.org/</A>. You can find detailed installationinstructions in the download section and the FAQ.<LI>Downloadthe MinGW development library of SDL 1.2.x(<TT>`SDL-devel-1.2.x-@/mingw32.tar.gz'</TT>) from<A HREF="http://www.libsdl.org">http://www.libsdl.org</A>. Unpack it in a temporary place, andunpack the archive <TT>`i386-mingw32msvc.tar.gz'</TT> in the MinGW tooldirectory. Edit the <TT>`sdl-config'</TT> script so that it gives thecorrect SDL directory when invoked.<LI>Extract the current version of QEMU. <LI>Start the MSYS shell (file <TT>`msys.bat'</TT>).<LI>Change to the QEMU directory. Launch <TT>`./configure'</TT> and<TT>`make'</TT>. If you have problems using SDL, verify that<TT>`sdl-config'</TT> can be launched from the MSYS command line.<LI>You can install QEMU in <TT>`Program Files/Qemu'</TT> by typing<TT>`make install'</TT>. Don't forget to copy <TT>`SDL.dll'</TT> in<TT>`Program Files/Qemu'</TT>.</UL><H2><A NAME="SEC56" HREF="qemu-doc.html#TOC56">6.3 Cross compilation for Windows with Linux</A></H2><UL><LI>Install the MinGW cross compilation tools available at<A HREF="http://www.mingw.org/">http://www.mingw.org/</A>.<LI>Install the Win32 version of SDL (<A HREF="http://www.libsdl.org">http://www.libsdl.org</A>) byunpacking <TT>`i386-mingw32msvc.tar.gz'</TT>. Set up the PATH environmentvariable so that <TT>`i386-mingw32msvc-sdl-config'</TT> can be launched bythe QEMU configuration script.<LI>Configure QEMU for Windows cross compilation:<PRE>./configure --enable-mingw32</PRE>If necessary, you can change the cross-prefix according to the prefixchoosen for the MinGW tools with --cross-prefix. You can also use--prefix to set the Win32 install path.<LI>You can install QEMU in the installation directory by typing<TT>`make install'</TT>. Don't forget to copy <TT>`SDL.dll'</TT> in theinstallation directory. </UL><P>Note: Currently, Wine does not seem able to launchQEMU for Win32.<H2><A NAME="SEC57" HREF="qemu-doc.html#TOC57">6.4 Mac OS X</A></H2><P>The Mac OS X patches are not fully merged in QEMU, so you should lookat the QEMU mailing list archive to have all the necessaryinformation.<H1><A NAME="SEC58" HREF="qemu-doc.html#TOC58">7. Index</A></H1><P>Jump to:<P><P><HR><P>This document was generated on 3 May 2006 using<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A> 1.56k.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -