From 40814eafb4528fe24440036315ce42cfee6359fb Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 28 Jul 2024 20:09:41 -0700 Subject: [PATCH] add gokrazy start script w/ qemu-system-x86_64 microvm Change-Id: I85c4d155c63b03fea84976c7a906fcaf93f7fc53 --- natlab/run-krazy.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 natlab/run-krazy.sh diff --git a/natlab/run-krazy.sh b/natlab/run-krazy.sh new file mode 100755 index 000000000..387c70135 --- /dev/null +++ b/natlab/run-krazy.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +echo "Type 'C-a c' to enter monitor; q to quit." + +set -eux +qemu-system-x86_64 -M microvm,isa-serial=off \ + -m 1G \ + -nodefaults -no-user-config -nographic \ + -kernel $HOME/src/github.com/tailscale/gokrazy-kernel/vmlinuz \ + -append "console=hvc0 root=PARTUUID=60c24cc1-f3f9-427a-8199-dd02023b0001/PARTNROFF=1 ro init=/gokrazy/init panic=10 oops=panic pci=off nousb tsc=unstable clocksource=hpet" \ + -drive id=blk0,file=$HOME/src/tailscale.com/gokrazy/tsapp.img,format=raw \ + -device virtio-blk-device,drive=blk0 \ + -netdev stream,id=net0,addr.type=unix,addr.path=/tmp/qemu.sock \ + -device virtio-serial-device \ + -device virtio-net-device,netdev=net0,mac=5a:94:ef:e4:0c:ee \ + -chardev stdio,id=virtiocon0,mux=on \ + -device virtconsole,chardev=virtiocon0 \ + -mon chardev=virtiocon0,mode=readline \ + -audio none +