35 lines
886 B
Diff
35 lines
886 B
Diff
From 26d7d0228dff985138593ef085b5f22bfabee0b7 Mon Sep 17 00:00:00 2001
|
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
|
Date: Sat, 11 Feb 2023 16:28:21 +0800
|
|
Subject: [PATCH] add loongarch64 support for blivet
|
|
|
|
---
|
|
blivet/arch.py | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/blivet/arch.py b/blivet/arch.py
|
|
index 2cd978e..bc76031 100644
|
|
--- a/blivet/arch.py
|
|
+++ b/blivet/arch.py
|
|
@@ -333,6 +333,8 @@ def is_ipseries():
|
|
def is_powernv():
|
|
return is_ppc() and get_ppc_machine() == "PowerNV"
|
|
|
|
+def is_loongarch():
|
|
+ return os.uname()[4] == 'loongarch64'
|
|
|
|
def get_arch():
|
|
"""
|
|
@@ -349,6 +351,8 @@ def get_arch():
|
|
elif is_ppc(bits=64):
|
|
# ppc64 and ppc64le are distinct architectures
|
|
return os.uname()[4]
|
|
+ elif is_loongarch():
|
|
+ return os.uname()[4]
|
|
elif is_aarch64():
|
|
return 'aarch64'
|
|
elif is_alpha():
|
|
--
|
|
2.33.0
|
|
|