]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix LLVM clientctl: if the kvm command is not available, just use QEMU directly
authorErik van der Kouwe <erik@minix3.org>
Sun, 22 Jun 2014 07:07:27 +0000 (00:07 -0700)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:06:09 +0000 (17:06 +0200)
minix/llvm/clientctl

index 08b7a4508000fa97b1b91f612ebca9307b1cf6db..d5cf4b7641040f1b49efc0ef8c6a8f7739637030 100755 (executable)
@@ -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"