[PATCH blivet/master] Add initial 64-bit ARM (aarch64) support.
d.marlin
dmarlin at redhat.com
Mon Oct 14 16:15:42 UTC 2013
From: "d.marlin" <dmarlin at redhat.com>
Signed-off-by: David A. Marlin <dmarlin at redhat.com>
---
blivet/arch.py | 10 ++++++++++
blivet/platform.py | 28 ++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/blivet/arch.py b/blivet/arch.py
index cbbf5e6..82e2992 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -303,6 +303,14 @@ def isAlpha():
"""
return os.uname()[4].startswith('alpha')
+def isAARCH64():
+ """
+ :return: True if the hardware supports Aarch64, False otherwise.
+ :rtype: boolean
+
+ """
+ return os.uname()[4] == 'aarch64'
+
def isARM():
"""
:return: True if the hardware supports ARM, False otherwise.
@@ -327,6 +335,8 @@ def getArch():
return 'ppc64'
elif isAlpha():
return 'alpha'
+ elif isAARCH64():
+ return 'aarch64'
elif isARM():
return 'arm'
else:
diff --git a/blivet/platform.py b/blivet/platform.py
index 185d82e..6a9748c 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -304,6 +304,32 @@ class S390(Platform):
return super(S390, self).requiredDiskLabelType(device_type)
+class AARCH64(Platform):
+ _boot_stage1_device_types = ["disk"]
+ _boot_mbr_description = N_("Master Boot Record")
+ _boot_descriptions = {"disk": _boot_mbr_description,
+ "partition": Platform._boot_partition_description}
+
+ _disklabel_types = ["msdos", "gpt"]
+ _non_linux_format_types = ["vfat", "ntfs"]
+
+ def __init__(self):
+ super(AARCH64, self).__init__()
+
+ def setDefaultPartitioning(self):
+ """Return the default platform-specific partitioning information."""
+ ret = Platform.setDefaultPartitioning(self)
+ return ret
+
+ def weight(self, fstype=None, mountpoint=None):
+ score = Platform.weight(self, fstype=fstype, mountpoint=mountpoint)
+ if score:
+ return score
+ elif mountpoint == "/boot":
+ return 2000
+ else:
+ return 0
+
class ARM(Platform):
_armMachine = None
_boot_stage1_device_types = ["disk"]
@@ -381,6 +407,8 @@ def getPlatform():
return EFI()
elif arch.isX86():
return X86()
+ elif arch.isAARCH64():
+ return AARCH64()
elif arch.isARM():
armMachine = arch.getARMMachine()
if armMachine == "omap":
--
1.8.2
More information about the anaconda-patches
mailing list