public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sunil V L" <sunilvl@ventanamicro.com>
To: devel@edk2.groups.io
Cc: Sunil V L <sunilvl@ventanamicro.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Andrei Warkentin <andrei.warkentin@intel.com>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH v2 4/4] OvmfPkg/RiscVVirt: Update README for CLANGDWARF support
Date: Tue, 11 Jul 2023 21:13:35 +0530	[thread overview]
Message-ID: <20230711154335.586343-5-sunilvl@ventanamicro.com> (raw)
In-Reply-To: <20230711154335.586343-1-sunilvl@ventanamicro.com>

Update the README with instruction to build using CLANGDWARF
toolchain.

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>

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
---
 OvmfPkg/RiscVVirt/README.md | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md
index 950694419e8b..8c3ac37b802a 100644
--- a/OvmfPkg/RiscVVirt/README.md
+++ b/OvmfPkg/RiscVVirt/README.md
@@ -12,24 +12,46 @@ The minimum QEMU version required is
 [7efd65423a](https://github.com/qemu/qemu/commit/7efd65423ab22e6f5890ca08ae40c84d6660242f)
 which supports separate pflash devices for EDK2 code and variable storage.
 
+## Get edk2 sources
+
+    git clone --recurse-submodule git@github.com:tianocore/edk2.git
+
 ## Build
+
+### Using GCC toolchain
+**Prerequisite**: RISC-V GNU compiler toolchain should be installed.
+
     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
+    source edk2/edksetup.sh --reconfig
     make -C edk2/BaseTools
     source edk2/edksetup.sh BaseTools
     build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5
 
+### Using CLANGDWARF toolchain (clang + lld)
+**Prerequisite**: LLVM toolchain with clang and lld should be installed.
+
+    export WORKSPACE=`pwd`
+    export CLANGDWARF_BIN=/usr/bin/
+    export PACKAGES_PATH=$WORKSPACE/edk2
+    export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
+    source edk2/edksetup.sh --reconfig
+    make -C edk2/BaseTools
+    source edk2/edksetup.sh BaseTools
+    build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t CLANGDWARF
+
+After a successful build, two files namely **RISCV_VIRT_CODE.fd** and **RISCV_VIRT_VARS.fd** are created.
+
 ## 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 RISCV_VIRT_CODE.fd`
 
-    `truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_VARS.fd`
+    `truncate -s 32M RISCV_VIRT_VARS.fd`
 
 2) Running QEMU
 
-- 
2.34.1


  parent reply	other threads:[~2023-07-11 15:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 15:43 [PATCH v2 0/4] OvmfPkg/RiscVVirt: Add CLANGDWARF toolchain support Sunil V L
2023-07-11 15:43 ` [PATCH v2 1/4] OvmfPkg/RiscVVirt: use 'auto' alignment and FIXED for XIP modules Sunil V L
2023-07-11 15:43 ` [PATCH v2 2/4] OvmfPkg/RiscVVirt: SecEntry: Remove unnecessary assembly directives Sunil V L
2023-07-11 15:43 ` [PATCH v2 3/4] BaseTools/tools_def: Add CLANGDWARF support for RISC-V Sunil V L
2023-07-31 11:28   ` [edk2-devel] " Rebecca Cran
2023-07-11 15:43 ` Sunil V L [this message]
2023-07-17  1:51 ` 回复: [PATCH v2 0/4] OvmfPkg/RiscVVirt: Add CLANGDWARF toolchain support gaoliming
2023-07-17  4:07   ` [edk2-devel] " Sunil V L
2023-07-17  9:38   ` Ard Biesheuvel
2023-07-21  4:52     ` Sunil V L
2023-07-25 15:59       ` Ard Biesheuvel
2023-07-28  5:32         ` Sunil V L
2023-07-31 10:29           ` Ard Biesheuvel
2023-07-31 11:28             ` Rebecca Cran
2023-07-31 14:24               ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230711154335.586343-5-sunilvl@ventanamicro.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox