⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qemu-doc.texi

📁 qemu性能直逼VMware的仿真器QEMU 的模擬速度約為實機的 25%;約為 Bochs 的 60 倍。Plex86、User-Mode-Linux、VMware 和 Virtual PC 則比
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@end itemizeQEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at@url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}.@c man begin OPTIONSThe following options are specific to the PowerPC emulation:@table @option@item -g WxH[xDEPTH]  Set the initial VGA graphic mode. The default is 800x600x15.@end table@c man end More information is available at@url{http://perso.magic.fr/l_indien/qemu-ppc/}.@node Sparc32 System emulator invocation@section Sparc32 System emulator invocationUse the executable @file{qemu-system-sparc} to simulate a SparcStation 5(sun4m architecture). The emulation is somewhat complete.QEMU emulates the following sun4m peripherals:@itemize @minus@itemIOMMU@itemTCX Frame buffer@item Lance (Am7990) Ethernet@itemNon Volatile RAM M48T08@itemSlave I/O: timers, interrupt controllers, Zilog serial ports, keyboardand power/reset logic@itemESP SCSI controller with hard disk and CD-ROM support@itemFloppy drive@end itemizeThe number of peripherals is fixed in the architecture.Since version 0.8.2, QEMU uses OpenBIOS@url{http://www.openbios.org/}. OpenBIOS is a free (GPL v2) portablefirmware implementation. The goal is to implement a 100% IEEE1275-1994 (referred to as Open Firmware) compliant firmware.A sample Linux 2.6 series kernel and ram disk image are available onthe QEMU web site. Please note that currently NetBSD, OpenBSD orSolaris kernels don't work.@c man begin OPTIONSThe following options are specific to the Sparc emulation:@table @option@item -g WxHSet the initial TCX graphic mode. The default is 1024x768.@end table@c man end @node Sparc64 System emulator invocation@section Sparc64 System emulator invocationUse the executable @file{qemu-system-sparc64} to simulate a Sun4u machine.The emulator is not usable for anything yet.QEMU emulates the following sun4u peripherals:@itemize @minus@itemUltraSparc IIi APB PCI Bridge @itemPCI VGA compatible card with VESA Bochs Extensions@itemNon Volatile RAM M48T59@itemPC-compatible serial ports@end itemize@node MIPS System emulator invocation@section MIPS System emulator invocationUse the executable @file{qemu-system-mips} 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:@itemize @minus@item MIPS R4K CPU@itemPC style serial port@itemNE2000 network card@end itemizeMore information is available in the QEMU mailing-list archive.@node ARM System emulator invocation@section ARM System emulator invocationUse the executable @file{qemu-system-arm} to simulate a ARMmachine. The ARM Integrator/CP board is emulated with the followingdevices:@itemize @minus@itemARM926E or ARM1026E CPU@itemTwo PL011 UARTs@item SMC 91c111 Ethernet adapter@itemPL110 LCD controller@itemPL050 KMI with PS/2 keyboard and mouse.@end itemizeThe ARM Versatile baseboard is emulated with the following devices:@itemize @minus@itemARM926E CPU@itemPL190 Vectored Interrupt Controller@itemFour PL011 UARTs@item SMC 91c111 Ethernet adapter@itemPL110 LCD controller@itemPL050 KMI with PS/2 keyboard and mouse.@itemPCI host bridge.  Note the emulated PCI bridge only provides access toPCI memory space.  It does not provide access to PCI IO space.This means some devices (eg. ne2k_pci NIC) are not useable, and others(eg. rtl8139 NIC) are only useable when the guest drivers use the memorymapped control registers.@itemPCI OHCI USB controller.@itemLSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices.@end itemizeA Linux 2.6 test image is available on the QEMU web site. Moreinformation is available in the QEMU mailing-list archive.@node QEMU User space emulator @chapter QEMU User space emulator @menu* Supported Operating Systems ::* Linux User space emulator::* Mac OS X/Darwin User space emulator ::@end menu@node Supported Operating Systems@section Supported Operating SystemsThe following OS are supported in user space emulation:@itemize @minus@itemLinux (refered as qemu-linux-user)@itemMac OS X/Darwin (refered as qemu-darwin-user)@end itemize@node Linux User space emulator@section Linux User space emulator@menu* Quick Start::* Wine launch::* Command line options::* Other binaries::@end menu@node Quick Start@subsection Quick StartIn order to launch a Linux process, QEMU needs the process executableitself and all the target (x86) dynamic libraries used by it. @itemize@item On x86, you can just try to launch any process by using the nativelibraries:@example qemu-i386 -L / /bin/ls@end example@code{-L /} tells that the x86 dynamic linker must be searched with a@file{/} prefix.@item 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):@example qemu-i386 -L / qemu-i386 -L / /bin/ls@end example@item On non x86 CPUs, you need first to download at least an x86 glibc(@file{qemu-runtime-i386-XXX-.tar.gz} on the QEMU web page). Ensure that@code{LD_LIBRARY_PATH} is not set:@exampleunset LD_LIBRARY_PATH @end exampleThen you can launch the precompiled @file{ls} x86 executable:@exampleqemu-i386 tests/i386/ls@end exampleYou can look at @file{qemu-binfmt-conf.sh} so thatQEMU is automatically launched by the Linux kernel when you try tolaunch x86 executables. It requires the @code{binfmt_misc} module in theLinux kernel.@item The x86 version of QEMU is also included. You can try weird things such as:@exampleqemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \          /usr/local/qemu-i386/bin/ls-i386@end example@end itemize@node Wine launch@subsection Wine launch@itemize@item Ensure that you have a working QEMU with the x86 glibcdistribution (see previous section). In order to verify it, you must beable to do:@exampleqemu-i386 /usr/local/qemu-i386/bin/ls-i386@end example@item Download the binary x86 Wine install(@file{qemu-XXX-i386-wine.tar.gz} on the QEMU web page). @item Configure Wine on your account. Look at the provided script@file{/usr/local/qemu-i386/@/bin/wine-conf.sh}. Your previous@code{$@{HOME@}/.wine} directory is saved to @code{$@{HOME@}/.wine.org}.@item Then you can try the example @file{putty.exe}:@exampleqemu-i386 /usr/local/qemu-i386/wine/bin/wine \          /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe@end example@end itemize@node Command line options@subsection Command line options@exampleusage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]@end example@table @option@item -hPrint the help@item -L path   Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)@item -s sizeSet the x86 stack size in bytes (default=524288)@end tableDebug options:@table @option@item -dActivate log (logfile=/tmp/qemu.log)@item -p pagesizeAct as if the host page size was 'pagesize' bytes@end table@node Other binaries@subsection Other binaries@command{qemu-arm} is also capable of running ARM "Angel" semihosted ELFbinaries (as implemented by the arm-elf and arm-eabi Newlib/GDBconfigurations), and arm-uclinux bFLT format binaries.@command{qemu-m68k} is capable of running semihosted binaries using the BDM(m5xxx-ram-hosted.ld) or m68k-sim (sim.ld) syscall interfaces, andcoldfire uClinux bFLT format binaries.The binary format is detected automatically.@node Mac OS X/Darwin User space emulator@section Mac OS X/Darwin User space emulator@menu* Mac OS X/Darwin Status::* Mac OS X/Darwin Quick Start::* Mac OS X/Darwin Command line options::@end menu@node Mac OS X/Darwin Status@subsection Mac OS X/Darwin Status@itemize @minus@itemtarget x86 on x86: Most apps (Cocoa and Carbon too) works. [1]@itemtarget PowerPC on x86: Not working as the ppc commpage can't be mapped (yet!)@itemtarget x86 on x86: Most apps (Cocoa and Carbon too) works. [1]@itemtarget x86 on PowerPC: most utilities work. Cocoa and Carbon apps are not yet supported.@end itemize[1] If you're host commpage can be executed by qemu.@node Mac OS X/Darwin Quick Start@subsection Quick StartIn order to launch a Mac OS X/Darwin process, QEMU needs the process executableitself and all the target dynamic libraries used by it. If you don't have the FATlibraries (you're running Mac OS X/ppc) you'll need to obtain it from a Mac OS XCD or compile them by hand.@itemize@item On x86, you can just try to launch any process by using the nativelibraries:@example qemu-darwin-i386 /bin/ls@end exampleor to run the ppc version of the executable:@example qemu-darwin-ppc /bin/ls@end example@item On ppc, you'll have to tell qemu where your x86 libraries (and dynamic linker)are installed:@example qemu-darwin-i386 -L /opt/x86_root/ /bin/ls@end example@code{-L /opt/x86_root/} tells that the dynamic linker (dyld) path is in@file{/opt/x86_root/usr/bin/dyld}.@end itemize@node Mac OS X/Darwin Command line options@subsection Command line options@exampleusage: qemu-darwin-i386 [-h] [-d] [-L path] [-s size] program [arguments...]@end example@table @option@item -hPrint the help@item -L path   Set the library root path (default=/)@item -s sizeSet the stack size in bytes (default=524288)@end tableDebug options:@table @option@item -dActivate log (logfile=/tmp/qemu.log)@item -p pagesizeAct as if the host page size was 'pagesize' bytes@end table@node compilation@chapter Compilation from the sources@menu* Linux/Unix::* Windows::* Cross compilation for Windows with Linux::* Mac OS X::@end menu@node Linux/Unix@section Linux/Unix@subsection CompilationFirst you must decompress the sources:@examplecd /tmptar zxvf qemu-x.y.z.tar.gzcd qemu-x.y.z@end exampleThen you configure QEMU and build it (usually no options are needed):@example./configuremake@end exampleThen type as root user:@examplemake install@end exampleto install QEMU in @file{/usr/local}.@subsection GCC versionIn order to compile QEMU successfully, it is very important that youhave the right tools. The most important one is gcc. On most hosts andin particular on x86 ones, @emph{gcc 4.x is not supported}. If yourLinux distribution includes a gcc 4.x compiler, you can usuallyinstall an older version (it is invoked by @code{gcc32} or@code{gcc34}). The QEMU configure script automatically probes forthese older versions so that usally you don't have to do anything.@node Windows@section Windows@itemize@item Install the current versions of MSYS and MinGW from@url{http://www.mingw.org/}. You can find detailed installationinstructions in the download section and the FAQ.@item Download the MinGW development library of SDL 1.2.x(@file{SDL-devel-1.2.x-@/mingw32.tar.gz}) from@url{http://www.libsdl.org}. Unpack it in a temporary place, andunpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tooldirectory. Edit the @file{sdl-config} script so that it gives thecorrect SDL directory when invoked.@item Extract the current version of QEMU. @item Start the MSYS shell (file @file{msys.bat}).@item Change to the QEMU directory. Launch @file{./configure} and @file{make}.  If you have problems using SDL, verify that@file{sdl-config} can be launched from the MSYS command line.@item You can install QEMU in @file{Program Files/Qemu} by typing @file{make install}. Don't forget to copy @file{SDL.dll} in@file{Program Files/Qemu}.@end itemize@node Cross compilation for Windows with Linux@section Cross compilation for Windows with Linux@itemize@itemInstall the MinGW cross compilation tools available at@url{http://www.mingw.org/}.@item Install the Win32 version of SDL (@url{http://www.libsdl.org}) byunpacking @file{i386-mingw32msvc.tar.gz}. Set up the PATH environmentvariable so that @file{i386-mingw32msvc-sdl-config} can be launched bythe QEMU configuration script.@item Configure QEMU for Windows cross compilation:@example./configure --enable-mingw32@end exampleIf 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.@item You can install QEMU in the installation directory by typing @file{make install}. Don't forget to copy @file{SDL.dll} in theinstallation directory. @end itemizeNote: Currently, Wine does not seem able to launchQEMU for Win32.@node Mac OS X@section Mac OS XThe Mac OS X patches are not fully merged in QEMU, so you should lookat the QEMU mailing list archive to have all the necessaryinformation.@node Index@chapter Index@printindex cp@bye

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -