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>
This commit is contained in:
TOKITA Hiroshi 2025-05-04 12:22:04 +09:00 committed by Benjamin Cabé
commit 4bcf73704f

View file

@ -61,11 +61,16 @@ if(NOT CONFIG_X86_64 AND CONFIG_CACHE_MANAGEMENT)
string(JOIN "," QEMU_CPU_FLAGS "${QEMU_CPU_FLAGS}" "clflush") string(JOIN "," QEMU_CPU_FLAGS "${QEMU_CPU_FLAGS}" "clflush")
endif() endif()
if(CONFIG_ENTROPY_VIRTIO)
set(QEMU_VIRTIO_ENTROPY_FLAGS -device virtio-rng-pci)
endif()
set(QEMU_FLAGS_${ARCH} set(QEMU_FLAGS_${ARCH}
-m ${QEMU_MEMORY_SIZE_MB} -m ${QEMU_MEMORY_SIZE_MB}
-cpu ${QEMU_CPU_TYPE_${ARCH}}${QEMU_CPU_FLAGS} -cpu ${QEMU_CPU_TYPE_${ARCH}}${QEMU_CPU_FLAGS}
-machine q35 -machine q35
-device isa-debug-exit,iobase=0xf4,iosize=0x04 -device isa-debug-exit,iobase=0xf4,iosize=0x04
${QEMU_VIRTIO_ENTROPY_FLAGS}
${REBOOT_FLAG} ${REBOOT_FLAG}
-nographic -nographic
) )