diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-28 14:21:57 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2018-12-31 09:33:04 +0530 |
commit | d0bbbbb8fdf059b2e49235af271db0d67ade2fc9 (patch) | |
tree | 0a53f0a7dd35fa98c1daa67fa293251a9e2b6b89 /docs/platform | |
parent | 5688b4d8fcd39eaf504e73279bbe42b9700369da (diff) |
docs: Add documenation for QEMU platforms
This patch adds documentation for qemu/virt and
qemu/sifive_u platform supports.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'docs/platform')
-rw-r--r-- | docs/platform/qemu_sifive_u.md | 42 | ||||
-rw-r--r-- | docs/platform/qemu_virt.md | 59 |
2 files changed, 101 insertions, 0 deletions
diff --git a/docs/platform/qemu_sifive_u.md b/docs/platform/qemu_sifive_u.md new file mode 100644 index 0000000..da1315b --- /dev/null +++ b/docs/platform/qemu_sifive_u.md @@ -0,0 +1,42 @@ +QEMU SiFive Unleashed Machine +============================= + +The **QEMU SiFive Unleashed Machine** is an emulation of +SiFive Unleashed platform. + +To build platform specific library and firmwares, provide +`PLATFORM=qemu/sifive_u` parameter to top-level make. + +Platform Options +---------------- + +We don't have any platform specific options for this platform. + +Try on QEMU RISC-V 64bit +------------------------ + +**No Payload** + +*Build*: +``` + make PLATFORM=qemu/virt +``` +*Run*: +``` + 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** + +*Note*: We assume that U-Boot is compiled using `qemu-riscv64_smode_defconfig`. + +*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 + 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 +```
\ No newline at end of file diff --git a/docs/platform/qemu_virt.md b/docs/platform/qemu_virt.md new file mode 100644 index 0000000..c9a4a2c --- /dev/null +++ b/docs/platform/qemu_virt.md @@ -0,0 +1,59 @@ +QEMU RISC-V Virt Machine +======================== + +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. + +To build platform specific library and firmwares, provide +`PLATFORM=qemu/virt` parameter to top-level make. + +Platform Options +---------------- + +We don't have any platform specific options for this platform. + +Try on QEMU RISC-V 64bit +------------------------ + +**No Payload** + +*Build*: +``` + make PLATFORM=qemu/virt +``` +*Run*: +``` + 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`. + +*Build*: +``` + make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<uboot_build_directory>/u-boot.bin +``` +*Run*: +``` + 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 +``` + +**Linux Payload** + +*Note*: We assume that Linux is compiled using `defconfig`. + +*Build*: +``` + make PLATFORM=qemu/virt FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image +``` +*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" +```
\ No newline at end of file |