2018-10-16 09:01:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-05-04 00:51:50 +00:00
|
|
|
[ -z "$SERENITY_QEMU_BIN" ] && SERENITY_QEMU_BIN="qemu-system-i386"
|
|
|
|
|
2019-06-02 07:50:18 +00:00
|
|
|
SERENITY_KERNEL_CMDLINE="hello"
|
|
|
|
|
2019-05-01 19:45:17 +00:00
|
|
|
export SDL_VIDEO_X11_DGAMOUSE=0
|
2019-03-27 12:02:29 +00:00
|
|
|
ram_size=128
|
|
|
|
|
2019-03-11 11:43:45 +00:00
|
|
|
if [ "$1" = "b" ]; then
|
|
|
|
# ./run b: bochs
|
|
|
|
bochs -q -f .bochsrc
|
|
|
|
elif [ "$1" = "qn" ]; then
|
|
|
|
# ./run qn: qemu without network
|
2019-05-04 00:51:50 +00:00
|
|
|
$SERENITY_QEMU_BIN -s -m $ram_size \
|
2019-04-24 19:06:16 +00:00
|
|
|
$SERENITY_EXTRA_QEMU_ARGS \
|
2019-05-17 16:19:03 +00:00
|
|
|
-d cpu_reset,guest_errors \
|
2019-05-24 12:02:17 +00:00
|
|
|
-device VGA,vgamem_mb=64 \
|
2019-05-23 18:57:32 +00:00
|
|
|
-debugcon stdio \
|
2019-04-24 19:06:16 +00:00
|
|
|
-device e1000 \
|
2019-06-02 08:58:59 +00:00
|
|
|
-hda _disk_image \
|
2019-05-15 19:40:41 +00:00
|
|
|
-soundhw pcspk
|
2019-03-13 02:26:01 +00:00
|
|
|
elif [ "$1" = "qtap" ]; then
|
|
|
|
# ./run qtap: qemu with tap
|
2019-05-04 00:51:50 +00:00
|
|
|
sudo $SERENITY_QEMU_BIN -s -m $ram_size \
|
2019-04-24 19:06:16 +00:00
|
|
|
$SERENITY_EXTRA_QEMU_ARGS \
|
2019-05-17 16:19:03 +00:00
|
|
|
-d cpu_reset,guest_errors \
|
2019-05-24 12:02:17 +00:00
|
|
|
-device VGA,vgamem_mb=64 \
|
2019-05-23 18:57:32 +00:00
|
|
|
-debugcon stdio \
|
2019-04-24 19:06:16 +00:00
|
|
|
-object filter-dump,id=hue,netdev=br0,file=e1000.pcap \
|
|
|
|
-netdev tap,ifname=tap0,id=br0 \
|
|
|
|
-device e1000,netdev=br0 \
|
2019-06-02 08:58:59 +00:00
|
|
|
-hda _disk_image \
|
2019-05-15 19:40:41 +00:00
|
|
|
-soundhw pcspk
|
2019-03-13 02:26:01 +00:00
|
|
|
else
|
|
|
|
# ./run: qemu with user networking
|
2019-05-04 00:51:50 +00:00
|
|
|
$SERENITY_QEMU_BIN -s -m $ram_size \
|
2019-04-24 19:06:16 +00:00
|
|
|
$SERENITY_EXTRA_QEMU_ARGS \
|
2019-05-17 16:19:03 +00:00
|
|
|
-d cpu_reset,guest_errors \
|
2019-05-24 12:02:17 +00:00
|
|
|
-device VGA,vgamem_mb=64 \
|
2019-05-23 18:57:32 +00:00
|
|
|
-debugcon stdio \
|
2019-03-13 16:17:07 +00:00
|
|
|
-object filter-dump,id=hue,netdev=breh,file=e1000.pcap \
|
|
|
|
-netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-192.168.5.2:8888 \
|
|
|
|
-device e1000,netdev=breh \
|
2019-06-02 08:58:59 +00:00
|
|
|
-hda _disk_image \
|
2019-05-15 19:40:41 +00:00
|
|
|
-soundhw pcspk
|
2018-10-17 14:58:35 +00:00
|
|
|
fi
|
2018-10-16 09:01:38 +00:00
|
|
|
|