]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
doc: describe QEMU emulation of block devices
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 24 Jul 2023 10:04:18 +0000 (12:04 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 28 Jul 2023 09:36:37 +0000 (11:36 +0200)
* Add a new page about the emulation of block devices
* Add semihosting to the emulation index page
* Set toc maxdepth to 1 to improve readability

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
doc/board/emulation/blkdev.rst [new file with mode: 0644]
doc/board/emulation/index.rst

diff --git a/doc/board/emulation/blkdev.rst b/doc/board/emulation/blkdev.rst
new file mode 100644 (file)
index 0000000..dc83a00
--- /dev/null
@@ -0,0 +1,38 @@
+.. 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 \
+      -device sd-card,drive=MMC1 \
+      -drive if=none,file=disk.img,format=raw,id=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
index b5b6c3fa0de25d2f81d0d0a667fb5c5c9e7141fe..932c65adebb2260c9fc1b6033454525afe49e3c9 100644 (file)
@@ -4,8 +4,10 @@ Emulation
 =========
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 1
 
+   blkdev
+   ../../usage/semihosting
    qemu-arm
    qemu-mips
    qemu-ppce500