From 03217e4eeefb6a2ffd9705ba7fdd04471433f7fc Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 13 Feb 2014 08:38:20 -0800 Subject: [PATCH] Remove drivers and modules on ppc64 (#1060691) Remove more drivers and remove plymouth and drm dracut modules. Only on PPC64 initrd, all other arches have the full set of drivers and modules. Resolves: rhbz#1060691 --- src/pylorax/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 5b977300..380a30dc 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -49,6 +49,10 @@ from treeinfo import TreeInfo from discinfo import DiscInfo from executils import runcmd, runcmd_output +# List of drivers to remove on ppc64 arch to keep initrd < 32MiB +REMOVE_PPC64_DRIVERS = "floppy scsi_debug nouveau radeon cirrus mgag200" +REMOVE_PPC64_MODULES = "drm plymouth" + class ArchData(DataHolder): lib64_arches = ("x86_64", "ppc64", "s390x", "ia64", "aarch64") bcj_arch = dict(i386="x86", x86_64="x86", @@ -293,8 +297,12 @@ class Lorax(BaseLoraxClass): templatedir=templatedir) logger.info("rebuilding initramfs images") - dracut_args = ["--xz", "--install", "/.buildstamp", - "--omit-drivers", "floppy scsi_debug"] + dracut_args = ["--xz", "--install", "/.buildstamp"] + + # ppc64 cannot boot an initrd > 32MiB so remove some drivers + if self.arch.basearch == "ppc64": + dracut_args.extend(["--omit-drivers", REMOVE_PPC64_DRIVERS]) + dracut_args.extend(["--omit", REMOVE_PPC64_MODULES]) anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"] treebuilder.rebuild_initrds(add_args=anaconda_args)