mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 00:24:07 +02:00
OvmfPkg/RiscVVirt: Update README for CLANGDWARF support
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> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6
This commit is contained in:
parent
3f49462558
commit
677f2c6f15
@ -12,24 +12,46 @@ The minimum QEMU version required is
|
|||||||
[7efd65423a](https://github.com/qemu/qemu/commit/7efd65423ab22e6f5890ca08ae40c84d6660242f)
|
[7efd65423a](https://github.com/qemu/qemu/commit/7efd65423ab22e6f5890ca08ae40c84d6660242f)
|
||||||
which supports separate pflash devices for EDK2 code and variable storage.
|
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
|
## Build
|
||||||
|
|
||||||
|
### Using GCC toolchain
|
||||||
|
**Prerequisite**: RISC-V GNU compiler toolchain should be installed.
|
||||||
|
|
||||||
export WORKSPACE=`pwd`
|
export WORKSPACE=`pwd`
|
||||||
export GCC5_RISCV64_PREFIX=riscv64-linux-gnu-
|
export GCC5_RISCV64_PREFIX=riscv64-linux-gnu-
|
||||||
export PACKAGES_PATH=$WORKSPACE/edk2
|
export PACKAGES_PATH=$WORKSPACE/edk2
|
||||||
export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
|
export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
|
||||||
source edk2/edksetup.sh
|
source edk2/edksetup.sh --reconfig
|
||||||
make -C edk2/BaseTools
|
make -C edk2/BaseTools
|
||||||
source edk2/edksetup.sh BaseTools
|
source edk2/edksetup.sh BaseTools
|
||||||
build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5
|
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
|
## Test
|
||||||
Below example shows how to boot openSUSE Tumbleweed E20.
|
Below example shows how to boot openSUSE Tumbleweed E20.
|
||||||
|
|
||||||
1) RISC-V QEMU pflash devices should be of of size 32MiB.
|
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) Running QEMU
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user