BaseTools: Update GenFw/GenFv to support LoongArch platform.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053 C code changes for building EDK2 LoongArch platform. For definitions of PE/COFF and LOONGARCH relocation types, see the "Machine Types" and "Basic Relocation Types" sections of this URL for LOONGARCH values: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn> Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn> Co-authored-by: Yang Zhou <zhouyang@loongson.cn> Co-authored-by: Xiaotian Wu <wuxiaotian@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
@@ -31,6 +31,9 @@ ifndef HOST_ARCH
|
||||
ifneq (,$(findstring riscv64,$(uname_m)))
|
||||
HOST_ARCH=RISCV64
|
||||
endif
|
||||
ifneq (,$(findstring loongarch64,$(uname_m)))
|
||||
HOST_ARCH=LOONGARCH64
|
||||
endif
|
||||
ifndef HOST_ARCH
|
||||
$(info Could not detected HOST_ARCH from uname results)
|
||||
$(error HOST_ARCH is not defined!)
|
||||
@@ -70,6 +73,9 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
|
||||
else ifeq ($(HOST_ARCH), RISCV64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/RiscV64/
|
||||
|
||||
else ifeq ($(HOST_ARCH), LOONGARCH64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/LoongArch64/
|
||||
|
||||
else
|
||||
$(error Bad HOST_ARCH)
|
||||
endif
|
||||
|
Reference in New Issue
Block a user