在 2023/3/31 下午8:12, Gerd Hoffmann 写道:
On Fri, Mar 31, 2023 at 08:54:16AM +0800, maobibo wrote:
Xuerui,
Thanks for your mail, it is a good suggestion. Now we are planing to
move LoongArch uefi bios from edk2-platform to edk2 repo, so that uefi
bios supporting LoongArch can be auto compiled and uploaded to qemu
repo. Only that process is somwhat slow since lacking of hands,
however we are doing this.
Good, so I think it makes sense for qemu to just wait for that to
happen.
Related question: What are the requirements to build the firmware?
Fedora 38 ships cross compiler packages ...
binutils-loongarch64-linux-gnu-2.39-3.fc38.x86_64
gcc-loongarch64-linux-gnu-12.2.1-5.fc38.x86_64
... but when trying to use them to compile the loongarch firmware gcc
throws errors:
loongarch64-linux-gnu-gcc: error: unrecognized command-line option
‘-mno-explicit-relocs’
I suspect gcc-12 is just too old?
Yes.
[gaosong@kvm-dev1 BIOS]$ loongarch64-unknown-linux-gnu-gcc --version
loongarch64-unknown-linux-gnu-gcc (GCC) 13.0.0 20220906 (experimental)
See:
https://github.com/tianocore/edk2-platforms/tree/master/Platform/Loongson/LoongArchQemuPkg#readme
or
docs/system/loongarch/virt.rst
Thanks.
Song Gao