Browse Source

docs/platform: Update QEMU platforms documentation

Mostly reformating. Some minor edits.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Damien Le Moal 5 years ago
parent
commit
84cd4b7cd0
2 changed files with 89 additions and 55 deletions
  1. 33 23
      docs/platform/qemu_sifive_u.md
  2. 56 32
      docs/platform/qemu_virt.md

+ 33 - 23
docs/platform/qemu_sifive_u.md

@@ -1,42 +1,52 @@
-QEMU SiFive Unleashed Machine
-=============================
+QEMU SiFive Unleashed Machine Platform
+======================================
 
-The **QEMU SiFive Unleashed Machine** is an emulation of
-SiFive Unleashed platform.
+The **QEMU SiFive Unleashed Machine** is an emulation of the SiFive Unleashed
+platform.
 
-To build platform specific library and firmwares, provide
-`PLATFORM=qemu/sifive_u` parameter to top-level make.
+To build this platform specific library and firmwares, provide the
+*PLATFORM=qemu/sifive_u* parameter to the top level `make` command line.
 
 Platform Options
 ----------------
 
-We don't have any platform specific options for this platform.
+The *QEMU SiFive Unleashed Machine* platform does not have any platform specific
+options.
 
-Try on QEMU RISC-V 64bit
-------------------------
+Executing on QEMU RISC-V 64bit
+------------------------------
 
-**No Payload**
+**No Payload Case**
 
-*Build*:
+Build:
 ```
-    make PLATFORM=qemu/virt
+make PLATFORM=qemu/virt
 ```
-*Run*:
+
+Run:
 ```
-    qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio -kernel build/platform/qemu/sifive_u/firmware/fw_payload.elf
+qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/sifive_u/firmware/fw_payload.elf
 ```
 
-**U-Boot Payload**
+**U-Boot as a Payload**
 
-*Note*: We assume that U-Boot is compiled using `qemu-riscv64_smode_defconfig`.
+Note: the command line examples here assume that U-Boot was compiled using
+the `qemu-riscv64_smode_defconfig` configuration.
 
-*Build*:
+Build:
+```
+make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
+```
+
+Run:
+```
+qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/sifive_u/firmware/fw_payload.elf
 ```
-    make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
+or
 ```
-*Run*:
+qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/sifive_u/firmware/fw_jump.elf \
+	-device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80200000
 ```
-    qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio -kernel build/platform/qemu/sifive_u/firmware/fw_payload.elf
-    or
-    qemu-system-riscv64 -M sifive_u -m 256M -display none -serial stdio -kernel build/platform/qemu/sifive_u/firmware/fw_jump.elf -device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80200000
-```

+ 56 - 32
docs/platform/qemu_virt.md

@@ -1,59 +1,83 @@
-QEMU RISC-V Virt Machine
-========================
+QEMU RISC-V Virt Machine Platform
+=================================
 
-The **QEMU RISC-V Virt Machine** is virtual platform created
-for RISC-V software development. It is also referred to as
-QEMU RISC-V VirtIO machine because it uses VirtIO devices
-for network, storage, and other types of IO.
+The **QEMU RISC-V Virt Machine** is virtual platform created for RISC-V
+software development and test. It is also referred to as
+*QEMU RISC-V VirtIO machine* because it uses VirtIO devices for network,
+storage, and other types of IO.
 
-To build platform specific library and firmwares, provide
-`PLATFORM=qemu/virt` parameter to top-level make.
+To build platform specific library and firmwares, provide the
+*PLATFORM=qemu/virt* parameter to the top level `make` command.
 
 Platform Options
 ----------------
 
-We don't have any platform specific options for this platform.
+The *QEMU RISC-V Virt Machine* platform does not have any platform specific
+options.
 
-Try on QEMU RISC-V 64bit
-------------------------
+Execution on QEMU RISC-V 64bit
+------------------------------
 
-**No Payload**
+**No Payload Case**
 
-*Build*:
+Build:
 ```
-    make PLATFORM=qemu/virt
+make PLATFORM=qemu/virt
 ```
-*Run*:
+
+Run:
 ```
-    qemu-system-riscv64 -M virt -m 256M -display none -serial stdio -kernel build/platform/qemu/virt/firmware/fw_payload.elf
+qemu-system-riscv64 -M virt -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/virt/firmware/fw_payload.elf
 ```
 
 **U-Boot Payload**
 
-*Note*: We assume that U-Boot is compiled using `qemu-riscv64_smode_defconfig`.
+Note: the command line examples here assume that U-Boot was compiled using
+the `qemu-riscv64_smode_defconfig` configuration.
 
-*Build*:
+Build:
+```
+make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
 ```
-    make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
+
+Run:
 ```
-*Run*:
+qemu-system-riscv64 -M virt -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/virt/firmware/fw_payload.elf
 ```
-    qemu-system-riscv64 -M virt -m 256M -display none -serial stdio -kernel build/platform/qemu/virt/firmware/fw_payload.elf
-    or
-    qemu-system-riscv64 -M virt -m 256M -display none -serial stdio -kernel build/platform/qemu/virt/firmware/fw_jump.elf -device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80200000
+or
+```
+qemu-system-riscv64 -M virt -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/virt/firmware/fw_jump.elf \
+	-device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80200000
 ```
 
-**Linux Payload**
+**Linux Kernel Payload**
 
-*Note*: We assume that Linux is compiled using `defconfig`.
+Note: We assume that Linux kernel is compiled using
+*arch/riscv/configs/defconfig*.
 
-*Build*:
+Build:
 ```
-    make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
+make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
 ```
-*Run*:
+
+Run:
 ```
-    qemu-system-riscv64 -M virt -m 256M -display none -serial stdio -kernel build/platform/qemu/virt/firmware/fw_payload.elf -drive file=<path_to_linux_rootfs>,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -append "root=/dev/vda rw console=ttyS0"
-    or
-    qemu-system-riscv64 -M virt -m 256M -display none -serial stdio -kernel build/platform/qemu/virt/firmware/fw_jump.elf -device loader,file=<linux_build_directory>/arch/riscv/boot/Image,addr=0x80200000 -drive file=<path_to_linux_rootfs>,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -append "root=/dev/vda rw console=ttyS0"
-```
+qemu-system-riscv64 -M virt -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/virt/firmware/fw_payload.elf \
+	-drive file=<path_to_linux_rootfs>,format=raw,id=hd0 \
+	-device virtio-blk-device,drive=hd0 \
+	-append "root=/dev/vda rw console=ttyS0"
+```
+or
+```
+qemu-system-riscv64 -M virt -m 256M -display none -serial stdio \
+	-kernel build/platform/qemu/virt/firmware/fw_jump.elf \
+	-device loader,file=<linux_build_directory>/arch/riscv/boot/Image,addr=0x80200000 \
+	-drive file=<path_to_linux_rootfs>,format=raw,id=hd0 \
+	-device virtio-blk-device,drive=hd0 \
+	-append "root=/dev/vda rw console=ttyS0"
+```
+