Linux 内核调试 二:ubuntu20.04安装qemu

一、第一种方法

使用 apt-get install qemu 命令进行安装,安装过程如下:

onlylove@ubuntu:~$ sudo apt-get install qemu
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  qemu
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 0 B/15.2 kB of archives.
After this operation, 125 kB of additional disk space will be used.
Selecting previously unselected package qemu.
(Reading database ... 192884 files and directories currently installed.)
Preparing to unpack .../qemu_1%3a4.2-3ubuntu6.19_amd64.deb ...
Unpacking qemu (1:4.2-3ubuntu6.19) ...
Setting up qemu (1:4.2-3ubuntu6.19) ...
onlylove@ubuntu:~$ qemu-

安装完成以后发现在 /usr/bin 文件夹里面没有 qemu 的相关东西。

通过查找相关资料,ubuntu20.04 安装 qemu 使用如下指令:

sudo apt-get install qemu-system

二、第二种方法

通过编译官方源码安装 qemu 。

参考资料:

https://www.qemu.org/download/

https://wiki.qemu.org/Hosts/Linux

1、获取软件

方法一:

wget https://download.qemu.org/qemu-6.2.0.tar.xz

tar xvJf qemu-6.2.0.tar.xz

方法二:

git clone https://gitlab.com/qemu-project/qemu.git

2、安装环境包

1、必须软件包

sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev

3、编译配置选项整理

onlylove@ubuntu:~/My/qemu/qemu-6.2.0$ ./configure --help
Using './build' as the directory for build output

Usage: configure [options] #用法:配置[选项]
Options: [defaults in brackets after descriptions] #选项[描述后括号中的默认值]

Standard options: #标准选项
  --help                   print this message #打印此消息
  --prefix=PREFIX          install in PREFIX [/usr/local] #安装在 PREFIX 中
  --interp-prefix=PREFIX   where to find shared libraries, etc.
                           use %M for cpu name [/usr/gnemul/qemu-%M]
  --target-list=LIST       set target list (default: build all non-deprecated) #设置目标列表
                           Available targets: aarch64-softmmu alpha-softmmu 
                           arm-softmmu avr-softmmu cris-softmmu hppa-softmmu 
                           i386-softmmu m68k-softmmu microblaze-softmmu 
                           microblazeel-softmmu mips-softmmu mips64-softmmu 
                           mips64el-softmmu mipsel-softmmu nios2-softmmu 
                           or1k-softmmu ppc-softmmu ppc64-softmmu 
                           riscv32-softmmu riscv64-softmmu rx-softmmu 
                           s390x-softmmu sh4-softmmu sh4eb-softmmu 
                           sparc-softmmu sparc64-softmmu tricore-softmmu 
                           x86_64-softmmu xtensa-softmmu xtensaeb-softmmu 
                           aarch64-linux-user aarch64_be-linux-user 
                           alpha-linux-user arm-linux-user armeb-linux-user 
                           cris-linux-user hexagon-linux-user hppa-linux-user 
                           i386-linux-user m68k-linux-user 
                           microblaze-linux-user microblazeel-linux-user 
                           mips-linux-user mips64-linux-user 
                           mips64el-linux-user mipsel-linux-user 
                           mipsn32-linux-user mipsn32el-linux-user 
                           nios2-linux-user or1k-linux-user ppc-linux-user 
                           ppc64-linux-user ppc64le-linux-user 
                           riscv32-linux-user riscv64-linux-user 
                           s390x-linux-user sh4-linux-user sh4eb-linux-user 
                           sparc-linux-user sparc32plus-linux-user 
                           sparc64-linux-user x86_64-linux-user 
                           xtensa-linux-user xtensaeb-linux-user
                           Deprecated targets: ppc64abi32-linux-user
  --target-list-exclude=LIST exclude a set of targets from the default target-list #从默认目标列表中排除一组目标

