diff options
author | d.marlin <dmarlin@redhat.com> | 2012-11-08 07:08:05 -0600 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2012-11-08 12:02:14 -0800 |
commit | a4bde644a006f6fc8e6fbf99e741493d3f963f97 (patch) | |
tree | b063224b53c6a811303c0fb9f86cc4bed4343b0e /pyanaconda/bootloader.py | |
parent | 41037b654a3771fc3af3fc6498ff746ac9553652 (diff) | |
download | anaconda-a4bde644a006f6fc8e6fbf99e741493d3f963f97.tar.gz anaconda-a4bde644a006f6fc8e6fbf99e741493d3f963f97.tar.xz anaconda-a4bde644a006f6fc8e6fbf99e741493d3f963f97.zip |
Add very basic U-Boot support for ARM platforms
Add a very basic U-Boot bootloader class for ARM platforms.
This addresses the following needs.
- avoids using GRUB2 as a placeholder for the bootloader.
- installs the required uboot-tools package by default.
- ensures the boot/uboot partition is bootable.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'pyanaconda/bootloader.py')
-rw-r--r-- | pyanaconda/bootloader.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 8fa3f8b48..3ccecfb21 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -2102,6 +2102,46 @@ class SILO(YabootSILOBase): if rc: raise BootLoaderError("bootloader install failed") +class UBOOT(BootLoader): + name = "UBOOT" + _config_file = "boot.cmd" + packages = ['uboot-tools'] + + stage2_device_types = ["partition"] + + # + # configuration + # + + @property + def config_dir(self): + if self.stage2_device.format.mountpoint == "/boot/uboot/": + return "/boot/uboot" + else: + return "/boot" + + @property + def config_file(self): + return "%s/%s" % (self.config_dir, self._config_file) + + def write_config_images(self, config): + stanza = (" ") + config.write(stanza) + + + # + # installation + # + + def install(self): + _outfile = "%s/boot.scr" % self.config_dir + args = ["-p", self.config_file, _outfile] + rc = iutil.execWithRedirect("cp", args, + stdout="/dev/tty5", stderr="/dev/tty5", + root=ROOT_PATH) + + if rc: + raise BootLoaderError("bootloader install failed") # anaconda-specific functions |