summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-01 09:36:56 +0300
committerAnup Patel <anup@brainfault.org>2020-05-04 07:39:23 +0300
commit13717a8e53a382769e9678f6d9357c20446cde0c (patch)
treec8f2cf26d55e8078ba6f8a13d28663e0fea99fc1 /docs
parent4f18c6e55049d858c62e87d2605dd41c06956e4e (diff)
downloadopensbi-13717a8e53a382769e9678f6d9357c20446cde0c.tar.xz
platform: Remove qemu/virt directory
The OpenSBI generic platform works perfectly fine on the QEMU virt machine so let's remove dedicated QEMU virt machine platform from OpenSBI. All QEMU virt machine related documentation in OpenSBI will now suggest using OpenSBI generic platform. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/platform/generic.md4
-rw-r--r--docs/platform/qemu_virt.md46
2 files changed, 25 insertions, 25 deletions
diff --git a/docs/platform/generic.md b/docs/platform/generic.md
index 73b6fca..f4281a2 100644
--- a/docs/platform/generic.md
+++ b/docs/platform/generic.md
@@ -39,4 +39,6 @@ The *Generic* platform does not have any platform-specific options.
RISC-V Platforms Using Generic Platform
---------------------------------------
-To be added later.
+* **QEMU RISC-V Virt Machine** (*[qemu_virt.md]*)
+
+[qemu_virt.md]: qemu_virt.md
diff --git a/docs/platform/qemu_virt.md b/docs/platform/qemu_virt.md
index 6d8a3d0..2196e5a 100644
--- a/docs/platform/qemu_virt.md
+++ b/docs/platform/qemu_virt.md
@@ -7,7 +7,7 @@ software development and testing. It is also referred to as
storage, and other types of IO.
To build the platform-specific library and firmware images, provide the
-*PLATFORM=qemu/virt* parameter to the top level `make` command.
+*PLATFORM=generic* parameter to the top level `make` command.
Platform Options
----------------
@@ -22,13 +22,13 @@ Execution on QEMU RISC-V 64-bit
Build:
```
-make PLATFORM=qemu/virt
+make PLATFORM=generic
```
Run:
```
qemu-system-riscv64 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf
+ -kernel build/platform/generic/firmware/fw_payload.bin
```
**U-Boot Payload**
@@ -38,19 +38,19 @@ the `qemu-riscv64_smode_defconfig` configuration.
Build:
```
-make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
+make PLATFORM=generic FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
```
Run:
```
qemu-system-riscv64 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf
+ -kernel build/platform/generic/firmware/fw_payload.elf
```
or
```
qemu-system-riscv64 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_jump.elf \
- -device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80200000
+ -bios build/platform/generic/firmware/fw_jump.bin \
+ -kernel <uboot_build_directory>/u-boot.bin
```
**Linux Kernel Payload**
@@ -60,13 +60,13 @@ Note: We assume that the Linux kernel is compiled using
Build:
```
-make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
+make PLATFORM=generic FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
```
Run:
```
qemu-system-riscv64 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf \
+ -kernel build/platform/generic/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"
@@ -74,8 +74,8 @@ qemu-system-riscv64 -M virt -m 256M -nographic \
or
```
qemu-system-riscv64 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_jump.elf \
- -device loader,file=<linux_build_directory>/arch/riscv/boot/Image,addr=0x80200000 \
+ -bios build/platform/generic/firmware/fw_jump.bin \
+ -kernel <linux_build_directory>/arch/riscv/boot/Image \
-drive file=<path_to_linux_rootfs>,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-append "root=/dev/vda rw console=ttyS0"
@@ -89,13 +89,13 @@ Execution on QEMU RISC-V 32-bit
Build:
```
-make PLATFORM=qemu/virt
+make PLATFORM=generic PLATFORM_RISCV_XLEN=32
```
Run:
```
qemu-system-riscv32 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf
+ -kernel build/platform/generic/firmware/fw_payload.bin
```
**U-Boot Payload**
@@ -105,37 +105,35 @@ the `qemu-riscv32_smode_defconfig` configuration.
Build:
```
-make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
+make PLATFORM=generic PLATFORM_RISCV_XLEN=32 FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin
```
Run:
```
qemu-system-riscv32 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf
+ -kernel build/platform/generic/firmware/fw_payload.elf
```
or
```
qemu-system-riscv32 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_jump.elf \
- -device loader,file=<uboot_build_directory>/u-boot.bin,addr=0x80400000
+ -bios build/platform/generic/firmware/fw_jump.bin \
+ -kernel <uboot_build_directory>/u-boot.bin
```
**Linux Kernel Payload**
Note: We assume that the Linux kernel is compiled using
-*arch/riscv/configs/rv32_defconfig* (kernel 5.1 and newer)
-respectively using *arch/riscv/configs/defconfig* plus setting
-CONFIG_ARCH_RV32I=y (kernel 5.0 and older).
+*arch/riscv/configs/rv32_defconfig*.
Build:
```
-make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
+make PLATFORM=generic PLATFORM_RISCV_XLEN=32 FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
```
Run:
```
qemu-system-riscv32 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_payload.elf \
+ -kernel build/platform/generic/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"
@@ -143,8 +141,8 @@ qemu-system-riscv32 -M virt -m 256M -nographic \
or
```
qemu-system-riscv32 -M virt -m 256M -nographic \
- -kernel build/platform/qemu/virt/firmware/fw_jump.elf \
- -device loader,file=<linux_build_directory>/arch/riscv/boot/Image,addr=0x80400000 \
+ -bios build/platform/generic/firmware/fw_jump.bin \
+ -kernel <linux_build_directory>/arch/riscv/boot/Image \
-drive file=<path_to_linux_rootfs>,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-append "root=/dev/vda rw console=ttyS0"