Advanced options (experts only): #高级选项(仅限专家)
  --cross-prefix=PREFIX    use PREFIX for compile tools, PREFIX can be blank [] #使用PREFIX作为编译工具,PREFIX可以为空
  --cc=CC                  use C compiler CC [cc] #使用 C 编译器 CC
  --iasl=IASL              use ACPI compiler IASL [iasl] #使用 ACPI 编译器 IASL
  --host-cc=CC             use C compiler CC [cc] for code run at
                           build time #使用 C 编译器 CC 在编译时构建运行代码
  --cxx=CXX                use C++ compiler CXX [c++] #使用 C++ 编译器 Cxx
  --objcc=OBJCC            use Objective-C compiler OBJCC [cc]
  --extra-cflags=CFLAGS    append extra C compiler flags CFLAGS
  --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS #附加额外的 C 编译器标志 CFLAGS
  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS
  --cross-cc-ARCH=CC       use compiler when building ARCH guest test cases #在构建ARCH客户测试用例时使用编译器
  --cross-cc-flags-ARCH=   use compiler flags when building ARCH guest tests
  --make=MAKE              use specified make [make] #使用指定 make
  --python=PYTHON          use specified python [/usr/bin/python3]
  --sphinx-build=SPHINX    use specified sphinx-build []
  --meson=MESON            use specified meson []
  --ninja=NINJA            use specified ninja []
  --smbd=SMBD              use specified smbd []
  --with-git=GIT           use specified git [git]
  --with-git-submodules=update   update git submodules (default if .git dir exists) #更新 git 子模块
  --with-git-submodules=validate fail if git submodules are not up to date
  --with-git-submodules=ignore   do not update or check git submodules (default if no .git dir)
  --static                 enable static build [no] #开启静态编译
  --mandir=PATH            install man pages in PATH #在 PATH 中安装手册页
  --datadir=PATH           install firmware in PATH/qemu #在 PATH/qemu 中安装固件
  --localedir=PATH         install translation in PATH/qemu
  --docdir=PATH            install documentation in PATH/qemu
  --bindir=PATH            install binaries in PATH
  --libdir=PATH            install libraries in PATH
  --libexecdir=PATH        install helper binaries in PATH
  --sysconfdir=PATH        install config in PATH/qemu
  --localstatedir=PATH     install local state in PATH (set at runtime on win32)
  --firmwarepath=PATH      search PATH for firmware files #在 PATH 中搜索固件
  --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
  --with-suffix=SUFFIX     suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [qemu]
  --with-pkgversion=VERS   use specified string as sub-version of the package #使用指定的字符串作为包的子版本
  --without-default-features default all --enable-* options to "disabled" # 默认所有 “--enable-*” 被禁止
  --without-default-devices  do not include any device that is not needed to #不包括启动模拟器不需要的任何设备
                           start the emulator (only use if you are including
                           desired devices in configs/devices/)
  --with-devices-ARCH=NAME override default configs/devices #覆盖默认 configs/devices
  --enable-debug           enable common debug build options #开启通用调试选项
  --enable-sanitizers      enable default sanitizers
  --enable-tsan            enable thread sanitizer
  --disable-strip          disable stripping binaries
  --disable-werror         disable compilation abort on warning
  --disable-stack-protector disable compiler-provided stack protection
  --audio-drv-list=LIST    set audio drivers to try if -audiodev is not used #如果没有使用-audiodev,设置音频驱动程序来尝试
  --block-drv-whitelist=L  Same as --block-drv-rw-whitelist=L
  --block-drv-rw-whitelist=L
                           set block driver read-write whitelist #设置块驱动读写白名单
                           (by default affects only QEMU, not tools like qemu-img)
  --block-drv-ro-whitelist=L
                           set block driver read-only whitelist
                           (by default affects only QEMU, not tools like qemu-img)
  --enable-block-drv-whitelist-in-tools
                           use block whitelist also in tools instead of only QEMU #在工具中也使用块白名单,而不仅仅是QEMU
  --with-trace-file=NAME   Full PATH,NAME of file to store traces
                           Default:trace-
  --cpu=CPU                Build for host CPU [x86_64]
  --with-coroutine=BACKEND coroutine backend. Supported options: #协同程序的后端。支持选项
                           ucontext, sigaltstack, windows
  --enable-gcov            enable test coverage analysis with gcov #使用 gcov 启用测试覆盖率分析
  --with-vss-sdk=SDK-path  enable Windows VSS support in QEMU Guest Agent #在QEMU Guest Agent中启用Windows VSS支持
  --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb) #Windows平台SDK的路径
  --tls-priority           default TLS protocol/cipher priority string #默认 TLS 协议/密码(protocol/cipher)优先级字符串
  --enable-gprof           QEMU profiling with gprof #使用gprof分析QEMU
  --enable-profiler        profiler support #分析器的支持
  --enable-debug-stack-usage
                           track the maximum stack usage of stacks created by qemu_alloc_stack #跟踪 qemu_alloc_stack 创建的堆栈的最大堆栈使用情况
  --enable-plugins
                           enable plugins via shared library loading #通过共享库加载启用插件
  --disable-containers     don't use containers for cross-building #不要使用容器进行交叉构建
  --gdb=GDB-path           gdb to use for gdbstub tests [/usr/bin/gdb]
  --enable-capstone[=CHOICE]
                           Whether and how to find the capstone library #是否以及如何查找 capstone 库
                           (choices: auto/disabled/enabled/internal/system)
  --enable-cfi             Control-Flow Integrity (CFI) #控制流完整性
  --enable-cfi-debug       Verbose errors in case of CFI violation #违反 CFI 时出现详细错误
  --enable-fdt[=CHOICE]    Whether and how to find the libfdt library #是否以及如何查找 libfdt 库
                           (choices: auto/disabled/enabled/internal/system)
  --enable-fuzzing         build fuzzing targets #构建模糊测试目标
  --disable-install-blobs  install provided firmware blobs #安装提供的固件块
  --enable-malloc=CHOICE   choose memory allocator to use [system] (choices:
                           jemalloc/system/tcmalloc) #选择要使用的内存分配器
  --enable-slirp[=CHOICE]  Whether and how to find the slirp library
                           (choices: auto/disabled/enabled/internal/system) #是否以及如何查找 slitrp 库
  --enable-tcg-interpreter TCG with bytecode interpreter (slow) #带有字节码解释器的TCG
  --enable-trace-backends=CHOICE
                           Set available tracing backends [log] (choices:
                           dtrace/ftrace/log/nop/simple/syslog/ust) #设置可用的跟踪后端

