qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /dev/hwrng no such device


From: Peter Maydell
Subject: Re: /dev/hwrng no such device
Date: Thu, 6 Feb 2020 08:56:56 +0000

On Wed, 5 Feb 2020 at 22:03, Wesley Chow <address@hidden> wrote:
>
> I'm building a kernel suitable to boot Raspbian and a custom buildroot based 
> ARM OS via qemu-system-arm. Everything appears to work except for the 
> hardware rng device. I'm using a virt machine with:
>
>       -object rng-random,filename=/dev/urandom,id=rng0 -device 
> virtio-rng-pci,rng=rng0
>
> In both Raspbian and my own system, I see this:
>
> # cat /dev/hwrng
> cat: read error: No such device
>
> rng-tools can not read the device and doesn't start up properly, leaving my 
> entropy pool woefully low. The kernel I'm using is based off the rpi-4.19.y 
> branch (4.19.97) with additional config options set. Of relevance:
>
> CONFIG_PCI=y
> CONFIG_VIRTIO=y
> CONFIG_VIRTIO_PCI=y
> CONFIG_VIRTIO_BLK=y
> CONFIG_HW_RANDOM_VIRTIO=y
> CONFIG_CRYPTO_DEV_VIRTIO=y
> CONFIG_CRYPTO_HW=y
> CONFIG_CRYPTO_RNG2=y
> CONFIG_HW_RANDOM=y
>
> I honestly don't know which of these actually matter. I'm wondering, am I 
> missing something?

Are you using other PCI devices successfully? Do the kernel's
bootup messages include information about having successfully
found PCI devices? That will tell you whether you need to be
looking for "config switches related to PCI in general" or "config
switches related to RNG stuff".

In particular, make sure you have
CONFIG_PCI_HOST_GENERIC=y
 -- this is the switch that enables support for the virt board's PCI controller.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]