]> Zhao Yanbai Git Server - minix.git/commitdiff
llvm: Add the serverctl script.
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Wed, 18 Jun 2014 11:57:16 +0000 (13:57 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:06:07 +0000 (17:06 +0200)
minix/llvm/serverctl [new file with mode: 0755]

diff --git a/minix/llvm/serverctl b/minix/llvm/serverctl
new file mode 100755 (executable)
index 0000000..062c7c8
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+mode=$1
+shift || mode="no_action"
+
+ROOT=../..
+IMAGE=$( readlink -f $ROOT/minix_x86.img)
+
+case "$mode" in
+  'buildimage')
+    (cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh)
+    ;;
+  'start')
+    (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)
+    ;;
+  *)
+    echo "Invalid action: $mode"
+    exit 1
+    ;;
+esac