virt.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 'virt' generic virtual platform
  2. ===============================
  3. The ``virt`` board is a platform which does not correspond to any
  4. real hardware; it is designed for use in virtual machines.
  5. It is the recommended board type if you simply want to run
  6. a guest such as Linux and do not care about reproducing the
  7. idiosyncrasies and limitations of a particular bit of real-world
  8. hardware.
  9. Supported devices
  10. -----------------
  11. * PCI/PCIe devices
  12. * 8 virtio-mmio transport devices
  13. * 16550A UART
  14. * Goldfish RTC
  15. * SiFive Test device for poweroff and reboot
  16. * SMP (OpenRISC multicore using ompic)
  17. Boot options
  18. ------------
  19. The virt machine can be started using the ``-kernel`` and ``-initrd`` options
  20. to load a Linux kernel and optional disk image. For example:
  21. .. code-block:: bash
  22. $ qemu-system-or1k -cpu or1220 -M or1k-sim -nographic \
  23. -device virtio-net-device,netdev=user -netdev user,id=user,net=10.9.0.1/24,host=10.9.0.100 \
  24. -device virtio-blk-device,drive=d0 -drive file=virt.qcow2,id=d0,if=none,format=qcow2 \
  25. -kernel vmlinux \
  26. -initrd initramfs.cpio.gz \
  27. -m 128
  28. Linux guest kernel configuration
  29. """"""""""""""""""""""""""""""""
  30. The 'virt_defconfig' for Linux openrisc kernels includes the right drivers for
  31. the ``virt`` machine.
  32. Hardware configuration information
  33. """"""""""""""""""""""""""""""""""
  34. The ``virt`` board automatically generates a device tree blob ("dtb") which it
  35. passes to the guest. This provides information about the addresses, interrupt
  36. lines and other configuration of the various devices in the system.
  37. The location of the DTB will be passed in register ``r3`` to the guest operating
  38. system.