Meta: Always disable kvm on aarch64 hosts for now

run.sh builds i686 by default, and the aarch64 port of serenity
isn't very far along yet.

Without this change, `run.sh` without arguments unceremoniously
fails with:

    [0/1] cd .../serenity/Build/i686 && /usr...
          ENITY_ARCH=i686 /home/thakis/src/serenity/Meta/run.sh
    qemu-system-i386: invalid accelerator kvm

That's because /dev/kvm exists, but that's no good on a non-intel host.
This commit is contained in:
Nico Weber 2022-03-20 20:27:40 -04:00 committed by Brian Gianforcaro
parent 20c6dabaff
commit 681fac07ed

View file

@ -21,7 +21,7 @@ SCRIPT_DIR="$(dirname "${0}")"
# Check if SERENITY_KVM_SUPPORT is unset
if [ -z ${SERENITY_KVM_SUPPORT+x} ]; then
KVM_SUPPORT="0"
[ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && [ "$SERENITY_ARCH" != "aarch64" ] && KVM_SUPPORT="1"
[ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && [ "$SERENITY_ARCH" != "aarch64" ] && [ "$(uname -m)" != "aarch64" ] && KVM_SUPPORT="1"
else
KVM_SUPPORT="$SERENITY_KVM_SUPPORT"
fi