Add Qemu 9.2.4.

This commit is contained in:
An Bui 2026-07-25 19:08:12 +07:00
parent 6f2aae2132
commit 4ccbe31151
3 changed files with 97 additions and 2 deletions

View file

@ -79,17 +79,22 @@ We publish a **new beta release after every commit** — so you can always test
### 🔃 Upgrade tool
Upgrade or change the Qemu version you want to use without resetting the Vectras VM using the Terminal.
QEMU 11.0.0 (for Vectras VM 4.0.8+):
QEMU 11.0.0 (requires Vectras VM 4.0.8+):
```bash
apk add bash && curl -H 'Cache-Control: no-cache' -o setup.sh https://raw.githubusercontent.com/AnBui2004/Vectras-VM-Emu-Android/refs/heads/master/qemu/11.0.0/upgrade.sh && chmod +rwx setup.sh && ./setup.sh; rm setup.sh
```
QEMU 9.2.4 - 3dfx (requires Vectras VM 3.5.0+):
```bash
apk add bash && curl -H 'Cache-Control: no-cache' -o setup.sh https://raw.githubusercontent.com/AnBui2004/Vectras-VM-Emu-Android/refs/heads/master/qemu/9.2.4/upgrade.sh && chmod +rwx setup.sh && ./setup.sh; rm setup.sh
```
QEMU 9.2.2 - 3dfx (recommended and for Vectras VM 4.1.1+):
```bash
apk add bash && curl -H 'Cache-Control: no-cache' -o setup.sh https://raw.githubusercontent.com/AnBui2004/Vectras-VM-Emu-Android/refs/heads/master/qemu/9.2.2/upgrade.sh && chmod +rwx setup.sh && ./setup.sh; rm setup.sh
```
QEMU 7.2.22 - 3dfx (for Vectras VM 4.2.2+):
QEMU 7.2.22 - 3dfx (requires Vectras VM 4.2.2+):
```bash
apk add bash && curl -H 'Cache-Control: no-cache' -o setup.sh https://raw.githubusercontent.com/AnBui2004/Vectras-VM-Emu-Android/refs/heads/master/qemu/7.2.22/upgrade.sh && chmod +rwx setup.sh && ./setup.sh; rm setup.sh
```

22
qemu/9.2.4/build.sh Normal file
View file

@ -0,0 +1,22 @@
#Example for arm64-v8a
apk update
apk add --no-cache bash curl tar rsync flex build-base git meson bison ninja python3 py3-pip libcap-ng-dev glib-dev pixman-dev sdl2-dev sdl2_image-dev sndio alsa-utils alsaconf zlib-dev libaio-dev liburing-dev libcap libcap-ng libssh lzo snappy capstone libcbor libdw gtk+3.0-dev libssh-dev libnfs-dev libseccomp-dev lzo-dev snappy-dev capstone-dev ndctl-libs libcbor-dev libselinux libselinux-dev fuse-dev vde2-dev nmap sndio-dev pipewire-dev alsa-lib-dev vte3-dev keyutils keyutils-dev rng-tools nettle-dev libgcrypt libgcrypt-dev gnutls-dev iasl gcc-objc rust libudev-zero-dev ndctl-dev libu2f-server libu2f-server-dev libbpf libbpf-dev rdma-core-openrc curl-dev linux-pam linux-pam-dev net-snmp-dev jack-dev fuse3 fuse3-dev linux-virt nano
pip install Ninja Sphinx --break-system-packages
pip install meson --upgrade --break-system-packages
pip install sphinx-rtd-theme --break-system-packages
export CFLAGS="-O2 -march=armv8-a+crc+nosve"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-march=armv8-a+crc+nosve"
mkdir myqemu && cd myqemu
git clone https://github.com/kjliew/qemu-3dfx.git
cd qemu-3dfx
nano ~/myqemu/qemu-3dfx/qemu-1/hw/mesa/mglmapbo.c
wget https://download.qemu.org/qemu-9.2.4.tar.xz
tar xf qemu-9.2.4.tar.xz
cd qemu-9.2.4
rsync -r ../qemu-0/hw/3dfx ../qemu-1/hw/mesa ./hw/
patch -p0 -i ../00-qemu92x-mesa-glide.patch
bash ../scripts/sign_commit
mkdir ../build && cd ../build
../qemu-9.2.4/configure --enable-gtk --enable-sdl --enable-libssh --enable-cap-ng
ninja -j$(nproc)

68
qemu/9.2.4/upgrade.sh Normal file
View file

@ -0,0 +1,68 @@
#!/bin/bash
clear
unset qemuurl
architecture=$(uname -m)
if [[ "$architecture" =~ "aarch64" ]]; then
qemuurl="https://archive.org/download/qemu-9-2-4-3dfx-for-vectras-vm-nbab/base-nosve-vectras-vm-arm64-v8a.tar.gz"
elif [[ "$architecture" =~ "x86_64" ]]; then
qemuurl="https://archive.org/download/qemu-9-2-4-3dfx-for-vectras-vm-nbab/base-vectras-vm-x86_64.tar.gz"
fi
if [[ -z "$qemuurl" ]]; then
echo -e "\e[1;37m[!] Unsupported architecture!"
echo -e "\e[1;37m-\e[0m"
echo -e "\e[1;37mYour device's is not supported."
echo -e "\e[1;37m-\e[0m"
echo -e "\e[1;37mSetup was canceled."
rm -f setup.sh
exit
fi
echo -e "\e[1;37m[!] Qemu 9.2.4 upgrade tool. Warning and do not ignore!"
echo -e "\e[1;37m-\e[0m"
echo -e "\e[1;37mPlease do not run any other commands when this setup begins. If you're running other commands, they haven't finished executing yet or don't want some packages to be forced to be updated when setting up. Any existing installed version of Qemu will be uninstalled. Press Ctrl + C now to cancel the setup immediately."
echo -e "\e[1;37m\e[0m"
echo -e "\e[1;37mBy using Qemu in any way, you agree to the terms, policies, and other related provisions. The owner of this script is not responsible for any consequences that may arise from using Qemu or you have edited these scripts. To disagree and cancel the setup, press Ctrl + C."
echo -e "\e[1;37m-\e[0m"
echo -e "\e[1;37mAutomatically go to next step after 60 seconds or continue immediately by pressing any key and you agree to the above."
if read -r -t 60 -n 1 _; then
echo "Pressed the key and continued immediately."
else
echo "60 seconds elapsed, auto continue."
fi
clear
echo -e "\e[1;37m[i] Installing packages..."
apk update
apk add aria2
clear
echo -e "\e[1;37m[i] Killing process..."
pkill -15 -f qemu-system- || true
sleep 1
pkill -9 -f qemu-system- || true
clear
echo -e "\e[1;37m[i] Uninstalling current Qemu..."
rm -f /usr/local/bin/qemu-*
rm -f /usr/share/applications/qemu.desktop
rm -f /usr/share/icons/hicolor/*/qemu.png
rm -rf /usr/share/qemu
clear
echo -e "\e[1;37m[i] Downloading..."
aria2c -x 4 --async-dns=false --disable-ipv6 --check-certificate=false -o setup.tar.gz "$qemuurl"
clear
echo -e "\e[1;37m[i] Installing..."
tar -xzvf setup.tar.gz -C /
clear
echo -e "\e[1;37m[i] Just a sec..."
rm -f setup.tar.gz
chmod 775 /usr/local/bin/qemu*
clear
echo -e "\e[1;37m[i] Done!"
qemu-system-x86_64 -version
rm -f setup.sh