From 296b6d85290606c0f28549c9d6f356229c73a977 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 11 Jan 2023 20:18:08 +0200 Subject: [PATCH] bochs.sh now launches a seperate terminal to which it redirects com1 --- bochs.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/bochs.sh b/bochs.sh index cf0549abab..ca9354ae49 100755 --- a/bochs.sh +++ b/bochs.sh @@ -2,14 +2,28 @@ set -e . ./iso.sh -cat > bochsrc << EOF +BOCHS_CONFIG_FILE=bochsrc +COM1_TERMINAL=kitty +COM1_DEVICE_FILE=com1-term-device + +$COM1_TERMINAL sh -c "tty > $COM1_DEVICE_FILE && sleep infinity" & +COM1_TERM_PID=$(echo $!) + +sleep 1 + +COM1_DEVICE=$(cat $COM1_DEVICE_FILE) +rm $COM1_DEVICE_FILE + +cat > $BOCHS_CONFIG_FILE << EOF ata0-master: type=cdrom, path=banan-os.iso, status=inserted boot: cdrom clock: sync=realtime, time0=local display_library: x, options="gui_debug" magic_break: enabled=1 megs: 128 -com1: enabled=1, mode=term, dev=/dev/pts/2 +com1: enabled=1, mode=term, dev=$COM1_DEVICE EOF -bochs -q +bochs -qf $BOCHS_CONFIG_FILE +kill $COM1_TERM_PID +rm $BOCHS_CONFIG_FILE \ No newline at end of file