BuildSystem: Run kvm-ok to determine kvm access

This commit is contained in:
Bananymous 2024-06-10 15:54:09 +03:00
parent 530c259e71
commit 7bb1a3906d
2 changed files with 6 additions and 2 deletions

View File

@ -60,7 +60,7 @@ Each major component and library has its own subdirectory (kernel, userspace, li
### Needed packages ### Needed packages
#### apt (tested on ubuntu 22.04) #### apt (tested on ubuntu 22.04)
```# apt install build-essential git ninja-build texinfo bison flex libgmp-dev libmpfr-dev libmpc-dev parted qemu-system-x86``` ```# apt install build-essential git ninja-build texinfo bison flex libgmp-dev libmpfr-dev libmpc-dev parted qemu-system-x86 cpu-checker```
#### pacman #### pacman
```# pacman -S --needed base-devel git wget cmake ninja parted qemu-system-x86``` ```# pacman -S --needed base-devel git wget cmake ninja parted qemu-system-x86```

View File

@ -60,7 +60,11 @@ run_bochs () {
$BANAN_SCRIPT_DIR/bochs.sh $@ $BANAN_SCRIPT_DIR/bochs.sh $@
} }
if [[ -c /dev/kvm ]]; then if type kvm-ok &> /dev/null; then
if kvm-ok &> /dev/null; then
QEMU_ACCEL="-accel kvm"
fi
elif [[ -c /dev/kvm ]]; then
if [[ -r /dev/kvm ]] && [[ -w /dev/kvm ]]; then if [[ -r /dev/kvm ]] && [[ -w /dev/kvm ]]; then
QEMU_ACCEL="-accel kvm" QEMU_ACCEL="-accel kvm"
else else