I followed the README. This is just the last step:
$ build -a RISCV64 --buildtarget RELEASE -p
OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t CLANGDWARF
Build environment: Linux-6.3.0-7-generic-x86_64-with-glibc2.37
Build start time: 13:59:38, Jun.28 2023
WORKSPACE = /home/user/workspace/edk2-build
PACKAGES_PATH = /home/user/workspace/edk2-build/edk2
EDK_TOOLS_PATH = /home/user/workspace/edk2-build/edk2/BaseTools
CONF_PATH = /home/user/workspace/edk2-build/edk2/Conf
PYTHON_COMMAND = python3
Processing meta-data
.
Architecture(s) = RISCV64
Build target = RELEASE
Toolchain = CLANGDWARF
Active Platform =
/home/user/workspace/edk2-build/edk2/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
build.py...
: error F000: CC_PATH doesn't exist in CLANGDWARF ToolChain and
RISCV64 Arch.
[/home/user/workspace/edk2-build/edk2/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf]
.
- Failed -
Build end time: 13:59:40, Jun.28 2023
Build total time: 00:00:01
---
The missing piece is:
rm -f edk2/Conf/tools_def.txt
before all other steps.
I restarted after deleting the old configuration file and ended up with:
Building ...
/home/user/workspace/edk2-build/edk2/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
[RISCV64]
clang: error: invalid linker name in argument '-fuse-ld=lld'
clang: error: invalid linker name in argument '-fuse-ld=lld'
Some cleanup before switching to clang seems to be still missing.
On a clean checkout I ran into
BrotliCompress.c:20:10: fatal error: ./brotli/c/common/constants.h: No
such file or directory
20 | #include "./brotli/c/common/constants.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following commands are missing in the instructions:
git submodules init
git submodules update
Currently I am stuck on these errors:
clang: error: no such file or directory:
'/tmp/Build/RiscVVirtQemu/RELEASE_CLANGDWARF/RISCV64/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib/DEBUG/BootManagerVfr.c'
clang: error: no input files
clang: error: no such file or directory:
'/tmp/Build/RiscVVirtQemu/RELEASE_CLANGDWARF/RISCV64/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib/DEBUG/DeviceManagerVfr.c'
clang: error: no input files
Best regards
Heinrich