Browse Source

qemu: use a TCP socket for 'make shell' w/ nc

K. Lange 5 years ago
parent
commit
c71ed6ab60
2 changed files with 3 additions and 2 deletions
  1. 2 1
      Makefile
  2. 1 1
      base/etc/startup.d/98_qemu_login.sh

+ 2 - 1
Makefile

@@ -335,7 +335,8 @@ shell: image.iso
 	  -nographic -no-reboot \
 	  -fw_cfg name=opt/org.toaruos.bootmode,string=headless \
 	  -fw_cfg name=opt/org.toaruos.forceuser,string=local \
-	  -fw_cfg name=opt/org.toaruos.term,string=${TERM}
+	  -fw_cfg name=opt/org.toaruos.term,string=${TERM} & \
+	  stty raw -echo && nc -l 8090 && stty sane && wait
 
 .PHONY: efi64
 efi64: image.iso

+ 1 - 1
base/etc/startup.d/98_qemu_login.sh

@@ -4,6 +4,6 @@ if not qemu-fwcfg -q opt/org.toaruos.forceuser then exit 0
 
 export-cmd TERM qemu-fwcfg opt/org.toaruos.term
 export-cmd QEMU_USER qemu-fwcfg opt/org.toaruos.forceuser
-/bin/getty -a "$QEMU_USER"
+/bin/petty -a "$QEMU_USER" "/dev/net/10.0.2.1:8090"
 reboot