Skip to content

Commit c58c4e1

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. .cspell.json reference to upstream CSpell word submission: https://github.com/streetsidesoftware/cspell-dicts/pull/5005/files Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
1 parent a36394e commit c58c4e1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@
117117
"bootmgfw",
118118
"ISCSI",
119119
"SASEX",
120-
"CDROM"
120+
"CDROM",
121+
"LoongArch",
122+
"Loongson"
121123
]
122124
}

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)