qemu-3.0.0
QUMU 官方介绍
ARM System emulator
1 3.5 ARM System emulator 2 3 Use the executable qemu-system-arm to simulate a ARM machine. The ARM Integrator/CP board is emulated with the following devices: 4 5 - ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU 6 - Two PL011 UARTs 7 - SMC 91c111 Ethernet adapter 8 - PL110 LCD controller 9 - PL050 KMI with PS/2 keyboard and mouse. 10 - PL181 MultiMedia Card Interface with SD card. 11 12 The ARM Versatile baseboard is emulated with the following devices: 13 14 - ARM926E, ARM1136 or Cortex-A8 CPU 15 - PL190 Vectored Interrupt Controller 16 - Four PL011 UARTs 17 - SMC 91c111 Ethernet adapter 18 - PL110 LCD controller 19 - PL050 KMI with PS/2 keyboard and mouse. 20 - PCI host bridge. Note the emulated PCI bridge only provides access to PCI memory space. It does not provide access to PCI IO space. This means some devices (eg. ne2k_pci NIC) are not usable, and others (eg. rtl8139 NIC) are only usable when the guest drivers use the memory mapped control registers. 21 - PCI OHCI USB controller. 22 - LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices. 23 - PL181 MultiMedia Card Interface with SD card. 24 25 Several variants of the ARM RealView baseboard are emulated, including the EB, PB-A8 and PBX-A9. Due to interactions with the bootloader, only certain Linux kernel configurations work out of the box on these boards. 26 27 Kernels for the PB-A8 board should have CONFIG_REALVIEW_HIGH_PHYS_OFFSET enabled in the kernel, and expect 512M RAM. Kernels for The PBX-A9 board should have CONFIG_SPARSEMEM enabled, CONFIG_REALVIEW_HIGH_PHYS_OFFSET disabled and expect 1024M RAM. 28 29 The following devices are emulated: 30 31 - ARM926E, ARM1136, ARM11MPCore, Cortex-A8 or Cortex-A9 MPCore CPU 32 - ARM AMBA Generic/Distributed Interrupt Controller 33 - Four PL011 UARTs 34 - SMC 91c111 or SMSC LAN9118 Ethernet adapter 35 - PL110 LCD controller 36 - PL050 KMI with PS/2 keyboard and mouse 37 - PCI host bridge 38 - PCI OHCI USB controller 39 - LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices 40 - PL181 MultiMedia Card Interface with SD card.
ARM emulation
1 A.1.2 ARM emulation 2 3 Full ARM 7 user emulation. 4 NWFPE FPU support included in user Linux emulation. 5 Can run most ARM Linux binaries.
configure
1 --prefix=/home/sun/18.04-install/qemu-3.0.0 --target-list="arm-softmmu arm-linux-user aarch64-softmmu aarch64-linux-user" --enable-libssh2 --enable-system --enable-user --enable-linux-user --enable-docs --enable-pie --enable-modules --enable-kvm --enable-libnfs --enable-gprof --enable-profiler --audio-drv-list="oss alsa"
错误1
提示没有ALSA库,编译安装最新ALSA库
错误2
1 ERROR: User requested feature docs 2 configure was not able to find it. 3 Install texinfo and Perl/perl-podlators 4 5 安装 texinfo and Perl
错误3
1 ERROR: User requested feature libnfs 2 configure was not able to find it. 3 Install libnfs devel >= 1.9.3
1 $ sudo apt install libnfs-dev
错误4
1 ERROR: libssh2 >= 1.2.8 required for --enable-libssh2
sudo apt install libssh2-1-dev
最终配置结果:
1 sun@machine:~/share/build/qemu-3.0.0$ time ./configure --prefix=/home/sun/18.04-install/qemu-3.0.0 --target-list="arm-softmmu arm-linux-user aarch64-softmmu aarch64-linux-user" --enable-libssh2 --enable-system --enable-user --enable-linux-user --enable-docs --enable-pie --enable-modules --enable-kvm --enable-libnfs --enable-gprof --enable-profiler --audio-drv-list="oss alsa" 2 Install prefix /home/sun/18.04-install/qemu-3.0.0 3 BIOS directory /home/sun/18.04-install/qemu-3.0.0/share/qemu 4 firmware path /home/sun/18.04-install/qemu-3.0.0/share/qemu-firmware 5 binary directory /home/sun/18.04-install/qemu-3.0.0/bin 6 library directory /home/sun/18.04-install/qemu-3.0.0/lib 7 module directory /home/sun/18.04-install/qemu-3.0.0/lib/qemu 8 libexec directory /home/sun/18.04-install/qemu-3.0.0/libexec 9 include directory /home/sun/18.04-install/qemu-3.0.0/include 10 config directory /home/sun/18.04-install/qemu-3.0.0/etc 11 local state directory /home/sun/18.04-install/qemu-3.0.0/var 12 Manual directory /home/sun/18.04-install/qemu-3.0.0/share/man 13 ELF interp prefix /usr/gnemul/qemu-%M 14 Source path /home/sun/share/build/qemu-3.0.0 15 GIT binary git 16 GIT submodules 17 C compiler cc 18 Host C compiler cc 19 C++ compiler c++ 20 Objective-C compiler cc 21 ARFLAGS rv 22 CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 23 QEMU_CFLAGS -I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I$(SRC_PATH)/capstone/include 24 LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 25 QEMU_LDFLAGS -L$(BUILD_DIR)/dtc/libfdt 26 make make 27 install install 28 python python -B 29 smbd /usr/sbin/smbd 30 module support yes 31 host CPU x86_64 32 host big endian no 33 target list arm-softmmu arm-linux-user aarch64-softmmu aarch64-linux-user 34 gprof enabled yes 35 sparse enabled no 36 strip binaries yes 37 profiler yes 38 static build no 39 SDL support no 40 GTK support no 41 GTK GL support no 42 VTE support no 43 TLS priority NORMAL 44 GNUTLS support no 45 GNUTLS rnd no 46 libgcrypt yes 47 libgcrypt kdf yes 48 nettle no 49 nettle kdf no 50 libtasn1 no 51 curses support no 52 virgl support no 53 curl support no 54 mingw32 support no 55 Audio drivers oss alsa 56 Block whitelist (rw) 57 Block whitelist (ro) 58 VirtFS support no 59 Multipath support no 60 VNC support yes 61 VNC SASL support no 62 VNC JPEG support no 63 VNC PNG support no 64 xen support no 65 brlapi support no 66 bluez support no 67 Documentation yes 68 PIE yes 69 vde support no 70 netmap support no 71 Linux AIO support no 72 ATTR/XATTR support yes 73 Install blobs yes 74 KVM support yes 75 HAX support no 76 HVF support no 77 WHPX support no 78 TCG support yes 79 TCG debug enabled no 80 TCG interpreter no 81 malloc trim support yes 82 RDMA support no 83 fdt support git 84 membarrier no 85 preadv support yes 86 fdatasync yes 87 madvise yes 88 posix_madvise yes 89 posix_memalign yes 90 libcap-ng support no 91 vhost-net support yes 92 vhost-crypto support yes 93 vhost-scsi support yes 94 vhost-vsock support yes 95 vhost-user support yes 96 Trace backends log 97 spice support no 98 rbd support no 99 xfsctl support no 100 smartcard support no 101 libusb no 102 usb net redir no 103 OpenGL support no 104 OpenGL dmabufs no 105 libiscsi support no 106 libnfs support yes 107 build guest agent yes 108 QGA VSS support no 109 QGA w32 disk info no 110 QGA MSI support no 111 seccomp support no 112 coroutine backend ucontext 113 coroutine pool yes 114 debug stack usage no 115 mutex debugging no 116 crypto afalg no 117 GlusterFS support no 118 gcov gcov 119 gcov enabled no 120 TPM support yes 121 libssh2 support yes 122 TPM passthrough yes 123 TPM emulator yes 124 QOM debugging yes 125 Live block migration yes 126 lzo support no 127 snappy support no 128 bzip2 support yes 129 NUMA host support no 130 libxml2 no 131 tcmalloc support no 132 jemalloc support no 133 avx2 optimization yes 134 replication support yes 135 VxHS block device no 136 capstone internal 137 docker no 138 139 编译: 140 141 sun@machine:~/share/build/qemu-3.0.0$ time make -j4 142 real 6m6.194s 143 user 20m16.608s 144 sys 3m0.529s
编译后的帮助信息:
sun@machine:~/18.04-install/qemu-3.0.0/bin$ ./qemu-system-arm --help
1 QEMU emulator version 3.0.0 2 Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers 3 usage: qemu-system-arm [options] [disk_image] 4 5 'disk_image' is a raw hard disk image for IDE hard disk 0 6 7 Standard options: 8 -h or -help display this help and exit 9 -version display version information and exit 10 -machine [type=]name[,prop[=value][,...]] 11 selects emulated machine ('-machine help' for list) 12 property accel=accel1[:accel2[:...]] selects accelerator 13 supported accelerators are kvm, xen, hax, hvf, whpx or tcg (default: tcg) 14 kernel_irqchip=on|off|split controls accelerated irqchip support (default=off) 15 vmport=on|off|auto controls emulation of vmport (default: auto) 16 kvm_shadow_mem=size of KVM shadow MMU in bytes 17 dump-guest-core=on|off include guest memory in a core dump (default=on) 18 mem-merge=on|off controls memory merge support (default: on) 19 igd-passthru=on|off controls IGD GFX passthrough support (default=off) 20 aes-key-wrap=on|off controls support for AES key wrapping (default=on) 21 dea-key-wrap=on|off controls support for DEA key wrapping (default=on) 22 suppress-vmdesc=on|off disables self-describing migration (default=off) 23 nvdimm=on|off controls NVDIMM support (default=off) 24 enforce-config-section=on|off enforce configuration section migration (default=off) 25 s390-squash-mcss=on|off (deprecated) controls support for squashing into default css (default=off) 26 memory-encryption=@var{} memory encryption object to use (default=none) 27 -cpu cpu select CPU ('-cpu help' for list) 28 -accel [accel=]accelerator[,thread=single|multi] 29 select accelerator (kvm, xen, hax, hvf, whpx or tcg; use 'help' for a list) 30 thread=single|multi (enable multi-threaded TCG) 31 -smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets] 32 set the number of CPUs to 'n' [default=1] 33 maxcpus= maximum number of total cpus, including 34 offline CPUs for hotplug, etc 35 cores= number of CPU cores on one socket 36 threads= number of threads on one CPU core 37 sockets= number of discrete sockets in the system 38 -numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node] 39 -numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node] 40 -numa dist,src=source,dst=destination,val=distance 41 -numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z] 42 -add-fd fd=fd,set=set[,opaque=opaque] 43 Add 'fd' to fd 'set' 44 -set group.id.arg=value 45 set <arg> parameter for item <id> of type <group> 46 i.e. -set drive.$id.file=/path/to/image 47 -global driver.property=value 48 -global driver=driver,property=property,value=value 49 set a global default for a driver property 50 -boot [order=drives][,once=drives][,menu=on|off] 51 [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off] 52 'drives': floppy (a), hard disk (c), CD-ROM (d), network (n) 53 'sp_name': the file's name that would be passed to bios as logo picture, if menu=on 54 'sp_time': the period that splash picture last if menu=on, unit is ms 55 'rb_timeout': the timeout before guest reboot when boot failed, unit is ms 56 -m [size=]megs[,slots=n,maxmem=size] 57 configure guest RAM 58 size: initial amount of guest memory 59 slots: number of hotplug slots (default: none) 60 maxmem: maximum amount of guest memory (default: none) 61 NOTE: Some architectures might enforce a specific granularity 62 -mem-path FILE provide backing storage for guest RAM 63 -mem-prealloc preallocate guest memory (use with -mem-path) 64 -k language use keyboard layout (for example 'fr' for French) 65 -audio-help print list of audio drivers and their options 66 -soundhw c1,... enable audio support 67 and only specified sound cards (comma separated list) 68 use '-soundhw help' to get the list of supported cards 69 use '-soundhw all' to enable all of them 70 -balloon virtio[,addr=str] 71 enable virtio balloon device (deprecated) 72 -device driver[,prop[=value][,...]] 73 add device (based on driver) 74 prop=value,... sets driver properties 75 use '-device help' to print all possible drivers 76 use '-device driver,help' to print all possible properties 77 -name string1[,process=string2][,debug-threads=on|off] 78 set the name of the guest 79 string1 sets the window title and string2 the process name (on Linux) 80 When debug-threads is enabled, individual threads are given a separate name (on Linux) 81 NOTE: The thread names are for debugging and not a stable API. 82 -uuid %08x-%04x-%04x-%04x-%012x 83 specify machine UUID 84 85 Block device options: 86 -fda/-fdb file use 'file' as floppy disk 0/1 image 87 -hda/-hdb file use 'file' as IDE hard disk 0/1 image 88 -hdc/-hdd file use 'file' as IDE hard disk 2/3 image 89 -cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) 90 -blockdev [driver=]driver[,node-name=N][,discard=ignore|unmap] 91 [,cache.direct=on|off][,cache.no-flush=on|off] 92 [,read-only=on|off][,detect-zeroes=on|off|unmap] 93 [,driver specific parameters...] 94 configure a block backend 95 -drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] 96 [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] 97 [,cache=writethrough|writeback|none|directsync|unsafe][,format=f] 98 [,serial=s][,addr=A][,rerror=ignore|stop|report] 99 [,werror=ignore|stop|report|enospc][,id=name][,aio=threads|native] 100 [,readonly=on|off][,copy-on-read=on|off] 101 [,discard=ignore|unmap][,detect-zeroes=on|off|unmap] 102 [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]] 103 [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]] 104 [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]] 105 [[,iops_max=im]|[[,iops_rd_max=irm][,iops_wr_max=iwm]]] 106 [[,iops_size=is]] 107 [[,group=g]] 108 use 'file' as a drive image 109 -mtdblock file use 'file' as on-board Flash memory image 110 -sd file use 'file' as SecureDigital card image 111 -pflash file use 'file' as a parallel flash image 112 -snapshot write to temporary files instead of disk image files 113 -fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}] 114 [,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode] 115 [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]] 116 [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]] 117 [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]] 118 [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]] 119 [[,throttling.iops-size=is]] 120 -virtfs local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none] 121 [,id=id][,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode] 122 -virtfs_synth Create synthetic file system image 123 -iscsi [user=user][,password=password] 124 [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE 125 [,initiator-name=initiator-iqn][,id=target-iqn] 126 [,timeout=timeout] 127 iSCSI session parameters 128 129 USB options: 130 -usb enable the USB driver (if it is not used by default yet) 131 -usbdevice name add the host or guest USB device 'name' 132 133 Display options: 134 -display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off] 135 [,window_close=on|off][,gl=on|core|es|off] 136 -display gtk[,grab_on_hover=on|off][,gl=on|off]| 137 -display vnc=<display>[,<optargs>] 138 -display curses 139 -display none select display type 140 The default display is equivalent to 141 "-vnc localhost:0,to=99,id=default" 142 -nographic disable graphical output and redirect serial I/Os to console 143 -curses shorthand for -display curses 144 -no-frame open SDL window without a frame and window decorations 145 -alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) 146 -ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt) 147 -no-quit disable SDL window close capability 148 -sdl shorthand for -display sdl 149 -spice [port=port][,tls-port=secured-port][,x509-dir=<dir>] 150 [,x509-key-file=<file>][,x509-key-password=<file>] 151 [,x509-cert-file=<file>][,x509-cacert-file=<file>] 152 [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6|unix] 153 [,tls-ciphers=<list>] 154 [,tls-channel=[main|display|cursor|inputs|record|playback]] 155 [,plaintext-channel=[main|display|cursor|inputs|record|playback]] 156 [,sasl][,password=<secret>][,disable-ticketing] 157 [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]] 158 [,jpeg-wan-compression=[auto|never|always]] 159 [,zlib-glz-wan-compression=[auto|never|always]] 160 [,streaming-video=[off|all|filter]][,disable-copy-paste] 161 [,disable-agent-file-xfer][,agent-mouse=[on|off]] 162 [,playback-compression=[on|off]][,seamless-migration=[on|off]] 163 [,gl=[on|off]][,rendernode=<file>] 164 enable spice 165 at least one of {port, tls-port} is mandatory 166 -portrait rotate graphical output 90 deg left (only PXA LCD) 167 -rotate <deg> rotate graphical output some deg left (only PXA LCD) 168 -vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none] 169 select video card type 170 -full-screen start in full screen 171 -vnc <display> shorthand for -display vnc=<display> 172 -no-acpi disable ACPI 173 -smbios file=binary 174 load SMBIOS entry from binary file 175 -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] 176 [,uefi=on|off] 177 specify SMBIOS type 0 fields 178 -smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] 179 [,uuid=uuid][,sku=str][,family=str] 180 specify SMBIOS type 1 fields 181 -smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str] 182 [,asset=str][,location=str] 183 specify SMBIOS type 2 fields 184 -smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str] 185 [,sku=str] 186 specify SMBIOS type 3 fields 187 -smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str] 188 [,asset=str][,part=str] 189 specify SMBIOS type 4 fields 190 -smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str] 191 [,asset=str][,part=str][,speed=%d] 192 specify SMBIOS type 17 fields 193 194 Network options: 195 -netdev user,id=str[,ipv4[=on|off]][,net=addr[/mask]][,host=addr] 196 [,ipv6[=on|off]][,ipv6-net=addr[/int]][,ipv6-host=addr] 197 [,restrict=on|off][,hostname=host][,dhcpstart=addr] 198 [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,domainname=domain] 199 [,tftp=dir][,bootfile=f][,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]] 200 configure a user mode network backend with ID 'str', 201 its DHCP server and optional services 202 -netdev tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile] 203 [,br=bridge][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off] 204 [,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n] 205 [,poll-us=n] 206 configure a host TAP network backend with ID 'str' 207 connected to a bridge (default=br0) 208 use network scripts 'file' (default=/etc/qemu-ifup) 209 to configure it and 'dfile' (default=/etc/qemu-ifdown) 210 to deconfigure it 211 use '[down]script=no' to disable script execution 212 use network helper 'helper' (default=/home/sun/18.04-install/qemu-3.0.0/libexec/qemu-bridge-helper) to 213 configure it 214 use 'fd=h' to connect to an already opened TAP interface 215 use 'fds=x:y:...:z' to connect to already opened multiqueue capable TAP interfaces 216 use 'sndbuf=nbytes' to limit the size of the send buffer (the 217 default is disabled 'sndbuf=0' to enable flow control set 'sndbuf=1048576') 218 use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag 219 use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition 220 use vhost=on to enable experimental in kernel accelerator 221 (only has effect for virtio guests which use MSIX) 222 use vhostforce=on to force vhost on for non-MSIX virtio guests 223 use 'vhostfd=h' to connect to an already opened vhost net device 224 use 'vhostfds=x:y:...:z to connect to multiple already opened vhost net devices 225 use 'queues=n' to specify the number of queues to be created for multiqueue TAP 226 use 'poll-us=n' to speciy the maximum number of microseconds that could be 227 spent on busy polling for vhost net 228 -netdev bridge,id=str[,br=bridge][,helper=helper] 229 configure a host TAP network backend with ID 'str' that is 230 connected to a bridge (default=br0) 231 using the program 'helper (default=/home/sun/18.04-install/qemu-3.0.0/libexec/qemu-bridge-helper) 232 -netdev l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport] 233 [,rxsession=rxsession],txsession=txsession[,ipv6=on/off][,udp=on/off] 234 [,cookie64=on/off][,counter][,pincounter][,txcookie=txcookie] 235 [,rxcookie=rxcookie][,offset=offset] 236 configure a network backend with ID 'str' connected to 237 an Ethernet over L2TPv3 pseudowire. 238 Linux kernel 3.3+ as well as most routers can talk 239 L2TPv3. This transport allows connecting a VM to a VM, 240 VM to a router and even VM to Host. It is a nearly-universal 241 standard (RFC3391). Note - this implementation uses static 242 pre-configured tunnels (same as the Linux kernel). 243 use 'src=' to specify source address 244 use 'dst=' to specify destination address 245 use 'udp=on' to specify udp encapsulation 246 use 'srcport=' to specify source udp port 247 use 'dstport=' to specify destination udp port 248 use 'ipv6=on' to force v6 249 L2TPv3 uses cookies to prevent misconfiguration as 250 well as a weak security measure 251 use 'rxcookie=0x012345678' to specify a rxcookie 252 use 'txcookie=0x012345678' to specify a txcookie 253 use 'cookie64=on' to set cookie size to 64 bit, otherwise 32 254 use 'counter=off' to force a 'cut-down' L2TPv3 with no counter 255 use 'pincounter=on' to work around broken counter handling in peer 256 use 'offset=X' to add an extra offset between header and data 257 -netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port] 258 configure a network backend to connect to another network 259 using a socket connection 260 -netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]] 261 configure a network backend to connect to a multicast maddr and port 262 use 'localaddr=addr' to specify the host address to send packets from 263 -netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port] 264 configure a network backend to connect to another network 265 using an UDP tunnel 266 -netdev vhost-user,id=str,chardev=dev[,vhostforce=on|off] 267 configure a vhost-user network, backed by a chardev 'dev' 268 -netdev hubport,id=str,hubid=n[,netdev=nd] 269 configure a hub port on the hub with ID 'n' 270 -nic [tap|bridge|user|l2tpv3|vhost-user|socket][,option][,...][mac=macaddr] 271 initialize an on-board / default host NIC (using MAC address 272 macaddr) and connect it to the given host network backend 273 -nic none use it alone to have zero network devices (the default is to 274 provided a 'user' network connection) 275 -net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v] 276 configure or create an on-board (or machine default) NIC and 277 connect it to hub 0 (please use -nic unless you need a hub) 278 -net [user|tap|bridge|socket][,option][,option][,...] 279 old way to initialize a host network interface 280 (use the -netdev option if possible instead) 281 282 Character device options: 283 -chardev help 284 -chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] 285 -chardev socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay][,reconnect=seconds] 286 [,server][,nowait][,telnet][,reconnect=seconds][,mux=on|off] 287 [,logfile=PATH][,logappend=on|off][,tls-creds=ID] (tcp) 288 -chardev socket,id=id,path=path[,server][,nowait][,telnet][,reconnect=seconds] 289 [,mux=on|off][,logfile=PATH][,logappend=on|off] (unix) 290 -chardev udp,id=id[,host=host],port=port[,localaddr=localaddr] 291 [,localport=localport][,ipv4][,ipv6][,mux=on|off] 292 [,logfile=PATH][,logappend=on|off] 293 -chardev msmouse,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] 294 -chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]] 295 [,mux=on|off][,logfile=PATH][,logappend=on|off] 296 -chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off] 297 -chardev file,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 298 -chardev pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 299 -chardev pty,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] 300 -chardev stdio,id=id[,mux=on|off][,signal=on|off][,logfile=PATH][,logappend=on|off] 301 -chardev serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 302 -chardev tty,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 303 -chardev parallel,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 304 -chardev parport,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] 305 306 Bluetooth(R) options: 307 -bt hci,null dumb bluetooth HCI - doesn't respond to commands 308 -bt hci,host[:id] 309 use host's HCI with the given name 310 -bt hci[,vlan=n] 311 emulate a standard HCI in virtual scatternet 'n' 312 -bt vhci[,vlan=n] 313 add host computer to virtual scatternet 'n' using VHCI 314 -bt device:dev[,vlan=n] 315 emulate a bluetooth device 'dev' in scatternet 'n' 316 317 TPM device options: 318 -tpmdev passthrough,id=id[,path=path][,cancel-path=path] 319 use path to provide path to a character device; default is /dev/tpm0 320 use cancel-path to provide path to TPM's cancel sysfs entry; if 321 not provided it will be searched for in /sys/class/misc/tpm?/device 322 -tpmdev emulator,id=id,chardev=dev 323 configure the TPM device using chardev backend 324 325 Linux/Multiboot boot specific: 326 -kernel bzImage use 'bzImage' as kernel image 327 -append cmdline use 'cmdline' as kernel command line 328 -initrd file use 'file' as initial ram disk 329 -dtb file use 'file' as device tree image 330 331 Debug/Expert options: 332 -fw_cfg [name=]<name>,file=<file> 333 add named fw_cfg entry with contents from file 334 -fw_cfg [name=]<name>,string=<str> 335 add named fw_cfg entry with contents from string 336 -serial dev redirect the serial port to char device 'dev' 337 -parallel dev redirect the parallel port to char device 'dev' 338 -monitor dev redirect the monitor to char device 'dev' 339 -qmp dev like -monitor but opens in 'control' mode 340 -qmp-pretty dev like -qmp but uses pretty JSON formatting 341 -mon [chardev=]name[,mode=readline|control][,pretty[=on|off]] 342 -debugcon dev redirect the debug console to char device 'dev' 343 -pidfile file write PID to 'file' 344 -singlestep always run in singlestep mode 345 --preconfig pause QEMU before machine is initialized (experimental) 346 -S freeze CPU at startup (use 'c' to start execution) 347 -realtime [mlock=on|off] 348 run qemu with realtime features 349 mlock=on|off controls mlock support (default: on) 350 -overcommit [mem-lock=on|off][cpu-pm=on|off] 351 run qemu with overcommit hints 352 mem-lock=on|off controls memory lock support (default: off) 353 cpu-pm=on|off controls cpu power management (default: off) 354 -gdb dev wait for gdb connection on 'dev' 355 -s shorthand for -gdb tcp::1234 356 -d item1,... enable logging of specified items (use '-d help' for a list of log items) 357 -D logfile output log to logfile (default stderr) 358 -dfilter range,.. filter debug output to range of addresses (useful for -d cpu,exec,etc..) 359 -L path set the directory for the BIOS, VGA BIOS and keymaps 360 -bios file set the filename for the BIOS 361 -enable-kvm enable KVM full virtualization support 362 -xen-domid id specify xen guest domain id 363 -xen-create create domain using xen hypercalls, bypassing xend 364 warning: should not be used when xend is in use 365 -xen-attach attach to existing xen domain 366 xend will use this when starting QEMU 367 -xen-domid-restrict restrict set of available xen operations 368 to specified domain id. (Does not affect 369 xenpv machine type). 370 -no-reboot exit instead of rebooting 371 -no-shutdown stop before shutdown 372 -loadvm [tag|id] 373 start right away with a saved state (loadvm in monitor) 374 -daemonize daemonize QEMU after initializing 375 -option-rom rom load a file, rom, into the option ROM space 376 -rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew] 377 set the RTC base and clock, enable drift fix for clock ticks (x86 only) 378 -icount [shift=N|auto][,align=on|off][,sleep=on|off,rr=record|replay,rrfile=<filename>,rrsnapshot=<snapshot>] 379 enable virtual instruction counter with 2^N clock ticks per 380 instruction, enable aligning the host and virtual clocks 381 or disable real time cpu sleeping 382 -watchdog model 383 enable virtual hardware watchdog [default=none] 384 -watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none 385 action when watchdog fires [default=reset] 386 -echr chr set terminal escape character instead of ctrl-a 387 -virtioconsole c 388 set virtio console 389 -show-cursor show cursor 390 -tb-size n set TB size 391 -incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6] 392 -incoming rdma:host:port[,ipv4][,ipv6] 393 -incoming unix:socketpath 394 prepare for incoming migration, listen on 395 specified protocol and socket address 396 -incoming fd:fd 397 -incoming exec:cmdline 398 accept incoming migration on given file descriptor 399 or from given external command 400 -incoming defer 401 wait for the URI to be specified via migrate_incoming 402 -only-migratable allow only migratable devices 403 -nodefaults don't create default devices 404 -chroot dir chroot to dir just before starting the VM 405 -runas user change to user id user just before starting the VM 406 user can be numeric uid:gid instead 407 -semihosting semihosting mode 408 -semihosting-config [enable=on|off][,target=native|gdb|auto][,arg=str[,...]] 409 semihosting configuration 410 -old-param old param mode 411 -sandbox on[,obsolete=allow|deny][,elevateprivileges=allow|deny|children] 412 [,spawn=allow|deny][,resourcecontrol=allow|deny] 413 Enable seccomp mode 2 system call filter (default 'off'). 414 use 'obsolete' to allow obsolete system calls that are provided 415 by the kernel, but typically no longer used by modern 416 C library implementations. 417 use 'elevateprivileges' to allow or deny QEMU process to elevate 418 its privileges by blacklisting all set*uid|gid system calls. 419 The value 'children' will deny set*uid|gid system calls for 420 main QEMU process but will allow forks and execves to run unprivileged 421 use 'spawn' to avoid QEMU to spawn new threads or processes by 422 blacklisting *fork and execve 423 use 'resourcecontrol' to disable process affinity and schedular priority 424 -readconfig <file> 425 -writeconfig <file> 426 read/write config file 427 -no-user-config 428 do not load default user-provided config files at startup 429 -trace [[enable=]<pattern>][,events=<file>][,file=<file>] 430 specify tracing options 431 -enable-fips enable FIPS 140-2 compliance 432 -msg timestamp[=on|off] 433 change the format of messages 434 on|off controls leading timestamps (default:on) 435 -dump-vmstate <file> 436 Output vmstate information in JSON format to file. 437 Use the scripts/vmstate-static-checker.py file to 438 check for possible regressions in migration code 439 by comparing two such vmstate dumps. 440 441 Generic object creation: 442 -object TYPENAME[,PROP1=VALUE1,...] 443 create a new object of type TYPENAME setting properties 444 in the order they are specified. Note that the 'id' 445 property must be set. These objects are placed in the 446 '/objects' path. 447 448 During emulation, the following keys are useful: 449 ctrl-alt-f toggle full screen 450 ctrl-alt-n switch to virtual console 'n' 451 ctrl-alt toggle mouse and keyboard grab 452 453 When using -nographic, press 'ctrl-a h' to get some help. 454 455 See <https://qemu.org/contribute/report-a-bug> for how to report bugs. 456 More information on the QEMU project at <https://qemu.org>. 457 sun@machine:~/18.04-install/qemu-3.0.0/bin$
支持的机型:
sun@machine:~/18.04-install/qemu-3.0.0/bin$ ./qemu-system-arm -machine help
1 Supported machines are: 2 akita Sharp SL-C1000 (Akita) PDA (PXA270) 3 ast2500-evb Aspeed AST2500 EVB (ARM1176) 4 borzoi Sharp SL-C3100 (Borzoi) PDA (PXA270) 5 canon-a1100 Canon PowerShot A1100 IS 6 cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310) 7 collie Sharp SL-5500 (Collie) PDA (SA-1110) 8 connex Gumstix Connex (PXA255) 9 cubieboard cubietech cubieboard 10 emcraft-sf2 SmartFusion2 SOM kit from Emcraft (M2S010) 11 highbank Calxeda Highbank (ECX-1000) 12 imx25-pdk ARM i.MX25 PDK board (ARM926) 13 integratorcp ARM Integrator/CP (ARM926EJ-S) 14 kzm ARM KZM Emulation Baseboard (ARM1136) 15 lm3s6965evb Stellaris LM3S6965EVB 16 lm3s811evb Stellaris LM3S811EVB 17 mainstone Mainstone II (PXA27x) 18 mcimx7d-sabre Freescale i.MX7 DUAL SABRE (Cortex A7) 19 midway Calxeda Midway (ECX-2000) 20 mps2-an385 ARM MPS2 with AN385 FPGA image for Cortex-M3 21 mps2-an505 ARM MPS2 with AN505 FPGA image for Cortex-M33 22 mps2-an511 ARM MPS2 with AN511 DesignStart FPGA image for Cortex-M3 23 musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S) 24 n800 Nokia N800 tablet aka. RX-34 (OMAP2420) 25 n810 Nokia N810 tablet aka. RX-44 (OMAP2420) 26 netduino2 Netduino 2 Machine 27 none empty machine 28 nuri Samsung NURI board (Exynos4210) 29 palmetto-bmc OpenPOWER Palmetto BMC (ARM926EJ-S) 30 raspi2 Raspberry Pi 2 31 realview-eb ARM RealView Emulation Baseboard (ARM926EJ-S) 32 realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore) 33 realview-pb-a8 ARM RealView Platform Baseboard for Cortex-A8 34 realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9 35 romulus-bmc OpenPOWER Romulus BMC (ARM1176) 36 sabrelite Freescale i.MX6 Quad SABRE Lite Board (Cortex A9) 37 smdkc210 Samsung SMDKC210 board (Exynos4210) 38 spitz Sharp SL-C3000 (Spitz) PDA (PXA270) 39 sx1 Siemens SX1 (OMAP310) V2 40 sx1-v1 Siemens SX1 (OMAP310) V1 41 terrier Sharp SL-C3200 (Terrier) PDA (PXA270) 42 tosa Sharp SL-6000 (Tosa) PDA (PXA255) 43 verdex Gumstix Verdex (PXA270) 44 versatileab ARM Versatile/AB (ARM926EJ-S) 45 versatilepb ARM Versatile/PB (ARM926EJ-S) 46 vexpress-a15 ARM Versatile Express for Cortex-A15 47 vexpress-a9 ARM Versatile Express for Cortex-A9 48 virt-2.10 QEMU 2.10 ARM Virtual Machine 49 virt-2.11 QEMU 2.11 ARM Virtual Machine 50 virt-2.12 QEMU 2.12 ARM Virtual Machine 51 virt-2.6 QEMU 2.6 ARM Virtual Machine 52 virt-2.7 QEMU 2.7 ARM Virtual Machine 53 virt-2.8 QEMU 2.8 ARM Virtual Machine 54 virt-2.9 QEMU 2.9 ARM Virtual Machine 55 virt QEMU 3.0 ARM Virtual Machine (alias of virt-3.0) 56 virt-3.0 QEMU 3.0 ARM Virtual Machine 57 witherspoon-bmc OpenPOWER Witherspoon BMC (ARM1176) 58 xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9 59 z2 Zipit Z2 (PXA27x)