blkdev.rst 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. Emulation of block devices
  3. --------------------------
  4. QEMU can emulate common block devices by adding the following parameters to
  5. the qemu-system-<arch> command line:
  6. * MMC
  7. .. code-block:: bash
  8. -device sdhci-pci,sd-spec-version=3 \
  9. -drive if=none,file=disk.img,format=raw,id=MMC1 \
  10. -device sd-card,drive=MMC1
  11. * NVMe
  12. .. code-block:: bash
  13. -drive if=none,file=disk.img,format=raw,id=NVME1 \
  14. -device nvme,drive=NVME1,serial=nvme-1
  15. * SATA
  16. .. code-block:: bash
  17. -device ahci,id=ahci0 \
  18. -drive if=none,file=disk.img,format=raw,id=SATA1 \
  19. -device ide-hd,bus=ahci0.0,drive=SATA1
  20. * USB
  21. .. code-block:: bash
  22. -device qemu-xhci \
  23. -drive if=none,file=disk.img,format=raw,id=USB1 \
  24. -device usb-storage,drive=USB1
  25. * Virtio
  26. .. code-block:: bash
  27. -drive if=none,file=disk.img,format=raw,id=VIRTIO1 \
  28. -device virtio-blk,drive=VIRTIO1
  29. .. note::
  30. As of v2023.07 U-Boot does not have a driver for virtio-scsi-pci.