Optional features, enabled with --enable-FEATURE and
disabled with --disable-FEATURE, default is enabled if available
(unless built with --without-default-features):
#可选功能,使用 --enable-FEATURE 启用,使用 --disable-FEATURE 禁用,如果可用,则默认启用

  alsa            ALSA sound support # ALSA 声音支持
  attr            attr/xattr support # attr/xattr 支持
  auth-pam        PAM access control # PAM 访问控制
  bpf             eBPF support # eBPF 支持
  brlapi          brlapi character device driver # Brlapi字符设备驱动程序
  bzip2           bzip2 support for DMG images # bzip2 对 DMG 映像的支持
  cap-ng          cap_ng support # cap_ng支持
  cocoa           Cocoa user interface (macOS only)
  coreaudio       CoreAudio sound support # CoreAudio声音支持
  curl            CURL block device driver # CURL块设备驱动程序
  curses          curses UI
  docs            Documentations build support # 文档构建支持
  dsound          DirectSound sound support # DirectSound 声音支持
  fuse            FUSE block device export # FUSE 块设备导出
  fuse-lseek      SEEK_HOLE/SEEK_DATA support for FUSE exports
  gcrypt          libgcrypt cryptography support # libgcrypt 加密支持
  gettext         Localization of the GTK+ user interface # GTK+ 用户界面的本地化
  glusterfs       Glusterfs block device driver # Glusterfs 块设备驱动程序
  gnutls          GNUTLS cryptography support # GNUTLS 加密支持
  gtk             GTK+ user interface # GTK+ 用户界面
  guest-agent-msi Build MSI package for the QEMU Guest Agent # 为QEMU客户代理构建MSI包
  hax             HAX acceleration support # HAX 加速支持
  hvf             HVF acceleration support # HVF 加速支持
  iconv           Font glyph conversion support # 字体字形转换支持
  jack            JACK sound support # JACK 声音支持
  kvm             KVM acceleration support # KVM 加速支持
  v3          v3 network backend support # v3 网络后端支持
  libdaxctl       libdaxctl support # libdaxctl 支持
  libiscsi        libiscsi userspace initiator # libiscsi用户空间启动程序
  libnfs          libnfs block device driver # libnfs 块设备驱动程序
  libpmem         libpmem support # libpmem 支持
  libudev         Use libudev to enumerate host devices # 使用 libudev 枚举主机设备
  libusb          libusb support for USB passthrough # 对 USB 直通的 libusb 支持
  libxml2         libxml2 support for Parallels image format # libxml2 对 Parallels 图像格式的支持
  linux-aio       Linux AIO support # Linux AIO 支持
  linux-io-uring  Linux io_uring support # Linux io_uring支持
  lzfse           lzfse support for DMG images # lzfse 对 DMG 映像的支持
  lzo             lzo compression support # lzo 压缩支持
  malloc-trim     enable libc malloc_trim() for memory optimization # 启用 libc malloc_trim() 以进行内存优化
  mpath           Multipath persistent reservation passthrough # 多路径持久保留直通
  multiprocess    Out of process device emulation support # 进程外设备仿真支持
  netmap          netmap network backend support # Netmap网络后端支持
  nettle          nettle cryptography support # nettle 加密支持
  nvmm            NVMM acceleration support # NVMM 加速支持
  oss             OSS sound support # OSS 声音支持
  pa              PulseAudio sound support # PulseAudio 声音支持
  rbd             Ceph block device driver # Ceph 块设备驱动程序
  sdl             SDL user interface # SDL 用户界面
  sdl-image       SDL Image support for icons # SDL 图像图标支持
  seccomp         seccomp support # seccomp支持
  selinux         SELinux support in qemu-nbd # SELinux 在 qemu-nbd 中的支持
  smartcard       CA smartcard emulation support # CA 智能卡仿真支持
  snappy          snappy compression support # 快速压缩支持
  sparse          sparse checker
  spice           Spice server support # Spice 服务器支持
  spice-protocol  Spice protocol support # Spice 协议支持
  tcg             TCG support # TCG 支持
  u2f             U2F emulation support # U2F 支持
  usb-redir       libusbredir support # libusbredir 支持
  vde             vde network backend support # vde 网络后端支持
  vhost-user-blk-server
                  build vhost-user-blk server # 构建vhost-user-blk服务器
  virglrenderer   virgl rendering support # virgl 渲染支持
  virtfs          virtio-9p support # virtio-9p 支持
  virtiofsd       build virtiofs daemon (virtiofsd) # 构建virtiofs守护进程
  vnc             VNC server # NVC 服务
  vnc-jpeg        JPEG lossy compression for VNC server # VNC 服务器的 JPEG 有损压缩
  vnc-png         PNG compression for VNC server # VNC 服务器的 PNG 压缩
  vnc-sasl        SASL authentication for VNC server # VNC 服务器的 SASL 身份验证
  vte             vte support for the gtk UI # vte 支持 gtk 用户界面
  whpx            WHPX acceleration support # WHPX 加速支持
  xen             Xen backend support # Xen 后端支持
  xen-pci-passthrough
                  Xen PCI passthrough support # Xen PCI 直通支持
  xkbcommon       xkbcommon support # xkbcommon 支持
  zstd            zstd compression support # zstd 压缩支持
  system          all system emulation targets # 所有系统仿真目标
  user            supported user emulation targets # 支持的用户仿真目标
  linux-user      all linux usermode emulation targets # 所有 Linux 用户模式仿真目标
  bsd-user        all BSD usermode emulation targets # 所有 BSD 用户模式仿真目标
  guest-agent     build the QEMU Guest Agent # 构建 QEMU 客户机代理
  pie             Position Independent Executables # 独立于位置的可执行文件
  modules         modules support (non-Windows) # 模块支持
  module-upgrades try to load modules from alternate paths for upgrades # 尝试从备用路径加载模块以进行升级
  debug-tcg       TCG debugging (default is disabled) # TCG 调试
  debug-info      debugging information # 调试信息
  lto             Enable Link-Time Optimization. # 启用链接时间优化
  safe-stack      SafeStack Stack Smash Protection. Depends on # SafeStack 堆栈粉碎保护
                  clang/llvm >= 3.7 and requires coroutine backend ucontext.
  membarrier      membarrier system call (for Linux 4.14+ or Windows) # membarrier 系统调用
  rdma            Enable RDMA-based migration # 启用基于 RDMA 的迁移
  pvrdma          Enable PVRDMA support # 启用 PVRDMA 支持
  vhost-net       vhost-net kernel acceleration support # Vhost-net内核加速支持
  vhost-vsock     virtio sockets device support # virtio sockets 设备支持
  vhost-scsi      vhost-scsi kernel target support # vhost-scsi 内核目标支持
  vhost-crypto    vhost-user-crypto backend support # vhost-user-crypto后端支持
  vhost-kernel    vhost kernel backend support # Vhost内核后端支持
  vhost-user      vhost-user backend support # vhost-user后端支持
  vhost-vdpa      vhost-vdpa kernel backend support # Vhost-vdpa内核后端支持
  live-block-migration   Block migration in the main migration stream # 主迁移流中的块迁移
  coroutine-pool  coroutine freelist (better performance)
  tpm             TPM support # TPM 支持
  libssh          ssh block device support # ssh 块设备支持
  numa            libnuma support # libnuma # 支持
  avx2            AVX2 optimization support # AVX2 优化支持
  avx512f         AVX512F optimization support # AVX512F 优化支持
  replication     replication support # 复制支持
  opengl          opengl support # opengl 支持
  xfsctl          xfsctl support # xfsctl 支持
  qom-cast-debug  cast debugging support
  tools           build qemu-io, qemu-nbd and qemu-img tools # 构建 qemu-io、qemu-nbd 和 qemu-img 工具
  bochs           bochs image format support # bochs 图像格式支持
  cloop           cloop image format support # Cloop 图像格式支持
  dmg             dmg image format support # dmg 图像格式支持
  qcow1           qcow v1 image format support # qcow v1 图像格式支持
  vdi             vdi image format support # vdi 图像格式支持
  vvfat           vvfat image format support # vvfat 图像格式支持
  qed             qed image format support # qed 图像格式支持
  parallels       parallels image format support # 并行图像格式支持
  crypto-afalg    Linux AF_ALG crypto backend driver # Linux AF_ALG加密后端驱动程序
  debug-mutex     mutex debugging support # 互斥体调试支持
  rng-none        dummy RNG, avoid using /dev/(u)random and getrandom()
  gio             libgio support # libgio支持
  slirp-smbd      use smbd (at path --smbd=*) in slirp networking

