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