diff options
author | Sunil V L <sunilvl@ventanamicro.com> | 2023-06-14 10:53:52 +0530 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-06-23 04:49:11 +0000 |
commit | 49f06b664018105090a42a0684fb5e6ea4c909cd (patch) | |
tree | de9ad2ce6f3d2607760d8afc7a6d73d762f2b1d7 /OvmfPkg/RiscVVirt | |
parent | 37423fa344ee3381e019055502f9b6363d8bbd40 (diff) | |
download | edk2-49f06b664018105090a42a0684fb5e6ea4c909cd.tar.gz edk2-49f06b664018105090a42a0684fb5e6ea4c909cd.tar.bz2 edk2-49f06b664018105090a42a0684fb5e6ea4c909cd.zip |
OvmfPkg/RiscVVirt: Add a readme for build and test
Add a readme file which provides information regarding how
to build and test EDK2 on RISC-V qemu virt platform.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Andrei Warkentin <andrei.warkentin@intel.com>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'OvmfPkg/RiscVVirt')
-rw-r--r-- | OvmfPkg/RiscVVirt/README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md new file mode 100644 index 0000000000..950694419e --- /dev/null +++ b/OvmfPkg/RiscVVirt/README.md @@ -0,0 +1,49 @@ +# Support for RISC-V QEMU virt platform
+
+## Overview
+RISC-V QEMU 'virt' is a generic platform which does not correspond to any real
+hardware.
+
+EDK2 for RISC-V virt platform is a payload (S-mode) for the previous stage M-mode
+firmware like OpenSBI. It follows PEI less design.
+
+The minimum QEMU version required is
+**[8.1](https://wiki.qemu.org/Planning/8.1)** or with commit
+[7efd65423a](https://github.com/qemu/qemu/commit/7efd65423ab22e6f5890ca08ae40c84d6660242f)
+which supports separate pflash devices for EDK2 code and variable storage.
+
+## Build
+ export WORKSPACE=`pwd`
+ export GCC5_RISCV64_PREFIX=riscv64-linux-gnu-
+ export PACKAGES_PATH=$WORKSPACE/edk2
+ export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
+ source edk2/edksetup.sh
+ make -C edk2/BaseTools
+ source edk2/edksetup.sh BaseTools
+ build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5
+
+## Test
+Below example shows how to boot openSUSE Tumbleweed E20.
+
+1) RISC-V QEMU pflash devices should be of of size 32MiB.
+
+ `truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_CODE.fd`
+
+ `truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_VARS.fd`
+
+2) Running QEMU
+
+ qemu-system-riscv64 \
+ -M virt,pflash0=pflash0,pflash1=pflash1,acpi=off \
+ -m 4096 -smp 2 \
+ -serial mon:stdio \
+ -device virtio-gpu-pci -full-screen \
+ -device qemu-xhci \
+ -device usb-kbd \
+ -device virtio-rng-pci \
+ -blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
+ -blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
+ -netdev user,id=net0 \
+ -device virtio-net-pci,netdev=net0 \
+ -device virtio-blk-device,drive=hd0 \
+ -drive file=openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw,format=raw,id=hd0
|