[isar-cip-core][PATCH 6/7] enhance start-qemu.sh for arm64 secure boot


Schultschik, Sven
 

From: Sven Schultschik <sven.schultschik@...>

The start-qemu shell script need some adjustments to switch on secure in the machine statement and adds the virtual random number generator if secure boot is enabled.

Signed-off-by: Sven Schultschik <sven.schultschik@...>
---
start-qemu.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/start-qemu.sh b/start-qemu.sh
index dd16aed98..18946a6c9 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -80,13 +80,22 @@ case "${arch}" in
QEMU_EXTRA_ARGS=" \
-cpu cortex-a57 \
-smp 4 \
- -machine virt \
-device virtio-serial-device \
-device virtconsole,chardev=con -chardev vc,id=con \
-device virtio-blk-device,drive=disk \
-device virtio-net-device,netdev=net"
KERNEL_CMDLINE=" \
root=/dev/vda rw"
+ if [ -n "${SECURE_BOOT}" ]; then
+ QEMU_EXTRA_ARGS=" \
+ ${QEMU_EXTRA_ARGS} \
+ -machine virt,secure=on \
+ -device virtio-rng-device"
+ else
+ QEMU_EXTRA_ARGS=" \
+ ${QEMU_EXTRA_ARGS} \
+ -machine virt"
+ fi
;;
arm|armhf)
QEMU_ARCH=arm
--
2.30.2