edk2-nightly icon indicating copy to clipboard operation
edk2-nightly copied to clipboard

Any chance of throwing RISCV64 binaries into the mix?

Open kallisti5 opened this issue 3 years ago • 9 comments

RISCV64 is now merged into edk2, and having access to nightly RV64 binaries for QEMU would help me greatly in developing OS support.

Thanks for all the hard work here!

kallisti5 avatar Dec 26 '20 15:12 kallisti5

nevermind... it's not merged upstream yet. groan

kallisti5 avatar Dec 26 '20 15:12 kallisti5

Thanks for reaching out. I'm watching the EDK2 mailing list, and I'll add other targets once merged into upstream.

retrage avatar Dec 26 '20 15:12 retrage

Hi! Actually, RISCV64 has been merged upstream. (it just isn't super clear)

The riscv group document this here: https://github.com/riscv/riscv-uefi-edk2-docs

  • HiFive Unleashed (Freedom U540 SoC) in QEMU - u540.fd - working

I'm poking around trying to find build instructions.

kallisti5 avatar Dec 26 '20 20:12 kallisti5

(normal steps for tianocore (edk2, edk2-platforms, edk2-non-osi)

#Install toolchain from ArchLinux
sudo pacman -Sy riscv64-elf-binutils riscv64-elf-gcc riscv64-elf-gdb riscv64-elf-newlib riscv64-linux-gnu-glibc

export NUM_CPUS=$((`getconf _NPROCESSORS_ONLN`))
export GCC5_RISCV64_PREFIX=riscv64-elf-
build -n $NUM_CPUS -a RISCV64 -t GCC5 -p Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
.
.
file Build/FreedomU540HiFiveUnleashed/DEBUG_GCC5/FV/U540.fd

Build/FreedomU540HiFiveUnleashed/DEBUG_GCC5/FV/U540.fd: data

kallisti5 avatar Dec 26 '20 20:12 kallisti5

Thank you for the instruction document.

I've added the RISCV64 UEFI shell target to the family (c585ecdabde93cea97f044a4401f9deb9292f603) as an initial RISC-V target support.

Because the scope of this repository is providing UEFI shells and firmware images for virtual machines, it's ideal that EDK2 supports the QEMU RISC-V Virt machine platform and has a RISC-V target like ArmVirtPkg to the tianocore/edk2 repository. It may be not so difficult to add edk2-platforms to the build targets, but I would like to wait for the Virt machine support.

retrage avatar Dec 28 '20 10:12 retrage

Reopened the issue to keep tracking.

retrage avatar Dec 28 '20 15:12 retrage

It may be not so difficult to add edk2-platforms to the build targets, but I would like to wait for the Virt machine support.

That's fair. I built the documented edk2 image for u540 yesterday, and without virtio or SD card support it isn't super useful. Really hope we get RV64VirtPkg soon! :-)

kallisti5 avatar Dec 28 '20 16:12 kallisti5

Hi, I have created a GitHub repository which provides nightly builds of RISCV64 U540 and other platforms in edk2-platforms. https://github.com/naitaku/edk2-platforms-build

naitaku avatar Feb 27 '21 15:02 naitaku

Creating RiscvVirtPkg discussion has started. Once the package structure is stabilized, I would like to add it to the target.

https://edk2.groups.io/g/devel/message/80250

retrage avatar Sep 05 '21 05:09 retrage

Now, the upstream EDK2 OVMF has RISC-V support. I already added the build target with PR #11. I'm not tested them yet, but the requested binaries are available. We can close this issue.

retrage avatar Mar 03 '23 07:03 retrage