-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·52 lines (46 loc) · 1.17 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
. ./shlib/platform.sh
./build.sh
# sudo chmod 644 c.img
#./build.sh && qemu-system-x86_64 -d int -overcommit cpu-pm=on -m 8192 -enable-kvm c.img
if [ "$WSL" != "" ]; then
echo "WSL"
sudo qemu-system-x86_64 \
-serial stdio \
-m 8192M \
-smp 4 \
-drive format=raw,media=disk,file=c.img
# sudo qemu-system-x86_64 \
# -serial stdio \
# -m 8192 \
# -enable-kvm \
# -smp 4 \
# -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
# -drive format=raw,media=disk,file=c.img
# if [ -e "/mnt/c/dev/bare.log" ]; then
# mv /mnt/c/dev/bare.log /mnt/c/dev/bare.log.1
# fi
# "$VBOX/VBoxManage.exe" \
# startvm \
# bare
# tail -f /mnt/c/dev/bare.log
else
if [ $platform = "macos" ]; then
qemu-system-x86_64 \
-serial stdio \
-m 8G \
-accel hvf \
-smp 4 \
-cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
c.img
else
sudo qemu-system-x86_64 \
-serial stdio \
-m 8G \
-enable-kvm \
-smp 4 \
-cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
-drive format=raw,media=disk,file=c.img
fi
fi