NOTE: The object files are built at the place where configure is launched
onlylove@ubuntu:~/My/qemu/qemu-6.2.0$ 

4、解决异常

问题1:

onlylove@ubuntu:~/My/qemu/qemu-6.2.0$ ./configure 
Using './build' as the directory for build output

ERROR: GNU make (make) not found

onlylove@ubuntu:~/My/qemu/qemu-6.2.0$

解决方法:

sudo apt-get install make

问题2:

onlylove@ubuntu:~/My/qemu/qemu-6.2.0$ ./configure > log.txt

ERROR: Cannot find Ninja

onlylove@ubuntu:~/My/qemu/qemu-6.2.0$

解决方法:

sudo apt-get install ninja-build

5、配置

命令:

./configure > log.txt

日志:

Using './build' as the directory for build output
No C++ compiler available; disabling C++ specific optional code
The Meson build system
Version: 0.59.3
Source dir: /home/onlylove/My/qemu/qemu-6.2.0
Build dir: /home/onlylove/My/qemu/qemu-6.2.0/build
Build type: native build
Project name: qemu
Project version: 6.2.0
C compiler for the host machine: cc -m64 -mcx16 (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0")
C linker for the host machine: cc -m64 -mcx16 ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program sh found: YES (/usr/bin/sh)
Program python3 found: YES (/usr/bin/python3)
WARNING: Broken python installation detected. Python files installed by Meson might not be found by python interpreter.
Program bzip2 found: YES (/usr/bin/bzip2)
Program cgcc found: NO
Library m found: YES
Run-time dependency threads found: YES
Library util found: YES
Run-time dependency appleframeworks found: NO (tried framework)
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency pixman-1 found: YES 0.38.4
Run-time dependency zlib found: YES 1.2.11
Has header "libaio.h" : NO 
Run-time dependency liburing found: NO (tried pkgconfig)
Run-time dependency libxml-2.0 found: NO (tried pkgconfig)
Run-time dependency libnfs found: NO (tried pkgconfig)
Run-time dependency appleframeworks found: NO (tried framework)
Run-time dependency libseccomp found: NO (tried pkgconfig)
Has header "cap-ng.h" : NO 
Run-time dependency xkbcommon found: NO (tried pkgconfig)
Has header "libvdeplug.h" : NO 
Run-time dependency libpulse found: NO (tried pkgconfig)
Run-time dependency alsa found: NO (tried pkgconfig)
Run-time dependency jack found: NO (tried pkgconfig)
Run-time dependency spice-protocol found: NO (tried pkgconfig)
Run-time dependency spice-server found: NO (tried pkgconfig)
Library rt found: YES
Run-time dependency libiscsi found: NO (tried pkgconfig)
Run-time dependency libzstd found: NO (tried pkgconfig)
Run-time dependency virglrenderer found: NO (tried pkgconfig)
Run-time dependency libcurl found: NO (tried pkgconfig)
Run-time dependency libudev found: NO (tried pkgconfig)
Library mpathpersist found: NO
Run-time dependency ncursesw found: NO (tried pkgconfig)
Has header "curses.h" : NO 
Message: Trying with /usr/include/ncursesw
Has header "curses.h" : NO 
Has header "brlapi.h" : NO 
sdl2-config found: NO
Run-time dependency sdl2 found: NO (tried pkgconfig and config-tool)
Library rados found: NO
Has header "rbd/librbd.h" : NO 
Run-time dependency glusterfs-api found: NO (tried pkgconfig)
Has header "bzlib.h" : NO 
Has header "lzfse.h" : NO 
Has header "sys/soundcard.h" : YES 
Run-time dependency gnutls found: NO (tried pkgconfig)
Run-time dependency gnutls found: NO (tried pkgconfig)
libgcrypt-config found: NO need ['>=1.8']
Run-time dependency libgcrypt found: NO (tried config-tool)
Run-time dependency nettle found: NO (tried pkgconfig)
Run-time dependency gtk+-3.0 found: NO (tried pkgconfig)
Run-time dependency libpng found: NO (tried pkgconfig)
Run-time dependency libjpeg found: NO (tried pkgconfig)
Has header "sasl/sasl.h" : NO 
Has header "security/pam_appl.h" : NO 
Has header "snappy-c.h" : NO 
Has header "lzo/lzo1x.h" : NO 
Run-time dependency libcacard found: NO (tried pkgconfig)
Run-time dependency u2f-emu found: NO (tried pkgconfig)
Run-time dependency libusbredirparser-0.5 found: NO (tried pkgconfig)
Run-time dependency libusb-1.0 found: NO (tried pkgconfig)
Run-time dependency libpmem found: NO (tried pkgconfig)
Run-time dependency libdaxctl found: NO (tried pkgconfig)
Run-time dependency libkeyutils found: NO (tried pkgconfig)
Checking for function "gettid" : YES 
Run-time dependency libselinux found: YES 3.0
Run-time dependency fuse3 found: NO (tried pkgconfig)
Run-time dependency libbpf found: NO (tried pkgconfig)
Has header "sys/epoll.h" : YES 
Has header "linux/magic.h" : YES 
Has header "valgrind/valgrind.h" : NO 
Has header "linux/btrfs.h" : YES 
Has header "libdrm/drm.h" : NO 
Has header "pty.h" : YES 
Has header "sys/disk.h" : NO 
Has header "sys/ioccom.h" : NO 
Has header "sys/kcov.h" : NO 
Checking for function "accept4" : YES 
Checking for function "clock_adjtime" : YES 
Checking for function "dup3" : YES 
Checking for function "fallocate" : YES 
Checking for function "posix_fallocate" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "ppoll" : YES 
Checking for function "preadv" : YES 
Checking for function "sem_timedwait" with dependency threads: YES 
Checking for function "sendfile" : YES 
Checking for function "setns" : YES 
Checking for function "unshare" : YES 
Checking for function "syncfs" : YES 
Checking for function "sync_file_range" : YES 
Checking for function "timerfd_create" : YES 
Checking for function "copy_file_range" : YES 
Checking for function "openpty" with dependency -lutil: YES 
Checking for function "strchrnul" : YES 
Checking for function "system" : YES 
Header <byteswap.h> has symbol "bswap_32" : YES 
Header <sys/epoll.h> has symbol "epoll_create1" : YES 
Header <unistd.h> has symbol "environ" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_PUNCH_HOLE" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_KEEP_SIZE" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_ZERO_RANGE" : YES 
Has header "linux/fiemap.h" : YES 
Header <linux/fs.h> has symbol "FS_IOC_FIEMAP" : YES 
Checking for function "getrandom" : YES 
Header <sys/random.h> has symbol "GRND_NONBLOCK" : YES 
Header <sys/inotify.h> has symbol "inotify_init" : YES 
Header <sys/inotify.h> has symbol "inotify_init1" : YES 
Header <machine/bswap.h> has symbol "bswap32" : NO 
Header <sys/prctl.h> has symbol "PR_SET_TIMERSLACK" : YES 
Header <linux/rtnetlink.h> has symbol "IFLA_PROTO_DOWN" : YES 
Header <sys/sysmacros.h> has symbol "makedev" : YES 
Header <getopt.h> has symbol "optreset" : NO 
Header <netinet/in.h> has symbol "IPPROTO_MPTCP" : NO 
Checking whether type "struct sigevent" has member "sigev_notify_thread_id" : NO 
Checking whether type "struct stat" has member "st_atim" : YES 
Checking for type "struct iovec" : YES 
Checking for type "struct utmpx" : YES 
Checking for type "struct mmsghdr" : YES 
Program scripts/minikconf.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/scripts/minikconf.py)
Configuring aarch64-softmmu-config-target.h using configuration
Configuring aarch64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/aarch64-softmmu-config-devices.mak.d
Configuring aarch64-softmmu-config-devices.h using configuration
Configuring alpha-softmmu-config-target.h using configuration
Configuring alpha-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/alpha-softmmu-config-devices.mak.d
Configuring alpha-softmmu-config-devices.h using configuration
Configuring arm-softmmu-config-target.h using configuration
Configuring arm-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/arm-softmmu-config-devices.mak.d
Configuring arm-softmmu-config-devices.h using configuration
Configuring avr-softmmu-config-target.h using configuration
Configuring avr-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/avr-softmmu-config-devices.mak.d
Configuring avr-softmmu-config-devices.h using configuration
Configuring cris-softmmu-config-target.h using configuration
Configuring cris-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/cris-softmmu-config-devices.mak.d
Configuring cris-softmmu-config-devices.h using configuration
Configuring hppa-softmmu-config-target.h using configuration
Configuring hppa-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/hppa-softmmu-config-devices.mak.d
Configuring hppa-softmmu-config-devices.h using configuration
Configuring i386-softmmu-config-target.h using configuration
Configuring i386-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/i386-softmmu-config-devices.mak.d
Configuring i386-softmmu-config-devices.h using configuration
Configuring m68k-softmmu-config-target.h using configuration
Configuring m68k-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/m68k-softmmu-config-devices.mak.d
Configuring m68k-softmmu-config-devices.h using configuration
Configuring microblaze-softmmu-config-target.h using configuration
Configuring microblaze-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/microblaze-softmmu-config-devices.mak.d
Configuring microblaze-softmmu-config-devices.h using configuration
Configuring microblazeel-softmmu-config-target.h using configuration
Configuring microblazeel-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/microblazeel-softmmu-config-devices.mak.d
Configuring microblazeel-softmmu-config-devices.h using configuration
Configuring mips-softmmu-config-target.h using configuration
Configuring mips-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/mips-softmmu-config-devices.mak.d
Configuring mips-softmmu-config-devices.h using configuration
Configuring mips64-softmmu-config-target.h using configuration
Configuring mips64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/mips64-softmmu-config-devices.mak.d
Configuring mips64-softmmu-config-devices.h using configuration
Configuring mips64el-softmmu-config-target.h using configuration
Configuring mips64el-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/mips64el-softmmu-config-devices.mak.d
Configuring mips64el-softmmu-config-devices.h using configuration
Configuring mipsel-softmmu-config-target.h using configuration
Configuring mipsel-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/mipsel-softmmu-config-devices.mak.d
Configuring mipsel-softmmu-config-devices.h using configuration
Configuring nios2-softmmu-config-target.h using configuration
Configuring nios2-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/nios2-softmmu-config-devices.mak.d
Configuring nios2-softmmu-config-devices.h using configuration
Configuring or1k-softmmu-config-target.h using configuration
Configuring or1k-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/or1k-softmmu-config-devices.mak.d
Configuring or1k-softmmu-config-devices.h using configuration
Configuring ppc-softmmu-config-target.h using configuration
Configuring ppc-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/ppc-softmmu-config-devices.mak.d
Configuring ppc-softmmu-config-devices.h using configuration
Configuring ppc64-softmmu-config-target.h using configuration
Configuring ppc64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/ppc64-softmmu-config-devices.mak.d
Configuring ppc64-softmmu-config-devices.h using configuration
Configuring riscv32-softmmu-config-target.h using configuration
Configuring riscv32-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/riscv32-softmmu-config-devices.mak.d
Configuring riscv32-softmmu-config-devices.h using configuration
Configuring riscv64-softmmu-config-target.h using configuration
Configuring riscv64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/riscv64-softmmu-config-devices.mak.d
Configuring riscv64-softmmu-config-devices.h using configuration
Configuring rx-softmmu-config-target.h using configuration
Configuring rx-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/rx-softmmu-config-devices.mak.d
Configuring rx-softmmu-config-devices.h using configuration
Configuring s390x-softmmu-config-target.h using configuration
Configuring s390x-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/s390x-softmmu-config-devices.mak.d
Configuring s390x-softmmu-config-devices.h using configuration
Configuring sh4-softmmu-config-target.h using configuration
Configuring sh4-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/sh4-softmmu-config-devices.mak.d
Configuring sh4-softmmu-config-devices.h using configuration
Configuring sh4eb-softmmu-config-target.h using configuration
Configuring sh4eb-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/sh4eb-softmmu-config-devices.mak.d
Configuring sh4eb-softmmu-config-devices.h using configuration
Configuring sparc-softmmu-config-target.h using configuration
Configuring sparc-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/sparc-softmmu-config-devices.mak.d
Configuring sparc-softmmu-config-devices.h using configuration
Configuring sparc64-softmmu-config-target.h using configuration
Configuring sparc64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/sparc64-softmmu-config-devices.mak.d
Configuring sparc64-softmmu-config-devices.h using configuration
Configuring tricore-softmmu-config-target.h using configuration
Configuring tricore-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/tricore-softmmu-config-devices.mak.d
Configuring tricore-softmmu-config-devices.h using configuration
Configuring x86_64-softmmu-config-target.h using configuration
Configuring x86_64-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/x86_64-softmmu-config-devices.mak.d
Configuring x86_64-softmmu-config-devices.h using configuration
Configuring xtensa-softmmu-config-target.h using configuration
Configuring xtensa-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/xtensa-softmmu-config-devices.mak.d
Configuring xtensa-softmmu-config-devices.h using configuration
Configuring xtensaeb-softmmu-config-target.h using configuration
Configuring xtensaeb-softmmu-config-devices.mak with command
Reading depfile: /home/onlylove/My/qemu/qemu-6.2.0/build/meson-private/xtensaeb-softmmu-config-devices.mak.d
Configuring xtensaeb-softmmu-config-devices.h using configuration
Configuring aarch64-linux-user-config-target.h using configuration
Configuring aarch64_be-linux-user-config-target.h using configuration
Configuring alpha-linux-user-config-target.h using configuration
Configuring arm-linux-user-config-target.h using configuration
Configuring armeb-linux-user-config-target.h using configuration
Configuring cris-linux-user-config-target.h using configuration
Configuring hexagon-linux-user-config-target.h using configuration
Configuring hppa-linux-user-config-target.h using configuration
Configuring i386-linux-user-config-target.h using configuration
Configuring m68k-linux-user-config-target.h using configuration
Configuring microblaze-linux-user-config-target.h using configuration
Configuring microblazeel-linux-user-config-target.h using configuration
Configuring mips-linux-user-config-target.h using configuration
Configuring mips64-linux-user-config-target.h using configuration
Configuring mips64el-linux-user-config-target.h using configuration
Configuring mipsel-linux-user-config-target.h using configuration
Configuring mipsn32-linux-user-config-target.h using configuration
Configuring mipsn32el-linux-user-config-target.h using configuration
Configuring nios2-linux-user-config-target.h using configuration
Configuring or1k-linux-user-config-target.h using configuration
Configuring ppc-linux-user-config-target.h using configuration
Configuring ppc64-linux-user-config-target.h using configuration
Configuring ppc64le-linux-user-config-target.h using configuration
Configuring riscv32-linux-user-config-target.h using configuration
Configuring riscv64-linux-user-config-target.h using configuration
Configuring s390x-linux-user-config-target.h using configuration
Configuring sh4-linux-user-config-target.h using configuration
Configuring sh4eb-linux-user-config-target.h using configuration
Configuring sparc-linux-user-config-target.h using configuration
Configuring sparc32plus-linux-user-config-target.h using configuration
Configuring sparc64-linux-user-config-target.h using configuration
Configuring x86_64-linux-user-config-target.h using configuration
Configuring xtensa-linux-user-config-target.h using configuration
Configuring xtensaeb-linux-user-config-target.h using configuration
Run-time dependency capstone found: NO (tried pkgconfig)
Configuring capstone-defs.h using configuration
Run-time dependency slirp found: NO (tried pkgconfig)
Configuring libslirp-version.h using configuration
Library fdt found: YES
Configuring config-host.h using configuration
Program scripts/hxtool found: YES (/home/onlylove/My/qemu/qemu-6.2.0/scripts/hxtool)
Program scripts/shaderinclude.pl found: YES (/usr/bin/env perl /home/onlylove/My/qemu/qemu-6.2.0/scripts/shaderinclude.pl)
Program scripts/qapi-gen.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/scripts/qapi-gen.py)
Program scripts/qemu-version.sh found: YES (/home/onlylove/My/qemu/qemu-6.2.0/scripts/qemu-version.sh)

