-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·67 lines (51 loc) · 1.06 KB
/
run
File metadata and controls
executable file
·67 lines (51 loc) · 1.06 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
[ -f conf/conf.sh ] && source conf/conf.sh
find_qemu() {
[ -n "$QEMU" ] && return
local b=qemu-system-x86_64
QEMU=$HOME/CE/bin/$b
[ -x "$QEMU" ] && return
QEMU=/usr/local/CE/bin/$b
[ -x "$QEMU" ] && return
QEMU=$b
}
cmd=
find_qemu
CEHDPATH=${CEHDPATH:-$HOME/CE/share/hd.img}
QEMU_BOOT=${QEMU_BOOT:-$HOME/CE/lib/ce/boot.bin}
source util/start.mk
if [ -n "$QEMU_FIFOS" ]; then
for f in $QEMU_FIFOS; do
rm -f $f.in $f.out
mkfifo $f.in $f.out
done
fi
cmd="$QEMU_PRE_CMD $QEMU \
-kernel $QEMU_BOOT \
-initrd build/sistema \
-drive file=.swap,format=raw,index=0,cache=unsafe \
-no-reboot \
-ctrl-grab \
$QEMU_EXTRA_OPTIONS \
-m $MEM"
if [ "$1" == -g ]; then
cmd="$cmd -s -append \"-s\""
shift
fi
trap 'stty sane' exit
if [ "$AUTOCORR" == 1 ]; then
cmd="$cmd -nographic"
else
cmd="$cmd -serial stdio"
fi
if [ -f "$CEHDPATH" ]; then
cmd="$cmd -drive file=\"$CEHDPATH\",index=2,format=raw"
fi
cmd="$cmd $@"
if [ -n "$CERAW" ]; then
show_log=
else
show_log=${QEMU_POST_CMD:-"| util/show_log.pl"}
fi
echo Eseguo: $cmd
eval $cmd $show_log