From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web11.3416.1686933601156596800 for ; Fri, 16 Jun 2023 09:40:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=XhTI8A2M; spf=pass (domain: ventanamicro.com, ip: 209.85.216.53, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-25e83a63143so727907a91.3 for ; Fri, 16 Jun 2023 09:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1686933600; x=1689525600; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8QbT1vmtg59iNP3X9jiaOUNzbHaEXEOFwjw3X5OMdEw=; b=XhTI8A2M6dIvLnGLmQu/xyv79GAQ8sri6wYBOZY92ILYcD02lep4FzLjOFfFFx8ub8 CTVF9+uHMmB4DuwsyFaDrIqnfrGmjnvNH/iFrdCCxRMYSAu79bGAY/9J8JRxwJIZFN/e 6cFf7oos6hfHcykvaTmdhlR+gONf1PHsB5A0Bgp2s6Cy/34udfjNUUFmMwb9A0pW9nzY a+9iAKziK55MA7JzBBEXYFocPfxEGYe/Ii8fv2pBC1AB9CCqJmJQah1RF+v63Fz/LrVK 6VzH3x9hFB11pmTp9sVs3Z1hs8/SPzk6NypSW85yU7LGGOFgK0e+3hRY+Hl/TpjsYKcq 62xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686933600; x=1689525600; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8QbT1vmtg59iNP3X9jiaOUNzbHaEXEOFwjw3X5OMdEw=; b=Gfc8iRz8HE9vycr80nSwPI4v3+FV7PrNmwXuboPJICyvjCZS8EcZigu5dhB32YdU2z 9ysgKuAIauTwZadZgt6RaKtPHaOClU6rz+P8/p8/pUr3hg/NCBfXvF050mE8s8paUZyN Gs0UCG5RCtna5ysC1NwJt2XRCEAFFCHAAsLw+hJqrEDhDrAC/Wq2cjG4iAslfBxrhUEi c/apuigEJn9ZD8BrhlJsp/05DMOqm6l1EhD49f+1hcZxtW6shhj9mAhaskBlrUFmBvXF uMx/vdrWhdcA23OcQ8rvotJC2ICgxy83EEpTu2CpddocX6vo47kRnCfwVN4OcRahgUYZ DxTw== X-Gm-Message-State: AC+VfDwsoSoPUYbBT3pe6+5ytpllHHyZj4XXS9wrUSU3sNOPsGOLr89E 7iFdUOfqoEjT5nCcqeknbyd3Bw== X-Google-Smtp-Source: ACHHUZ491a+gi0+Qh9rtXJfJDyUFUKD5Cnceun3mko5gka4GBGgyo6lcfmwaYfouMfCbdeQRMHwm8A== X-Received: by 2002:a17:90a:1906:b0:25e:a8ab:9157 with SMTP id 6-20020a17090a190600b0025ea8ab9157mr2177224pjg.22.1686933600562; Fri, 16 Jun 2023 09:40:00 -0700 (PDT) Return-Path: Received: from sunil-laptop ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id a14-20020a63e84e000000b0054a15146f53sm12377437pgk.13.2023.06.16.09.39.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 09:40:00 -0700 (PDT) Date: Fri, 16 Jun 2023 22:09:53 +0530 From: "Sunil V L" To: Heinrich Schuchardt Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Andrei Warkentin , Dann Frazier , devel@edk2.groups.io Subject: Re: [PATCH v2 4/4] OvmfPkg/RiscVVirt: Add a readme for build and test Message-ID: References: <20230616101651.1319722-5-sunilvl@ventanamicro.com> <82875e92-7476-5665-4546-a0ac1f31b464@canonical.com> MIME-Version: 1.0 In-Reply-To: <82875e92-7476-5665-4546-a0ac1f31b464@canonical.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Heinrich, Thank you very much for the review! On Fri, Jun 16, 2023 at 03:06:49PM +0200, Heinrich Schuchardt wrote: > On 6/16/23 12:16, Sunil V L wrote: > > 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 > > Unfortunately you only sent me the cover letter. Copying from the mailing > list may have led to some formatting being lost. > Ahh, I usually copy only what Maintainer.txt asks in individual patches and copy others in the cover letter so that they are aware of the series. Will add you in CC for v3. > > --- > > OvmfPkg/RiscVVirt/README.md | 46 +++++++++++++++++++++++++++++++++++++ > > 1 file changed, 46 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..b07d5b6d3bf9 > > --- /dev/null > > +++ b/OvmfPkg/RiscVVirt/README.md > > @@ -0,0 +1,46 @@ > > +# Support for RISC-V qemu virt platform > > + > > +## Overview > > +RISC-V qemu 'virt' is a generic platform which does not correspond to any real > > %s/qemu/QEMU/ > OK. > > +hardware. > > + > > +EDK2 for RISC-V virt platform is a payload (S-mode) for a previous stage M-mode > > %s/for/for the/ > OK. > > +firmware like opensbi. It follows PEI less design. > > %s/opensbi/OpenSBI/ > OK. > > + > > +The minimum qemu version required is > > %s/qemu/QEMU/ > OK. > > +**[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 > > +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) Run qemu > > %s/qemu/QEMU/ > OK. > > + > > + 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=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \ > > + -blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \ > > + -M virt,pflash0=pflash0,pflash1=pflash1,acpi=off \ > > + -kernel linux/arch/riscv/boot/Image \ > > + -initrd buildroot/output/images/rootfs.cpio \ > > If you use -kernel and -initrd, why would you use EDK II? It is much easier > to use the kernel and initrd that is on the drive that you will need anyway. > I thought it may be easier option for users without much dependencies on the disk image. But I agree with you that it needs to be OS agnostic example. openSUSE Tumbleweed disk image has everything required pre-installed. Let me add that as the example use case. Thanks! Sunil