📄 qemu-doc.texi
字号:
@menu* QEMU PowerPC System emulator::* Sparc32 System emulator invocation::* Sparc64 System emulator invocation::* MIPS System emulator invocation::* ARM System emulator invocation::@end menu@node QEMU PowerPC System emulator@section QEMU PowerPC System emulatorUse the executable @file{qemu-system-ppc} to simulate a complete PREPor PowerMac PowerPC system.QEMU emulates the following PowerMac peripherals:@itemize @minus@item UniNorth PCI Bridge @itemPCI VGA compatible card with VESA Bochs Extensions@item 2 PMAC IDE interfaces with hard disk and CD-ROM support@item NE2000 PCI adapters@itemNon Volatile RAM@itemVIA-CUDA with ADB keyboard and mouse.@end itemizeQEMU emulates the following PREP peripherals:@itemize @minus@item PCI Bridge@itemPCI VGA compatible card with VESA Bochs Extensions@item 2 IDE interfaces with hard disk and CD-ROM support@itemFloppy disk@item NE2000 network adapters@itemSerial port@itemPREP Non Volatile RAM@itemPC compatible keyboard and mouse.@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 JavaStation(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.QEMU uses the Proll, a PROM replacement available at@url{http://people.redhat.com/@/zaitcev/linux/}. The requiredQEMU-specific patches are included with the sources.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.@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@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 Linux User space emulator @chapter QEMU Linux User space emulator @menu* Quick Start::* Wine launch::* Command line options::@end menu@node Quick Start@section 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@section 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@section 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 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 Tested tool versionsIn 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.@examplehost 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.@end example@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 + -