You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.8 KiB
Bash
22 lines
1.8 KiB
Bash
1 year ago
|
#!/bin/bash
|
||
|
# Fanta <fanta@56k.es>
|
||
|
# Script to compile the most recent qemu version on diferent GNU+Linux distros.
|
||
|
# Script para compilar la versión más reciente de qemu en diferentes distros GNU+Linux
|
||
|
|
||
|
d="/tmp/qemu"
|
||
|
|
||
|
if [ "$(whoami)" != "root" ]; then
|
||
|
echo "[+] Checking root user"
|
||
|
echo -e "\e[31m\e[1m[NOT OK]\e[0m Run it with root please" && exit
|
||
|
fi
|
||
|
|
||
|
# Debian 12
|
||
|
cat /etc/issue | grep "Debian GNU/Linux 12" 1>/dev/null ; if [ "$?" -ne 1 ]; then
|
||
|
apt update -y ; apt remove qemu* --purge -y ; apt install make git bison python3 python3-pkgconfig ninja-build gcc libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev pkg-config libglib2.0-dev libpixman-1-dev libdw-dev libudev-dev libfuse-dev libpmem-dev sparse libdaxctl-dev libgcrypt20-dev libgvnc-1.0-0 acpica-tools python3-sphinx python3-sphinx-rtd-theme libssh-dev sysprof libglusterfs-dev qemu-keymaps libtasn1-6-dev libcrypto++-dev nettle-dev nettle-bin libcapstone-dev libiscsi-dev libnfs-dev libtasn1-6-dev libbpf-dev libsnappy-dev libseccomp-dev libbz2-dev liblzf-dev libnuma-dev libzstd-dev libusb-dev libusb-1.0-0-dev libvirglrenderer-dev libcap-ng-dev libcurl4-openssl-dev libsdl2-dev libsdl2-image-dev libslirp-dev libpam0g-dev libsasl2-dev sndio-tools multipath-tools liburing-dev libghc-nettle-dev libcmocka-dev mingw-w64-x86-64-dev mingw-w64-common mingw-w64 cmake libfuse3-dev libu2f-host-dev libu2f-server-dev libjson-c-dev gcovr libpam-u2f libcpuinfo-dev python3-venv -y
|
||
|
git clone --recursive https://git.qemu.org/git/qemu.git $d ; cd $d
|
||
|
./configure --target-list=x86_64-softmmu --enable-block-drv-whitelist-in-tools --enable-strip --enable-debug-tcg --enable-gcov --enable-gprof --enable-membarrier --disable-fuzzing --enable-modules --enable-qom-cast-debug --enable-lto --enable-debug
|
||
|
make -j$(nproc)
|
||
|
make install
|
||
|
qemu-system-x86_64 --version
|
||
|
fi
|