bochs.sh now launches a seperate terminal to which it redirects com1

This commit is contained in:
Bananymous 2023-01-11 20:18:08 +02:00
parent d02e3b19c7
commit 296b6d8529
1 changed files with 17 additions and 3 deletions

View File

@ -2,14 +2,28 @@
set -e set -e
. ./iso.sh . ./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 ata0-master: type=cdrom, path=banan-os.iso, status=inserted
boot: cdrom boot: cdrom
clock: sync=realtime, time0=local clock: sync=realtime, time0=local
display_library: x, options="gui_debug" display_library: x, options="gui_debug"
magic_break: enabled=1 magic_break: enabled=1
megs: 128 megs: 128
com1: enabled=1, mode=term, dev=/dev/pts/2 com1: enabled=1, mode=term, dev=$COM1_DEVICE
EOF EOF
bochs -q bochs -qf $BOCHS_CONFIG_FILE
kill $COM1_TERM_PID
rm $BOCHS_CONFIG_FILE