[PATCH anaconda:rhel7/master] Seed the default devicetree value for ARMv8
David Marlin
dmarlin at redhat.com
Mon Feb 17 16:28:10 UTC 2014
Vratislav Podzimek wrote:
> On Sat, 2014-02-15 at 12:40 -0600, d.marlin wrote:
>> 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 | 11 +++++++++++
>> 1 files changed, 11 insertions(+), 0 deletions(-)
>>
>> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
>> index bc0ce8f..d0b16e2 100644
>> --- a/pyanaconda/bootloader.py
>> +++ b/pyanaconda/bootloader.py
>> @@ -1740,6 +1740,17 @@ 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 = "%s%s" % (ROOT_PATH, self.defaults_file)
> I'd rather see os.path.normpath(ROOT_PATH + "/" + self.defaults_file)
> here.
>
>> + defaults = open(defaults_file, "a+")
>> + defaults.write("GRUB_DEFAULT_DTB=\"apm-mustang.dtb\"\n")
>> + defaults.close()
> This could be a 'with open(defaults_file, "a+") as defaults' block.
>
Recommended changes made. New patch (v2) sent to list.
Thank you,
d.marlin
More information about the anaconda-patches
mailing list