Executing subproject libvhost-user 

libvhost-user| Project name: libvhost-user
libvhost-user| Project version: undefined
libvhost-user| C compiler for the host machine: cc -m64 -mcx16 (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0")
libvhost-user| C linker for the host machine: cc -m64 -mcx16 ld.bfd 2.34
libvhost-user| Dependency threads found: YES unknown (cached)
libvhost-user| Dependency glib-2.0 found: YES 6.2.0 (overridden)
libvhost-user| Build targets in project: 10
libvhost-user| Subproject libvhost-user finished.

Program cat found: YES (/usr/bin/cat)
Program scripts/decodetree.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/scripts/decodetree.py)
Program ../scripts/modules/module_block.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/block/../scripts/modules/module_block.py)
Program ../scripts/block-coroutine-wrapper.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/block/../scripts/block-coroutine-wrapper.py)
Program scripts/modinfo-collect.py found: YES (/home/onlylove/My/qemu/qemu-6.2.0/scripts/modinfo-collect.py)
Program scripts/modinfo-generate.py found: YES (/home/onlylove/My/qemu/qemu-6.2.0/scripts/modinfo-generate.py)
Program nm found: YES
Program scripts/undefsym.py found: YES (/usr/bin/python3 /home/onlylove/My/qemu/qemu-6.2.0/scripts/undefsym.py)
Program scripts/feature_to_c.sh found: YES (/bin/sh /home/onlylove/My/qemu/qemu-6.2.0/scripts/feature_to_c.sh)
Configuring 50-edk2-i386-secure.json using configuration
Configuring 50-edk2-x86_64-secure.json using configuration
Configuring 60-edk2-aarch64.json using configuration
Configuring 60-edk2-arm.json using configuration
Configuring 60-edk2-i386.json using configuration
Configuring 60-edk2-x86_64.json using configuration
Program qemu-keymap found: NO
Program cp found: YES (/usr/bin/cp)
Program sphinx-build-3 sphinx-build found: NO
Program python3 found: YES (/usr/bin/python3)
Program diff found: YES (/usr/bin/diff)
Program dbus-daemon found: YES (/usr/bin/dbus-daemon)
Program /usr/bin/gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Program initrd-stress.sh found: YES (/home/onlylove/My/qemu/qemu-6.2.0/tests/migration/initrd-stress.sh)
Build targets in project: 645

