1

Add build/run scripts

This commit is contained in:
2022-12-07 16:40:51 +01:00
parent f304e7f239
commit fd0594323e
2 changed files with 34 additions and 0 deletions

19
run.sh Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
QEMU_BIN="qemu-system-i386"
QEMU_MACHINE="pc"
QEMU_CPU="base"
QEMU_RAM="128M"
QEMU_ARGS="-drive format=raw,file=./bootdisk.vmi -boot a -k en-us -vga std -serial stdio" # or -monitor stdio
QEMU_AUDIO_ARGS="-audiodev id=pa,driver=pa -machine pcspk-audiodev=pa"
QEMU_GDB_PORT=""
command="${QEMU_BIN} -machine ${QEMU_MACHINE} -m ${QEMU_RAM} -cpu ${QEMU_CPU} ${QEMU_ARGS} ${QEMU_AUDIO_ARGS}"
printf "Running: %s\\n" "${command}"
if [ -n "${QEMU_GDB_PORT}" ]; then
$command -gdb tcp::"${QEMU_GDB_PORT}" -S &
else
$command
fi