Skip to content

Commit e51b91b

Browse files
committed
edk2-pytool-library: Add LoongArch64 host architecture support
The current GetHostInfo() does not recognize 'loongarch64' returned by platform.machine(). This causes stuart_setup and other edk2 tools to fail on LoongArch systems. This patch adds basic detection for LoongArch64 and treats it as a 64-bit ARM-like architecture, which allows edk2 Python tools to run on LoongArch. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
1 parent a36394e commit e51b91b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

edk2toollib/utility_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ def GetHostInfo() -> namedtuple:
109109
arch = "x86"
110110
elif ("ARM" in processor_info.upper()) or ("AARCH" in processor_info.upper()):
111111
arch = "ARM"
112+
elif ("LOONGARCH" in processor_info.upper()):
113+
arch = "LOONGARCH"
112114

113115
if "32" in processor_info:
114116
bit = "32"

0 commit comments

Comments
 (0)