diff options
| author | Lukas Oesch <lukas.oesch@ost.ch> | 2026-06-10 10:40:46 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukas.oesch@ost.ch> | 2026-06-10 10:40:46 +0200 |
| commit | 33abd5cf264cb9e34121082105b0bc17b3cf7a36 (patch) | |
| tree | 36b15d53fea04f4f9d9af817100f7ad013bd9b5c /scripts/qemu-wrapper.sh | |
| parent | d01caf1c4aef3c89c68b9d1cc9fe56445f0860b5 (diff) | |
| parent | 7e27130c342b7299a1d2188a7192a7f17b5ac2ad (diff) | |
| download | kernel-33abd5cf264cb9e34121082105b0bc17b3cf7a36.tar.xz kernel-33abd5cf264cb9e34121082105b0bc17b3cf7a36.zip | |
Merge of BA-FS26 branch into develop
See merge request teachos/kernel!49
Diffstat (limited to 'scripts/qemu-wrapper.sh')
| -rwxr-xr-x | scripts/qemu-wrapper.sh | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/scripts/qemu-wrapper.sh b/scripts/qemu-wrapper.sh index fa89ac5..dd0200d 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" "64M" + "-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" |
