DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [DistroKit] [PATCH] platform-v7a: enable virtio hardware random number generator
Date: Mon, 30 Sep 2019 18:05:47 +0200	[thread overview]
Message-ID: <20190930160547.2628-1-m.olbrich@pengutronix.de> (raw)

This speeds up the first boot in qemu quite a bit when ssh keys are
generated.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 configs/platform-v7a/kernelconfig | 2 +-
 configs/platform-v7a/run          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index 6c982e133d3e..24c92d7ec015 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -1661,7 +1661,7 @@ CONFIG_HW_RANDOM=y
 # CONFIG_HW_RANDOM_TIMERIOMEM is not set
 CONFIG_HW_RANDOM_BCM2835=y
 CONFIG_HW_RANDOM_OMAP=y
-# CONFIG_HW_RANDOM_VIRTIO is not set
+CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_HW_RANDOM_IMX_RNGC=y
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
diff --git a/configs/platform-v7a/run b/configs/platform-v7a/run
index 7ff747fba4d4..935d63bf0f1e 100755
--- a/configs/platform-v7a/run
+++ b/configs/platform-v7a/run
@@ -80,6 +80,7 @@ QEMU_ARGS=( "${QEMU_ARGS[@]}" -rtc base=2000-01-01 )
 # Configure watchdog
 # no watchdog available on vexpress
 #QEMU_ARGS=( "${QEMU_ARGS[@]}" -watchdog i6300esb -watchdog-action poweroff )
+QEMU_ARGS=( "${QEMU_ARGS[@]}" -object rng-random,filename=/dev/random,id=rng0 -device virtio-rng-device,rng=rng0 )
 # SCSI bus
 QEMU_ARGS=( "${QEMU_ARGS[@]}" -device virtio-scsi-device,id=scsi )
 # Add virtual SCSI device if available
-- 
2.20.1


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

             reply	other threads:[~2019-09-30 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 16:05 Michael Olbrich [this message]
2019-09-30 21:49 ` Robert Schwebel

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=20190930160547.2628-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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