summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-05 14:42:00 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-05 14:46:54 +0100
commita2a2fc564ebffe5171c991a77dc65206dedae855 (patch)
treeb1069070a12475156d740bb16b6085312ddf2557
parent5e035b64188e8e319bf5509358c95443fbd979f7 (diff)
downloadspectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar.gz
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar.bz2
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar.lz
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar.xz
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.tar.zst
spectrum-a2a2fc564ebffe5171c991a77dc65206dedae855.zip
vm: send cloud-hypervisor serial output to file
This didn't originally go to a file, because I still had to use the
serial console interactively for debugging sometimes.  Now that things
have settled a bit and the serial console is write-only, having serial
go to a pty is just needlessly inconvenient.

I've updated the crosvm target to put its logs in the same place, so
the path to serial logs only has to be learned once.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
-rw-r--r--img/app/Makefile4
-rw-r--r--vm/sys/net/Makefile4
2 files changed, 4 insertions, 4 deletions
diff --git a/img/app/Makefile b/img/app/Makefile
index 6d9211e..fa8a07c 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -130,7 +130,7 @@ run-cloud-hypervisor: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-vi
 	    --kernel $(KERNEL) \
 	    --cmdline "root=PARTLABEL=root" \
 	    --console tty \
-	    --serial pty
+	    --serial file=build/serial.log
 .PHONY: run-cloud-hypervisor
 
 run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
@@ -141,7 +141,7 @@ run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
 	    --net tap-name=tap0 \
 	    --vhost-user-fs build/virtiofsd.sock:virtiofs0 \
 	    --vhost-user-gpu build/vhost-user-gpu.sock \
-	    --serial type=file,hardware=serial,path=build/crosvm.log \
+	    --serial type=file,hardware=serial,path=build/serial.log \
 	    --serial type=stdout,hardware=virtio-console,stdin=true \
 	    $(KERNEL)
 .PHONY: run-crosvm
diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index 2cdeae1..6e5c651 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -124,7 +124,7 @@ run-cloud-hypervisor: build/host/data/netvm/blk/root.img
 	    --kernel $(KERNEL) \
 	    --cmdline "root=PARTLABEL=root" \
 	    --console tty \
-	    --serial pty
+	    --serial file=build/serial.log
 .PHONY: run-cloud-hypervisor
 
 run-crosvm: build/host/data/netvm/blk/root.img
@@ -133,7 +133,7 @@ run-crosvm: build/host/data/netvm/blk/root.img
 	    -p "console=ttyS0 root=PARTLABEL=root" \
 	    --net tap-name=tap0 \
 	    --net tap-name=tap1,mac=0A:B3:EC:80:00:00 \
-	    --serial type=file,hardware=serial,path=build/crosvm.log \
+	    --serial type=file,hardware=serial,path=build/serial.log \
 	    --serial type=stdout,hardware=virtio-console,stdin=true \
 	    $(KERNEL)
 .PHONY: run-crosvm