Skip to content

Instantly share code, notes, and snippets.

@eagleusb
Last active January 27, 2024 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eagleusb/5cfa996e154c31154131424bb2821f21 to your computer and use it in GitHub Desktop.
Save eagleusb/5cfa996e154c31154131424bb2821f21 to your computer and use it in GitHub Desktop.
QEMU build from sources

QEMU

  • Debian like systems

Dependencies

# git clone https://git.qemu.org/git/qemu.git && cd qemu
# git submodule init
# git submodule update --recursive
# apt install build-essential git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev
# apt build-dep qemu-kvm
# apt install libaio-dev libbluetooth-dev libbrlapi-dev libbz2-dev
# apt install libsasl2-dev libsdl1.2-dev libseccomp-dev libsnappy-dev libssh2-1-dev

Configure

# ./configure --target-list=x86_64-softmmu --audio-drv-list= \
  --enable-vnc \
  --enable-kvm \
  --enable-hax \
  --enable-avx2 \
  --enable-vhost-net \
  --enable-vhost-kernel \
  --enable-malloc-trim \
  --enable-tpm \
  --enable-numa \
  --disable-docs \
  --disable-curses \
  --disable-debug-info \
  --disable-auth-pam \
  --disable-sdl \
  --disable-gtk \
  --disable-vte \
  --disable-xen \
  --disable-parallels \
  --disable-dmg \
  --disable-rbd \
  --disable-libiscsi \
  --disable-usb-redir
# make -j$(nproc)
# make install
# type qemu-system-x86_64
qemu-system-x86_64 is hashed (/usr/local/bin/qemu-system-x86_64)
# qemu-system-x86_64 --version
QEMU emulator version 4.2.50 (v4.2.0-1542-g6c599282f8-dirty)Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment