From 5e7b4b6b3d7ee99135ec63605a17c7b3d1a174ba Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Thu, 4 Apr 2024 13:50:31 +0900 Subject: [PATCH] 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. --- build_library/qemu_template.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build_library/qemu_template.sh b/build_library/qemu_template.sh index b7f9912e3e..2c40641f96 100755 --- a/build_library/qemu_template.sh +++ b/build_library/qemu_template.sh @@ -35,6 +35,8 @@ Options: (see https://github.com/stefanberger/swtpm/wiki/Certificates-created-by-swtpm_setup). -R FILE Set up pflash ro content, e.g., for UEFI (with -W). -W FILE Set up pflash rw content, e.g., for UEFI (with -R). + -K FILE Set kernel for direct boot used to simulate a PXE boot (with -R). + -R FILE Set initrd for direct boot used to simulate a PXE boot (with -K). -s Safe settings: single simple cpu and no KVM. -h this ;-) @@ -100,6 +102,12 @@ while [ $# -ge 1 ]; do -W|-pflash-rw) VM_PFLASH_RW="$2" shift 2 ;; + -K|-kernel-file) + VM_KERNEL="$2" + shift 2 ;; + -R|-initrd-file) + VM_INITRD="$2" + shift 2 ;; -v|-verbose) set -x shift ;;