[PATCH v3 6/8] cmd: rng: Add support for selecting RNG device

Simon Glass sjg at chromium.org
Wed Mar 9 03:35:45 CET 2022


Hi Sughosh,

On Fri, 4 Mar 2022 at 06:35, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
>
> The 'rng' u-boot command is used for printing a select number of
> random bytes on the console. Currently, the RNG device from which the
> random bytes are read is fixed. However, a platform can have multiple
> RNG devices, one example being qemu, which has a virtio RNG device and
> the RNG pseudo device through the TPM chip.
>
> Extend the 'rng' command so that the user can provide the RNG device
> number from which the random bytes are to be read. This will be the
> device index under the RNG uclass.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> Tested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>
> Changes since V2: None
>
>  cmd/rng.c | 31 +++++++++++++++++++++++--------
>  1 file changed, 23 insertions(+), 8 deletions(-)

Please add docs to doc/ and a test for the command.

Regards,
Simon


More information about the U-Boot mailing list