qemu 6.2.0

  Directories
    Install prefix               : /usr/local
    BIOS directory               : share/qemu
    firmware path                : /usr/local/share/qemu-firmware
    binary directory             : bin
    library directory            : lib
    module directory             : lib/qemu
    libexec directory            : libexec
    include directory            : include
    config directory             : /usr/local/etc
    local state directory        : /usr/local/var
    Manual directory             : share/man
    Doc directory                : /usr/local/share/doc
    Build directory              : /home/onlylove/My/qemu/qemu-6.2.0/build
    Source path                  : /home/onlylove/My/qemu/qemu-6.2.0
    GIT submodules               : ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp

  Host binaries
    git                          : git
    make                         : make
    python                       : /usr/bin/python3 (version: 3.8)
    sphinx-build                 : NO
    gdb                          : /usr/bin/gdb
    genisoimage                  : /usr/bin/genisoimage
    smbd                         : "/usr/sbin/smbd"

  Configurable features
    Documentation                : NO
    system-mode emulation        : YES
    user-mode emulation          : YES
    block layer                  : YES
    Install blobs                : YES
    module support               : NO
    fuzzing support              : NO
    Audio drivers                : oss
    Trace backends               : log
    QOM debugging                : YES
    vhost-kernel support         : YES
    vhost-net support            : YES
    vhost-crypto support         : YES
    vhost-scsi support           : YES
    vhost-vsock support          : YES
    vhost-user support           : YES
    vhost-user-blk server support: YES
    vhost-user-fs support        : YES
    vhost-vdpa support           : YES
    build guest agent            : YES

  Compilation
    host CPU                     : x86_64
    host endianness              : little
    C compiler                   : cc -m64 -mcx16
    Host C compiler              : cc -m64 -mcx16
    C++ compiler                 : NO
    CFLAGS                       : -O2 -g
    QEMU_CFLAGS                  : -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong
    QEMU_LDFLAGS                 : -Wl,--warn-common -Wl,-z,relro -Wl,-z,now  -fstack-protector-strong
    profiler                     : NO
    link-time optimization (LTO) : NO
    PIE                          : YES
    static build                 : NO
    malloc trim support          : YES
    membarrier                   : NO
    debug stack usage            : NO
    mutex debugging              : NO
    memory allocator             : system
    avx2 optimization            : YES
    avx512f optimization         : NO
    gprof enabled                : NO
    gcov                         : NO
    thread sanitizer             : NO
    CFI support                  : NO
    strip binaries               : YES
    sparse                       : NO
    mingw32 support              : NO
    x86_64 tests                 : cc

  Targets and accelerators
    KVM support                  : YES
    HAX support                  : NO
    HVF support                  : NO
    WHPX support                 : NO
    NVMM support                 : NO
    Xen support                  : NO
    TCG support                  : YES
    TCG backend                  : native (x86_64)
    TCG plugins                  : YES
    TCG debug enabled            : NO
    target list                  : aarch64-softmmu alpha-softmmu arm-softmmu avr-softmmu cris-softmmu hppa-softmmu i386-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mips64-softmmu mips64el-softmmu mipsel-softmmu nios2-softmmu or1k-softmmu ppc-softmmu ppc64-softmmu riscv32-softmmu riscv64-softmmu rx-softmmu s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu tricore-softmmu x86_64-softmmu xtensa-softmmu xtensaeb-softmmu aarch64-linux-user aarch64_be-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user hexagon-linux-user hppa-linux-user i386-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mips64-linux-user mips64el-linux-user mipsel-linux-user mipsn32-linux-user mipsn32el-linux-user nios2-linux-user or1k-linux-user ppc-linux-user ppc64-linux-user ppc64le-linux-user riscv32-linux-user riscv64-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc32plus-linux-user sparc64-linux-user x86_64-linux-user xtensa-linux-user xtensaeb-linux-user
    default devices              : YES
    out of process emulation     : YES

  Block layer support
    coroutine backend            : ucontext
    coroutine pool               : YES
    Block whitelist (rw)         : 
    Block whitelist (ro)         : 
    Use block whitelist in tools : NO
    VirtFS support               : NO
    build virtiofs daemon        : NO
    Live block migration         : YES
    replication support          : YES
    bochs support                : YES
    cloop support                : YES
    dmg support                  : YES
    qcow v1 support              : YES
    vdi support                  : YES
    vvfat support                : YES
    qed support                  : YES
    parallels support            : YES
    FUSE exports                 : NO

  Crypto
    TLS priority                 : "NORMAL"
    GNUTLS support               : NO
    libgcrypt                    : NO
    nettle                       : NO
    crypto afalg                 : NO
    rng-none                     : NO
    Linux keyring                : YES

  Dependencies
    SDL support                  : NO
    SDL image support            : NO
    GTK support                  : NO
    pixman                       : YES 0.38.4
    VTE support                  : NO
    slirp support                : internal
    libtasn1                     : NO
    PAM                          : NO
    iconv support                : YES
    curses support               : NO
    virgl support                : NO
    curl support                 : NO
    Multipath support            : NO
    VNC support                  : YES
    VNC SASL support             : NO
    VNC JPEG support             : NO
    VNC PNG support              : NO
    OSS support                  : YES
    ALSA support                 : NO
    PulseAudio support           : NO
    JACK support                 : NO
    brlapi support               : NO
    vde support                  : NO
    netmap support               : NO
    v3 support               : YES
    Linux AIO support            : NO
    Linux io_uring support       : NO
    ATTR/XATTR support           : YES
    RDMA support                 : NO
    PVRDMA support               : NO
    fdt support                  : system
    libcap-ng support            : NO
    bpf support                  : NO
    spice protocol support       : NO
    rbd support                  : NO
    xfsctl support               : NO
    smartcard support            : NO
    U2F support                  : NO
    libusb                       : NO
    usb net redir                : NO
    OpenGL support               : NO
    GBM                          : NO
    libiscsi support             : NO
    libnfs support               : NO
    seccomp support              : NO
    GlusterFS support            : NO
    TPM support                  : YES
    libssh support               : NO
    lzo support                  : NO
    snappy support               : NO
    bzip2 support                : NO
    lzfse support                : NO
    zstd support                 : NO
    NUMA host support            : NO
    libxml2                      : NO
    capstone                     : internal
    libpmem support              : NO
    libdaxctl support            : NO
    libudev                      : NO
    FUSE lseek                   : NO
    selinux                      : YES 3.0

  Subprojects
    libvhost-user                : YES

