[U-BOOT-TEST-HOOKS][PATCH v2 1/1] qemu-riscv: enable virtio-rng-device
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Mon Jul 31 11:05:06 CEST 2023
Linux' KASLR uses the EFI_RNG_PROTOCOL as entropy source. We should
enable CONFIG_DM_RNG in U-Boot. For the EFI unit test for the protocol to
succeed a virtio RNG device has to be provided when invoking QEMU.
Reported-by: Leo Liang <ycliang at andestech.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
v2:
use virtio-rng-device instead of virtio-rng-pci
(virtio-rng-device does not require calling 'virtio scan')
See related patch
[PATCH 1/1] riscv: qemu: imply CONFIG_DM_RNG
https://lists.denx.de/pipermail/u-boot/2023-July/525293.html
---
bin/travis-ci/conf.qemu-riscv32_na | 2 +-
bin/travis-ci/conf.qemu-riscv32_spl_na | 2 +-
bin/travis-ci/conf.qemu-riscv64_na | 2 +-
bin/travis-ci/conf.qemu-riscv64_spl_na | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/travis-ci/conf.qemu-riscv32_na b/bin/travis-ci/conf.qemu-riscv32_na
index 5aa25e3..8163754 100644
--- a/bin/travis-ci/conf.qemu-riscv32_na
+++ b/bin/travis-ci/conf.qemu-riscv32_na
@@ -5,7 +5,7 @@
console_impl=qemu
qemu_machine="virt"
qemu_binary="qemu-system-riscv32"
-qemu_extra_args="-m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0"
+qemu_extra_args="-m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0 -device virtio-rng-device"
qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/u-boot"
reset_impl=none
flash_impl=none
diff --git a/bin/travis-ci/conf.qemu-riscv32_spl_na b/bin/travis-ci/conf.qemu-riscv32_spl_na
index c1419c2..254ae18 100644
--- a/bin/travis-ci/conf.qemu-riscv32_spl_na
+++ b/bin/travis-ci/conf.qemu-riscv32_spl_na
@@ -5,7 +5,7 @@
console_impl=qemu
qemu_machine="virt"
qemu_binary="qemu-system-riscv32"
-qemu_extra_args="-smp 4 -m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0"
+qemu_extra_args="-smp 4 -m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0 -device virtio-rng-device"
qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/spl/u-boot-spl -device loader,file=${U_BOOT_BUILD_DIR}/u-boot.itb,addr=0x80200000"
reset_impl=none
flash_impl=none
diff --git a/bin/travis-ci/conf.qemu-riscv64_na b/bin/travis-ci/conf.qemu-riscv64_na
index 90ab820..7c96dc2 100644
--- a/bin/travis-ci/conf.qemu-riscv64_na
+++ b/bin/travis-ci/conf.qemu-riscv64_na
@@ -5,7 +5,7 @@
console_impl=qemu
qemu_machine="virt"
qemu_binary="qemu-system-riscv64"
-qemu_extra_args="-m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0"
+qemu_extra_args="-m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0 -device virtio-rng-device"
qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/u-boot"
reset_impl=none
flash_impl=none
diff --git a/bin/travis-ci/conf.qemu-riscv64_spl_na b/bin/travis-ci/conf.qemu-riscv64_spl_na
index c3d3dac..693fdf3 100644
--- a/bin/travis-ci/conf.qemu-riscv64_spl_na
+++ b/bin/travis-ci/conf.qemu-riscv64_spl_na
@@ -5,7 +5,7 @@
console_impl=qemu
qemu_machine="virt"
qemu_binary="qemu-system-riscv64"
-qemu_extra_args="-smp 4 -m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0"
+qemu_extra_args="-smp 4 -m 1G -nographic -netdev user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR} -device virtio-net-device,netdev=net0 -device virtio-rng-device"
qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/spl/u-boot-spl -device loader,file=${U_BOOT_BUILD_DIR}/u-boot.itb,addr=0x80200000"
reset_impl=none
flash_impl=none
--
2.40.1
More information about the U-Boot
mailing list