From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web11.3117.1689090238025447535 for ; Tue, 11 Jul 2023 08:43:58 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=WxTklVSw; spf=pass (domain: ventanamicro.com, ip: 209.85.210.181, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6686a05bc66so3384991b3a.1 for ; Tue, 11 Jul 2023 08:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689090237; x=1691682237; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L5WhEnZM/1H4cplt+973Aejpms3zlEmG2tF0omAYkNY=; b=WxTklVSwlu55hb2Ej5nIHLpX5tD/UKWBnpjyfOnInBMapWvVoWeU10S6d3jO2fUsAa Y3LcEEQmwT59qFskoZtMB7orSHqolRTcg+bjwaDhtFNMJ/XtvjQE3NuLtLlU3QoAb1Xp 1gUHJW86ixb/pM2AnHyV1HgMddSnyETDyIGglVD+rSV2NHgMZ2ECXjS3rdJRbIVYw8Tn Qec1fc9JCjKvXruTsyYNZkQH2tBz265yDlRjVlnhXs9AuNYeC58RCIpLBTptuQtab9zC k6CBUYzQwuMwC7m+ysG+/tJkhSWcGkO9eqShe0//uSc/Su/Z5yo22K1faZYo7mte6iRB TQTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689090237; x=1691682237; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L5WhEnZM/1H4cplt+973Aejpms3zlEmG2tF0omAYkNY=; b=Df6lLPSaI6OMsm0ooS7gctuDDnEgGrhp3SkGmLiJWdZzNXUYzrQ3A9mD3lV976T13k qIVgxynPiLSYFZAfjDVRbWyUim7yZ0mxWzDAY+MjzG7d4jUn6SItWliQcv04ozvN1pzO a4sajt1XCIoLmRoaiZMLiLP+aV61QyJ64R3fIHGOQgoMV4WFA8kVHJ1mTHKfCMTvD8cV laKiqd3IiSUB5Y7yVbdJQ4bdLQGZgPWmvpMFUsADtzMqB6w5mRM4nN+T+GoBSTmtomeE VeDOy8IdLJpbiY29eX/Te3oBnG5uGCH3EfM9LDvfV6mgndhIJ5kgb+LqzMNtuM/WW/dI UDcA== X-Gm-Message-State: ABy/qLaQDbY7R1VaHvdri24WAroE1r3r1ADHOZVBRC9lRA3NABGZcyNf em6tyqEJIDHLRaQX1UCW/oPsvNi9kp9EbALN99M= X-Google-Smtp-Source: APBJJlHAi9dSJVdWwzUVV9ePX/rqOtsaDisP9rVZ1e3n7fY6BUIl5h7lBNfzUFIFsTY6QnSMpP5/wg== X-Received: by 2002:a17:902:ab88:b0:1b8:918d:ac48 with SMTP id f8-20020a170902ab8800b001b8918dac48mr11604976plr.56.1689090237261; Tue, 11 Jul 2023 08:43:57 -0700 (PDT) Return-Path: Received: from sunil-laptop.. ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id k9-20020a170902694900b001b9f75c8c4dsm923084plt.52.2023.07.11.08.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 08:43:56 -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 , Heinrich Schuchardt , Ard Biesheuvel Subject: [PATCH v2 4/4] OvmfPkg/RiscVVirt: Update README for CLANGDWARF support Date: Tue, 11 Jul 2023 21:13:35 +0530 Message-Id: <20230711154335.586343-5-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230711154335.586343-1-sunilvl@ventanamicro.com> References: <20230711154335.586343-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Update the README with instruction to build using CLANGDWARF toolchain. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Andrei Warkentin Signed-off-by: Sunil V L Reviewed-by: Heinrich Schuchardt Acked-by: Ard Biesheuvel --- 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