summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord.marlin <dmarlin@redhat.com>2012-07-13 12:46:40 -0500
committerBrian C. Lane <bcl@redhat.com>2012-08-06 14:29:15 -0700
commitb607be40867c929704b79b30c603f84cbceca4d3 (patch)
tree6df42766b8f8e10125d0380c96abc1de4bc6170d
parent38cd711a7f25a1b1b300dafe0b024e9f1df326ac (diff)
downloadanaconda-b607be40867c929704b79b30c603f84cbceca4d3.tar.gz
anaconda-b607be40867c929704b79b30c603f84cbceca4d3.tar.xz
anaconda-b607be40867c929704b79b30c603f84cbceca4d3.zip
Add support to determine the ARM processor variety and select the correct kernel to install.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
-rw-r--r--pyanaconda/iutil.py14
-rw-r--r--pyanaconda/platform.py5
-rw-r--r--pyanaconda/yuminstall.py5
3 files changed, 24 insertions, 0 deletions
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 00fcb6ad7..5f5f2a413 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -640,6 +640,20 @@ def getPPCMacBook():
return 1
return 0
+## Get the ARM processor variety.
+# @return The ARM processor variety type, or 0 if not ARM.
+def getARMMachine():
+ if not isARM():
+ return 0
+
+ armMachine = os.uname()[2].rpartition('.' )[2]
+
+ if armMachine.startswith('arm'):
+ return None
+ else:
+ return armMachine
+
+
cell = None
## Determine if the hardware is the Cell platform.
# @return True if so, False otherwise.
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 9abf0f57a..58cfa2dc4 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -337,6 +337,7 @@ class Sparc(Platform):
return start+1
class ARM(Platform):
+ _armMachine = iutil.getARMMachine()
_bootloaderClass = bootloader.GRUB2
_boot_stage1_device_types = ["disk"]
_boot_mbr_description = N_("Master Boot Record")
@@ -345,6 +346,10 @@ class ARM(Platform):
_disklabel_types = ["msdos"]
+ @property
+ def armMachine(self):
+ return self._armMachine
+
def getPlatform():
"""Check the architecture of the system and return an instance of a
Platform subclass to match. If the architecture could not be determined,
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index bb98b860c..1ed2802d3 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -1471,6 +1471,11 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
if selectKernel("kernel-PAE"):
foundkernel = True
+ if not foundkernel and iutil.isARM():
+ if anaconda.platform.armMachine is not None:
+ selectKernel("kernel-" + anaconda.platform.armMachine)
+ foundkernel = True
+
if not foundkernel:
selectKernel("kernel")