aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-07 14:01:18 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-07 14:01:18 +0200
commit3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3 (patch)
tree9700ccca2924d263da341e141543507dd07a26a6 /scripts
parent482f431213b77b3ec72d4cfb5c77e23b34e8e68f (diff)
downloadteachos-3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3.tar.xz
teachos-3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3.zip
ide: simplify overall configuration
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qemu-wrapper.sh30
1 files changed, 28 insertions, 2 deletions
diff --git a/scripts/qemu-wrapper.sh b/scripts/qemu-wrapper.sh
index fa89ac5..49c01ec 100755
--- a/scripts/qemu-wrapper.sh
+++ b/scripts/qemu-wrapper.sh
@@ -1,4 +1,30 @@
#!/bin/bash
+# scripts/qemu-wrapper.sh
-echo "QEMU WRAPPER"
-qemu-system-x86_64 $@
+WORKSPACE_DIR=${1:-.}
+BUILD_TYPE=${2:-Debug}
+ISO_PATH=$3
+IS_DEBUG=${4:-0}
+
+if [ -z "$ISO_PATH" ]; then
+ echo "Usage: $0 <workspace_dir> <build_type> <iso_path> [is_debug]"
+ exit 1
+fi
+
+ARGS=(
+ "-m" "32M"
+ "-machine" "q35"
+ "-smp" "4,sockets=1,cores=4,threads=1"
+ "-display" "curses"
+ "-debugcon" "file:${WORKSPACE_DIR}/qemu-debugcon-${BUILD_TYPE}.log"
+ "-cdrom" "${ISO_PATH}"
+)
+
+if [ "$IS_DEBUG" == "1" ]; then
+ ARGS=( "-s" "-no-reboot" "-d" "int,cpu_reset" "${ARGS[@]}" )
+fi
+
+echo "QEMU WRAPPER: Executing TeachOS"
+echo "Arguments: ${ARGS[@]}"
+
+qemu-system-x86_64 "${ARGS[@]}" 2> "${WORKSPACE_DIR}/qemu-stderr-${BUILD_TYPE}.log"