Skip to content

Commit 5e7b4b6

Browse files
committed
qemu_template.sh: Allow parameters for kernel and initrd
With the PXE script it is easy to boot different versions from one folder without any copies because the kernel and PXE initrd are always "fresh". Instead of only supporting hardcoded file names, support parameters for the kernel and initrd file to be used.
1 parent 9d3200b commit 5e7b4b6

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
@@ -35,6 +35,8 @@ Options:
3535
(see https://github.com/stefanberger/swtpm/wiki/Certificates-created-by-swtpm_setup).
3636
-R FILE Set up pflash ro content, e.g., for UEFI (with -W).
3737
-W FILE Set up pflash rw content, e.g., for UEFI (with -R).
38+
-K FILE Set kernel for direct boot used to simulate a PXE boot (with -R).
39+
-R FILE Set initrd for direct boot used to simulate a PXE boot (with -K).
3840
-s Safe settings: single simple cpu and no KVM.
3941
-h this ;-)
4042
@@ -100,6 +102,12 @@ while [ $# -ge 1 ]; do
100102
-W|-pflash-rw)
101103
VM_PFLASH_RW="$2"
102104
shift 2 ;;
105+
-K|-kernel-file)
106+
VM_KERNEL="$2"
107+
shift 2 ;;
108+
-R|-initrd-file)
109+
VM_INITRD="$2"
110+
shift 2 ;;
103111
-v|-verbose)
104112
set -x
105113
shift ;;

0 commit comments

Comments
 (0)