Found ninja-1.10.0 at /usr/bin/ninja

6、编辑

make -j4 // 4 核心编译

编译后文件保存在 qemu/build 文件夹下。

onlylove@ubuntu:~/My/qemu/qemu-6.2.0/build$ ls qemu-system-
qemu-system-aarch64         qemu-system-i386            qemu-system-mips64.p/       qemu-system-riscv32         qemu-system-sparc
qemu-system-aarch64.p/      qemu-system-i386.p/         qemu-system-mipsel          qemu-system-riscv32.p/      qemu-system-sparc64
qemu-system-alpha           qemu-system-m68k            qemu-system-mipsel.p/       qemu-system-riscv64         qemu-system-sparc64.p/
qemu-system-alpha.p/        qemu-system-m68k.p/         qemu-system-mips.p/         qemu-system-riscv64.p/      qemu-system-sparc.p/
qemu-system-arm             qemu-system-microblaze      qemu-system-nios2           qemu-system-rx              qemu-system-tricore
qemu-system-arm.p/          qemu-system-microblazeel    qemu-system-nios2.p/        qemu-system-rx.p/           qemu-system-tricore.p/
qemu-system-avr             qemu-system-microblazeel.p/ qemu-system-or1k            qemu-system-s390x           qemu-system-x86_64
qemu-system-avr.p/          qemu-system-microblaze.p/   qemu-system-or1k.p/         qemu-system-s390x.p/        qemu-system-x86_64.p/
qemu-system-cris            qemu-system-mips            qemu-system-ppc             qemu-system-sh4             qemu-system-xtensa
qemu-system-cris.p/         qemu-system-mips64          qemu-system-ppc64           qemu-system-sh4eb           qemu-system-xtensaeb
qemu-system-hppa            qemu-system-mips64el        qemu-system-ppc64.p/        qemu-system-sh4eb.p/        qemu-system-xtensaeb.p/
qemu-system-hppa.p/         qemu-system-mips64el.p/     qemu-system-ppc.p/          qemu-system-sh4.p/          qemu-system-xtensa.p/
onlylove@ubuntu:~/My/qemu/qemu-6.2.0/build$

7、提取 qemu-system-arm

为了避免污染 qemu 源码目录,我们将使用的可执行文件拷贝出来。

1、建立新文件夹

mkdir qemu-lq

2、拷贝使用的可执行文件

cp qemu-system-arm ../../qemu-lq/

3、检测文件

onlylove@ubuntu:~/My/qemu/qemu-lq$ ./qemu-system-arm -version
QEMU emulator version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
onlylove@ubuntu:~/My/qemu/qemu-lq$

你可能感兴趣的:(Linux内核调试,linux)