From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by mx.groups.io with SMTP id smtpd.web11.22575.1688371730650664371 for ; Mon, 03 Jul 2023 01:08:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=bS5jY5ch; spf=pass (domain: ventanamicro.com, ip: 209.85.161.50, mailfrom: sunilvl@ventanamicro.com) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-563439ea4a2so2685753eaf.0 for ; Mon, 03 Jul 2023 01:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688371730; x=1690963730; 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=kwdPRX+iPy8jyUE+NG7StUceFd/zzgOby/5QQ2N9swM=; b=bS5jY5chUDUz4CBgAemB5yHjS9/y6PoSD1SIIs59fpaIpVxrZ86DB/j3w29Fq/b18L IQRJeqGuWYEhSKKdAuF532S35JbuE+cxwMOP5nivXBix7IDORnYP/jjNsq/tE7FgrfPu naP5BIyC0jl2/nNGpYDb/Dxf0VjUE9OCY0zrsPmCQqqfKTY/lYPHUqjHkCUKLoVCqOqQ rbgnFSGSUz1NAL5ZzdJWm3sViiBmoGGMJ/xtD4W2deBNhzU964O8/djnrzrd/5PYJ/0U cLkGADBSNIFI5VP5podlZHgJ81Ol6rr5ildLmlobMNxXx8n6xmywSIUPWSaIvCtfSimP 9TOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688371730; x=1690963730; 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=kwdPRX+iPy8jyUE+NG7StUceFd/zzgOby/5QQ2N9swM=; b=RjJ0lYmYvyC1ppRCzJwvU79TNws/Dn0t5AOAvNpRyvDxGThz7hgQJ61bkGPV+6XqSM hLFMmRMNat/ssKT8DE3iJT66LqOd6f0d32wvjLZDTDLs5BOwnEukDcFjoCoUwlFzNoR9 25WhB80YQE7znsM9Y/QCylwF/1KE5NKVc5tzKwiSYG2g/TH8Ea5JbzJmcwXUhpADN8Kn rC+DsTnlxqv8B6E6gbFoBAa7/H0dUnbQRvzRFlloDwQfC4OjZIfbA5I3MfH+lS7JDAhr 4l5pbj9qLdQinj4/OxiN0BhWxqQhheaisgqtcK1kyA9cO/RQf7fQCMlxmVDrStZnoaYG 9oDg== X-Gm-Message-State: AC+VfDwVSw3x32Wc/bxlC5v4jV6vsjPBXT3WKML7K4h8iazWuaIi+ck7 kWWS0wA+uRq4MNvL8IUNhKwp8xAHxMWZP3R34rA= X-Google-Smtp-Source: ACHHUZ7MAlu9NVhF6Ac5a8DRGWLHEbT4JdDCx9VD5RWMdcmZ7sctma/C8XybcqkXO+xou76XjAURQA== X-Received: by 2002:a05:6808:df2:b0:398:9ee4:1dac with SMTP id g50-20020a0568080df200b003989ee41dacmr8273337oic.32.1688371729842; Mon, 03 Jul 2023 01:08:49 -0700 (PDT) Return-Path: Received: from sunil-laptop.. ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id s18-20020a17090a881200b0024e05b7ba8bsm14863253pjn.25.2023.07.03.01.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 01:08:49 -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 Subject: [PATCH 4/4] OvmfPkg/RiscVVirt: Update README for CLANGDWARF support Date: Mon, 3 Jul 2023 13:38:31 +0530 Message-Id: <20230703080831.51075-5-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230703080831.51075-1-sunilvl@ventanamicro.com> References: <20230703080831.51075-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 --- 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