diff mbox series

[isar-cip-core,1/3] fix(start-efishell): argument passing to qemu

Message ID 20230523051846.1007400-2-felix.moessbauer@siemens.com (mailing list archive)
State Accepted
Headers show
Series Various fixes in SB workflow and docs | expand

Commit Message

MOESSBAUER, Felix May 23, 2023, 5:18 a.m. UTC
In commit 0129baec findings by shellcheck have been adressed. However,
this broke the QEMU arguments, as these do not allow to pass quoted
strings. By that, the deployment of secoure boot keys was broken.

To avoid similar issues in the future, we revert the code, disable the
shellcheck warning and add a note on the reason. In addition, the
format / driver of the disk is specified explicitly to avoid a warning
during startup.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 scripts/start-efishell.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/scripts/start-efishell.sh b/scripts/start-efishell.sh
index 5ec85e0..fff8a6a 100755
--- a/scripts/start-efishell.sh
+++ b/scripts/start-efishell.sh
@@ -5,11 +5,14 @@  set -e
 ovmf_code=${OVMF_CODE:-/usr/share/OVMF/OVMF_CODE_4M.secboot.fd}
 ovmf_vars=${OVMF_VARS:-./OVMF_VARS_4M.fd}
 DISK=$1
+
+# QEMU is very picky about how arguments are passed (strings must not be quoted).
+# shellcheck disable=SC2086
 qemu-system-x86_64 -enable-kvm -M q35 -nographic \
                    -cpu host,hv_relaxed,hv_vapic,hv-spinlocks=0xfff -smp 2 -m 2G -no-hpet \
                    -global ICH9-LPC.disable_s3=1 \
                    -global isa-fdc.driveA= \
                    -boot menu=on \
-                   -drive if=pflash,format=raw,unit=0,readonly=on,file="${ovmf_code}" \
-                   -drive if=pflash,format=raw,file="${ovmf_vars}" \
-                   -drive file=fat:rw:"$DISK"
+                   -drive if=pflash,format=raw,unit=0,readonly=on,file=${ovmf_code} \
+                   -drive if=pflash,format=raw,file=${ovmf_vars} \
+                   -drive file=fat:rw:$DISK,driver=vvfat