Skip to content

Commit 642f2f0

Browse files
committed
boards: qemu: x86: Add an option for VirtIO Entropy device enabling
If CONFIG_ENTROPY_VIRTIO is enabled, enable `virtio-rng-pci` device on qemu side. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent af6e098 commit 642f2f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

boards/qemu/x86/board.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,16 @@ if(NOT CONFIG_X86_64 AND CONFIG_CACHE_MANAGEMENT)
6161
string(JOIN "," QEMU_CPU_FLAGS "${QEMU_CPU_FLAGS}" "clflush")
6262
endif()
6363

64+
if(CONFIG_ENTROPY_VIRTIO)
65+
set(QEMU_VIRTIO_ENTROPY_FLAGS -device virtio-rng-pci)
66+
endif()
67+
6468
set(QEMU_FLAGS_${ARCH}
6569
-m ${QEMU_MEMORY_SIZE_MB}
6670
-cpu ${QEMU_CPU_TYPE_${ARCH}}${QEMU_CPU_FLAGS}
6771
-machine q35
6872
-device isa-debug-exit,iobase=0xf4,iosize=0x04
73+
${QEMU_VIRTIO_ENTROPY_FLAGS}
6974
${REBOOT_FLAG}
7075
-nographic
7176
)

0 commit comments

Comments
 (0)