blob: 4aa2d9cee3b1ce52398a7b49c358822a0a27eefd [file] [log] [blame]
Lorenz Brunf95909d2019-09-11 19:48:26 +02001#!/bin/sh
2
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02003swtpm socket --tpmstate dir=core/tpm --ctrl type=unixio,path=tpm-socket --tpm2 &
Lorenz Brunf95909d2019-09-11 19:48:26 +02004
Leopold Schabel67f9d092019-10-22 15:41:42 +02005qemu-system-x86_64 \
6 -cpu host -smp sockets=1,cpus=1,cores=2,threads=2,maxcpus=4 -m 1024 -machine q35 -enable-kvm -nographic -nodefaults \
Leopold Schabel5c80aca2019-10-22 15:48:58 +02007 -drive if=pflash,format=raw,readonly,file=external/edk2/OVMF_CODE.fd \
8 -drive if=pflash,format=raw,snapshot=on,file=external/edk2/OVMF_VARS.fd \
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02009 -drive if=virtio,format=raw,snapshot=on,cache=unsafe,file=core/smalltown.img \
Lorenz Brunf95909d2019-09-11 19:48:26 +020010 -netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \
11 -device virtio-net-pci,netdev=net0 \
Leopold Schabel5c80aca2019-10-22 15:48:58 +020012 -chardev socket,id=chrtpm,path=tpm-socket \
Lorenz Brunf95909d2019-09-11 19:48:26 +020013 -tpmdev emulator,id=tpm0,chardev=chrtpm \
14 -device tpm-tis,tpmdev=tpm0 \
Leopold Schabel5c80aca2019-10-22 15:48:58 +020015 -debugcon file:debug.log \
Lorenz Brunf95909d2019-09-11 19:48:26 +020016 -global isa-debugcon.iobase=0x402 \
17 -device ipmi-bmc-sim,id=ipmi0 \
18 -device virtio-rng-pci \
Leopold Schabel67f9d092019-10-22 15:41:42 +020019 -serial mon:stdio