Skip to content

Commit 71866e4

Browse files
committed
qemu_template.sh: Allow parameters for VM pflash firmware
The qemu UEFI and regular qemu script only differ by having a default value for the firmware. If one tries to switch between different firmwares one normally would modify the script. Make it easier to switch boot modes and use custom firmwares by supporting a flag to set the pflash contents.
1 parent 48780dc commit 71866e4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build_library/qemu_template.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Options:
3131
-M MB Set VM memory in MBs.
3232
-T DIR Add a software TPM2 device through swtpm which stores secrets
3333
and the control socket to the given directory.
34+
-R FILE Set up pflash ro content, e.g., for UEFI (with -W).
35+
-W FILE Set up pflash rw content, e.g., for UEFI (with -R).
3436
-s Safe settings: single simple cpu and no KVM.
3537
-h this ;-)
3638
@@ -90,6 +92,12 @@ while [ $# -ge 1 ]; do
9092
-T|-tpm)
9193
SWTPM_DIR="$2"
9294
shift 2 ;;
95+
-R|-pflash-ro)
96+
VM_PFLASH_RO="$2"
97+
shift 2 ;;
98+
-W|-pflash-rw)
99+
VM_PFLASH_RW="$2"
100+
shift 2 ;;
93101
-v|-verbose)
94102
set -x
95103
shift ;;

0 commit comments

Comments
 (0)