~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: f187ff22a866ca5aa273cf45bb93fa95a0e9701f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.. SPDX-License-Identifier: GPL-2.0+

Emulation of block devices
--------------------------

QEMU can emulate common block devices by adding the following parameters to
the qemu-system-<arch> command line:

* MMC

  .. code-block:: bash

      -device sdhci-pci,sd-spec-version=3 \
      -drive if=none,file=disk.img,format=raw,id=MMC1 \
      -device sd-card,drive=MMC1

* NVMe

  .. code-block:: bash

      -drive if=none,file=disk.img,format=raw,id=NVME1 \
      -device nvme,drive=NVME1,serial=nvme-1

* SATA

  .. code-block:: bash

      -device ahci,id=ahci0 \
      -drive if=none,file=disk.img,format=raw,id=SATA1 \
      -device ide-hd,bus=ahci0.0,drive=SATA1

* USB

  .. code-block:: bash

      -device qemu-xhci \
      -drive if=none,file=disk.img,format=raw,id=USB1 \
      -device usb-storage,drive=USB1

* Virtio

  .. code-block:: bash

      -drive if=none,file=disk.img,format=raw,id=VIRTIO1 \
      -device virtio-blk,drive=VIRTIO1

  .. note::
     As of v2023.07 U-Boot does not have a driver for virtio-scsi-pci.