#!/bin/sh #qemu-system-x86_64 -fda DiskImage.img -boot a -serial stdio -net user,hostname=prelude,dns=10.0.2.1 -net nic,model=ne2k_pci -vga std QEMU=qemu-system-x86_64 USE_GDB= BOOTOPT="-fda DiskImage.img -boot a" QEMU_PARAMS="" QEMU_PARAMS=$QEMU_PARAMS" -hda AcessHDD.img" QEMU_PARAMS=$QEMU_PARAMS" -vga std" QEMU_PARAMS=$QEMU_PARAMS" -smp 2" QEMU_PARAMS=$QEMU_PARAMS" -net nic" _NETTYPE="user" while [ $# -ne 0 ]; do case $1 in -gdb) QEMU_PARAMS=$QEMU_PARAMS" -s -S" ;; -dbin) shift if [ "x$2" = "xdefault" ] || [ "x$2" = "x" ]; then _kfile="KernelLand/Acess2.$1.bin" else _kfile="KernelLand/Acess2.$1-$2.bin" fi BOOTOPT="-kernel $_kfile" BOOTOPT=$BOOTOPT" -initrd KernelLand/Modules/Filesystems/FS_InitRD.kmd.$1 -append \"$3\"" shift shift ;; -dbgbin) QEMU=/home/tpg/apps/bin/qemu-system-x86_64 ;; -bin) shift QEMU=$1 ;; -dbgscript) QEMU="echo $QEMU" ;; -extramem) QEMU_PARAMS=$QEMU_PARAMS" -m 768" ;; -e) shift QEMU_PARAMS=$QEMU_PARAMS" "$1 ;; -fwd) _NETTYPE=$_NETTYPE",hostfwd=tcp::10023-10.0.2.10:23" ;; -tuntap) _NETTYPE="tap" ;; -nousb) _NOUSB="yes" ;; -notee) _NOTEE="yes" ;; -nographic) _NOGRAPHIC="yes" ;; esac shift done QEMU_PARAMS=$QEMU_PARAMS" -net "$_NETTYPE if [ "x$_NOUSB" != "xyes" ] ; then QEMU_PARAMS=$QEMU_PARAMS" -usb" QEMU_PARAMS=$QEMU_PARAMS" -device usb-ehci" QEMU_PARAMS=$QEMU_PARAMS" -drive id=test_usb_image,file=USB_Test_Image.img,if=none" QEMU_PARAMS=$QEMU_PARAMS" -device usb-storage,drive=test_usb_image" QEMU_PARAMS=$QEMU_PARAMS" -usbdevice mouse" QEMU_PARAMS=$QEMU_PARAMS" -usbdevice keyboard" fi # /home/tpg/apps/bin/qemu-system-x86_64 $QEMU_PARAMS -serial stdio -serial file:QemuLog.txt # qemu-system-x86_64 $QEMU_PARAMS -serial stdio | tee QemuLog.txt #echo $QEMU $BOOTOPT $QEMU_PARAMS if [ "x$_NOGRAPHIC" = "xyes" ] ; then $QEMU $BOOTOPT $QEMU_PARAMS -nographic exit fi if [ "x$_NOTEE" = "xyes" ] ; then $QEMU $BOOTOPT $QEMU_PARAMS -serial stdio exit fi eval $QEMU $BOOTOPT $QEMU_PARAMS -serial stdio | tee QemuLog.txt