aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu4
-rwxr-xr-xscripts/runqemu-internal8
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 09c507dc7a..82711606f6 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -68,6 +68,7 @@ SCRIPT_QEMU_OPT=""
SCRIPT_QEMU_EXTRA_OPT=""
SCRIPT_KERNEL_OPT=""
SERIALSTDIO=""
+TCPSERIAL_PORTNUM=""
KVM_ENABLED="no"
KVM_ACTIVE="no"
@@ -150,6 +151,9 @@ while true; do
SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
SERIALSTDIO="1"
;;
+ "tcpserial="*)
+ TCPSERIAL_PORTNUM=${arg##tcpserial=}
+ ;;
"biosdir="*)
CUSTOMBIOSDIR="${arg##biosdir=}"
;;
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index d743322037..b317358f94 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -620,6 +620,14 @@ if [ "x$QEMUOPTIONS" = "x" ]; then
return 1
fi
+if [ $TCPSERIAL_PORTNUM != "" ]; then
+ if [ "$MACHINE" = "qemuarm64" ]; then
+ QEMUOPTIONS="$QEMUOPTIONS -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon"
+ else
+ QEMUOPTIONS="$QEMUOPTIONS -serial tcp:127.0.0.1:$TCPSERIAL_PORTNUM"
+ fi
+fi
+
PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$PATH
QEMUBIN=`which $QEMU 2> /dev/null`