From nobody Tue Feb 10 00:22:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+106095+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106095+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1686762129; cv=none; d=zohomail.com; s=zohoarc; b=E9JssdsoBzxbFnMkfIiGgun/1M3swGbIWlzWH1qFwFHowJCyCX27bypn5bpLwxWmMjMj0T5HD/QgwKn2iJRyDt9f6MhsMchMCvdKGJbkhOQ1Oz4XiaDtRhC9+tqQjX7Th8Q+H1sjW6L7uiKASwF6vEyW5ycoRY5JvD8WgKYpk44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686762129; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=854meDkgHPx/EBongzvsGl7lDEMZYphBarXgLvPxlR8=; b=ZMIl2V2mkgGdD69ZKdvgXnXb2KDEonKu1AinLlmQLMJurXYVLmaMAUrBb5V+iH9L5TcPQxM9ecbIBAeH/auvuWLT+NFHXFRIPoZIecHOxyy6z5MEwbpfxI44epwU4dpDJ9dewnN67lrri4MyBaeDiHoYmdzSUaivwHo1Kz1nF58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106095+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1686762128929997.9304028231395; Wed, 14 Jun 2023 10:02:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Zh4QYY1788612xcACfIbNLYh; Wed, 14 Jun 2023 10:02:08 -0700 X-Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web10.18171.1686762127896801207 for ; Wed, 14 Jun 2023 10:02:07 -0700 X-Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1b4f95833c7so6531555ad.1 for ; Wed, 14 Jun 2023 10:02:07 -0700 (PDT) X-Gm-Message-State: HOLrpKNm4xeiGmTaLSjDZcvRx1787277AA= X-Google-Smtp-Source: ACHHUZ6MZTjFlGai1QvFJBfCBOGcPfKzOc66VAektasT0T1r1a89CyyaP1myCJj5djtvYV/G0W9zlg== X-Received: by 2002:a17:902:7684:b0:1b3:9d13:34b3 with SMTP id m4-20020a170902768400b001b39d1334b3mr9981008pll.37.1686762126913; Wed, 14 Jun 2023 10:02:06 -0700 (PDT) X-Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id s7-20020a170902988700b001b3ef11d8fdsm1850424plp.201.2023.06.14.10.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 10:02:06 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Andrei Warkentin Subject: [edk2-devel] [PATCH 4/4] OvmfPkg/RiscVVirt: Add a readme for build and test Date: Wed, 14 Jun 2023 22:31:51 +0530 Message-Id: <20230614170151.1204982-5-sunilvl@ventanamicro.com> In-Reply-To: <20230614170151.1204982-1-sunilvl@ventanamicro.com> References: <20230614170151.1204982-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sunilvl@ventanamicro.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1686762128; bh=API/au3cXxCuhxpKYmHdiexKvY+jDUuJyWkbWh/EJg0=; h=Cc:Date:From:Reply-To:Subject:To; b=rotcDcPnwGRIi6J2cjvnbaNrIPxmzIPyrDEgRYyrIdQFceIaU5pcbyLGqJoAm1iKKXD Mle70lE2NYVv0Pb42JLcSftSLVk2ahmsnMK5gEuJKBU2mBi8XU2Ey0v6v7scQe30fmJTU wlcNGd3i1WZpdgI/JPjwoSlxzi6ga5u2KKQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1686762131226100005 Content-Type: text/plain; charset="utf-8" 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 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Andrei Warkentin --- OvmfPkg/RiscVVirt/README.md | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 OvmfPkg/RiscVVirt/README.md diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md new file mode 100644 index 000000000000..a1738658318d --- /dev/null +++ b/OvmfPkg/RiscVVirt/README.md @@ -0,0 +1,41 @@ +# 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 a previous stage M= -mode +firmware like opensbi. It follows PEI less design. + +## Build + export WORKSPACE=3D`pwd` + export GCC5_RISCV64_PREFIX=3Driscv64-linux-gnu- + export PACKAGES_PATH=3D$WORKSPACE/edk2 + export EDK_TOOLS_PATH=3D$WORKSPACE/edk2/BaseTools + source edk2/edksetup.sh + make -C edk2/BaseTools + source edk2/edksetup.sh BaseTools + build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQ= emu.dsc -t GCC5 + +## Test +1) RISC-V qemu pflash devices should be of of size 32MiB. + + `truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_CODE.f= d` + + `truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_VARS.f= d` + +2) Run qemu + + qemu-system-riscv64 \ + -accel tcg -m 4096 -smp 2 \ + -serial mon:stdio \ + -device virtio-gpu-pci -full-screen \ + -device qemu-xhci \ + -device usb-kbd \ + -blockdev node-name=3Dpflash0,driver=3Dfile,read-only=3Don,filenam= e=3DRISCV_VIRT_CODE.fd \ + -blockdev node-name=3Dpflash1,driver=3Dfile,filename=3DRISCV_VIRT_= VARS.fd \ + -M virt,pflash0=3Dpflash0,pflash1=3Dpflash1,acpi=3Doff \ + -kernel linux/arch/riscv/boot/Image \ + -initrd buildroot/output/images/rootfs.cpio \ + -netdev user,id=3Dnet0 -device virtio-net-pci,netdev=3Dnet0 \ + -append "root=3D/dev/ram rw console=3DttyS0 earlycon=3Duart8250,mm= io,0x10000000" --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106095): https://edk2.groups.io/g/devel/message/106095 Mute This Topic: https://groups.io/mt/99532027/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-