cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
From: sven.schultschik@siemens.com
To: cip-dev@lists.cip-project.org
Cc: jan.kiszka@siemens.com, Sven Schultschik <sven.schultschik@siemens.com>
Subject: [isar-cip-core][PATCH 6/7] enhance start-qemu.sh for arm64 secure boot
Date: Wed, 19 Oct 2022 11:21:16 +0200	[thread overview]
Message-ID: <20221019092117.5291-6-sven.schultschik@siemens.com> (raw)
In-Reply-To: <20221019092117.5291-1-sven.schultschik@siemens.com>

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

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@siemens.com>
---
 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



  parent reply	other threads:[~2022-10-19  9:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19  9:21 [isar-cip-core][PATCH 1/7] add recipe for optee qemu arm64 sven.schultschik
2022-10-19  9:21 ` [isar-cip-core][PATCH 2/7] add recipe for for edk2 sven.schultschik
2022-10-19 10:57   ` Jan Kiszka
2022-10-19 13:14     ` AW: " Schultschik, Sven
2022-10-19 13:21       ` Jan Kiszka
2022-10-20 17:59         ` AW: " Schultschik, Sven
2022-10-20 16:24     ` Schultschik, Sven
2022-10-21  6:57       ` Jan Kiszka
2022-10-19  9:21 ` [isar-cip-core][PATCH 3/7] add recipe for trusted firmware a qemu arm64 sven.schultschik
2022-10-19  9:21 ` [isar-cip-core][PATCH 4/7] add u-boot patch for qemu to support RPMB sven.schultschik
2022-10-19  9:21 ` [isar-cip-core][PATCH 5/7] add kas files for building qemu secure boot images sven.schultschik
2022-10-19  9:21 ` sven.schultschik [this message]
2022-10-19  9:21 ` [isar-cip-core][PATCH 7/7] no merge - manually instructions test secure boot sven.schultschik
2022-10-19 10:44 ` [isar-cip-core][PATCH 1/7] add recipe for optee qemu arm64 Jan Kiszka
2022-10-19 10:46   ` Jan Kiszka
2022-10-19 13:05   ` AW: " Schultschik, Sven
2022-10-19 13:14     ` Jan Kiszka
2022-10-19 13:21   ` AW: " Schultschik, Sven
2022-10-19 13:24     ` Jan Kiszka
2022-11-23 15:28 [isar-cip-core][PATCH 0/7] Secureboot on QEMU with EDK2, OP-TEE and RPMB sven.schultschik
2022-11-23 15:29 ` [isar-cip-core][PATCH 6/7] enhance start-qemu.sh for arm64 secure boot sven.schultschik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019092117.5291-6-sven.schultschik@siemens.com \
    --to=sven.schultschik@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).