From: Erik van der Kouwe Date: Sun, 22 Jun 2014 07:07:27 +0000 (-0700) Subject: Fix LLVM clientctl: if the kvm command is not available, just use QEMU directly X-Git-Tag: v3.3.0~146 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch09.html?a=commitdiff_plain;h=d7b27ed4f9393beae84bb0a6718d8532af39578b;p=minix.git Fix LLVM clientctl: if the kvm command is not available, just use QEMU directly --- diff --git a/minix/llvm/clientctl b/minix/llvm/clientctl index 08b7a4508..d5cf4b764 100755 --- a/minix/llvm/clientctl +++ b/minix/llvm/clientctl @@ -11,7 +11,12 @@ case "$mode" in (cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh) ;; 'run') - (cd ../../../obj.i386/destdir.i386/multiboot && kvm -nographic -kernel kernel -append "console=tty00 rootdevname=c0d0p1" -initrd "mod01_ds,mod02_rs,mod03_pm,mod04_sched,mod05_vfs,mod06_memory,mod07_tty,mod08_mfs,mod09_vm,mod10_pfs,mod11_init" -hda $IMAGE) + if which kvm > /dev/null; then + hypervisor=kvm + else + hypervisor="qemu-system-i386 --enable-kvm" + fi + (cd ../../../obj.i386/destdir.i386/multiboot && $hypervisor -nographic -kernel kernel -append "console=tty00 rootdevname=c0d0p1" -initrd "mod01_ds,mod02_rs,mod03_pm,mod04_sched,mod05_vfs,mod06_memory,mod07_tty,mod08_mfs,mod09_vm,mod10_pfs,mod11_init" -hda $IMAGE) ;; *) echo "Invalid action: $mode"