diff options
author | Heinrich Schuchardt | 2023-07-24 12:04:18 +0200 |
---|---|---|
committer | Heinrich Schuchardt | 2023-07-28 11:36:37 +0200 |
commit | 8505c0bb5c075a5d9f5849ec9e79617aa07555b2 (patch) | |
tree | 7bb4206bb84b1935c6a2cd63afcb3cc2fe89c401 | |
parent | 95537bd31cd86af21245b98b84fc657e07782f04 (diff) |
doc: describe QEMU emulation of block devices
* 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>
-rw-r--r-- | doc/board/emulation/blkdev.rst | 38 | ||||
-rw-r--r-- | doc/board/emulation/index.rst | 4 |
2 files changed, 41 insertions, 1 deletions
diff --git a/doc/board/emulation/blkdev.rst b/doc/board/emulation/blkdev.rst new file mode 100644 index 00000000000..dc83a005268 --- /dev/null +++ b/doc/board/emulation/blkdev.rst @@ -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 diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst index b5b6c3fa0de..932c65adebb 100644 --- a/doc/board/emulation/index.rst +++ b/doc/board/emulation/index.rst @@ -4,8 +4,10 @@ Emulation ========= .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + blkdev + ../../usage/semihosting qemu-arm qemu-mips qemu-ppce500 |