Browse Source

getty: Pass more args through 'headless' make target

K. Lange 5 months ago
parent
commit
888323bcea
2 changed files with 6 additions and 3 deletions
  1. 3 2
      Makefile
  2. 3 1
      base/etc/startup.d/99_runstart.sh

+ 3 - 2
Makefile

@@ -329,10 +329,11 @@ fast: image.iso
 
 .PHONY: headless
 headless: image.iso
-	@qemu-system-i386 -cdrom $< ${QEMU_ARGS} \
+	@qemu-system-i386 -cdrom $< -m 1G ${KVM} -rtc base=localtime ${QEMU_EXTRA} \
+	  -serial null -serial mon:stdio \
 	  -nographic -no-reboot -audiodev none,id=id \
 	  -fw_cfg name=opt/org.toaruos.bootmode,string=headless \
-	  -fw_cfg name=etc/sercon-port,string=0
+	  -fw_cfg name=opt/org.toaruos.gettyargs,string="-a local /dev/ttyS1"
 
 .PHONY: shell
 shell: image.iso

+ 3 - 1
base/etc/startup.d/99_runstart.sh

@@ -6,10 +6,12 @@ export-cmd START kcmdline -g start
 export USER=root
 export HOME=/home/root
 
+export-cmd GETTY_ARGS qemu-fwcfg opt/org.toaruos.gettyargs
+
 echo -n "Launching startup application..." > /dev/pex/splash
 echo -n "!quit" > /dev/pex/splash
 
 if equals? "$START" "--vga" then exec /bin/terminal-vga -l
-if equals? "$START" "--headless" then exec /bin/getty
+if equals? "$START" "--headless" then exec /bin/getty ${GETTY_ARGS}
 if empty? "$START" then exec /bin/compositor else exec /bin/compositor $START