[PATCH anaconda:rhel7/master v2] Seed the default devicetree value for ARMv8

d.marlin dmarlin at redhat.com
Mon Feb 17 16:27:38 UTC 2014


In order to add a devicetree entry in the grub.cfg file, a valid
default value is needed.  This can be provided in the grub default
file (GRUB_DEFAULT_DTB in /etc/default/grub).

Set the default value to apm-mustang.dtb, since that is the only
hardware we currently have.  This value can be changed later
(post install), but some valid value must be set in order to seed
the variable.

Signed-off-by: David A. Marlin <dmarlin at redhat.com>
---
 pyanaconda/bootloader.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index bc0ce8f..fb38ab9 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1740,6 +1740,16 @@ class Aarch64EFIGRUB(EFIGRUB):
 
     _serial_consoles = ["ttyAMA", "ttyS"]
 
+    #
+    # In addition to the normal grub configuration variables, 
+    # add one more to set the default device-tree filename
+    #
+    def write_defaults(self):
+        super(EFIGRUB, self).write_defaults()
+
+        defaults_file = os.path.normpath(ROOT_PATH + "/" + self.defaults_file)
+        with open(defaults_file, "a+") as defaults
+            defaults.write("GRUB_DEFAULT_DTB=\"apm-mustang.dtb\"\n")
 
 class MacEFIGRUB(EFIGRUB):
     def mactel_config(self):
-- 
1.7.1



More information about the anaconda-patches mailing list