Ejemplo n.º 1
0
 def getAdditionalPackages(self, driver):
     drvList = []
     # Get the correct linux header package
     linHeader = functions.getLinuxHeadersAndImage()
     drvList.append([linHeader[0], 0])
     # Common packages
     if self.distribution == 'debian':
         drvList.append(['build-essential', 0])
         drvList.append(['module-assistant', 0])
         drvList.append([driver, 1])
         drvList.append(['fglrx-modules-dkms', 1])
         drvList.append(['libgl1-fglrx-glx', 1])
         drvList.append(['glx-alternative-fglrx', 0])
         drvList.append(['fglrx-control', 1])
         drvList.append(['fglrx-glx-ia32', 2])
     else:
         drvList.append([driver, 1])
         drvList.append(['fglrx-amdcccle', 1])
     return drvList
Ejemplo n.º 2
0
    def getAdditionalPackages(self, driver):
        drvList = []
        # Get the correct linux header package
        linHeader = functions.getLinuxHeadersAndImage()
        drvList.append([linHeader[0], 0])
        # Distribution specific packages
        if self.distribution == 'debian':
            drvList.append(['build-essential', 0])
            drvList.append([driver, 1])
            if driver == 'nvidia-glx':
                drvList.append(['nvidia-kernel-dkms', 1])
            elif driver == 'nvidia-glx-legacy-96xx':
                drvList.append(['nvidia-kernel-legacy-96xx-dkms', 1])
            elif driver == 'nvidia-glx-legacy-173xx':
                drvList.append(['nvidia-kernel-legacy-173xx-dkms', 1])
            drvList.append(['nvidia-xconfig', 0])
            drvList.append(['nvidia-glx-ia32', 2])
        else:
            drvList.append([driver, 1])

        # Common packages
        drvList.append(['nvidia-settings', 0])
        return drvList
Ejemplo n.º 3
0
    def installBroadcom(self):
        try:
            self.setCurrentChipInfo()
            if self.installableDriver != '':
                # Get the correct linux header package
                linHeader = functions.getLinuxHeadersAndImage()
                self.log.write('Linux header name to install: ' + linHeader[0], 'broadcom.installBroadcom', 'info')

                # Only install linux header if it is not installed
                if not functions.isPackageInstalled(linHeader[0]):
                    self.log.write('Download package: ' + linHeader[0], 'broadcom.installBroadcom', 'info')
                    self.ec.run('apt-get download ' + linHeader[0])

                # Download the driver and its dependencies
                cmdBc = 'apt-get download ' + self.installableDriver
                self.log.write('Download package: ' + self.installableDriver, 'broadcom.installBroadcom', 'info')
                self.ec.run(cmdBc)
                depList = functions.getPackageDependencies(self.installableDriver)
                for dep in depList:
                    if not functions.isPackageInstalled(dep):
                        cmdDep = 'apt-get download ' + dep
                        self.log.write('Download package dependency: ' + dep, 'broadcom.installBroadcom', 'debug')
                        self.ec.run(cmdDep)

                # Remove any module that might be in the way
                self.log.write('modprobe b44, b43, b43legacy, ssb, brcmsmac', 'broadcom.installBroadcom', 'debug')
                os.system('modprobe -rf b44')
                os.system('modprobe -rf b43')
                os.system('modprobe -rf b43legacy')
                os.system('modprobe -rf ssb')
                os.system('modprobe -rf brcmsmac')

                # Install the dowloaded packages
                self.log.write('Install downloaded packages', 'broadcom.installBroadcom', 'info')
                self.ec.run('dpkg -i *.deb')
                # Delete the downloaded packages
                self.log.write('Remove downloaded debs', 'broadcom.installBroadcom', 'debug')
                os.system('rm -f *.deb')

                # Finish up
                if self.installableDriver == 'broadcom-sta-dkms' or self.installableDriver == 'bcmwl-kernel-source':
                    # Blacklist b43, brcmsmac
                    self.log.write('blacklist b43 brcmsmac bcma ssb', 'broadcom.installBroadcom', 'debug')
                    modFile = open(blacklistPath, 'w')
                    modFile.write('blacklist b43 brcmsmac bcma ssb')
                    modFile.close()
                    # Start wl
                    self.log.write('modprobe wl', 'broadcom.installBroadcom', 'debug')
                    os.system('modprobe wl')
                elif 'b43' in self.installableDriver:
                    # Start b43
                    self.log.write('modprobe b43', 'broadcom.installBroadcom', 'debug')
                    os.system('modprobe b43')
                else:
                    # Start brcmsmac
                    self.log.write('modprobe brcmsmac', 'broadcom.installBroadcom', 'debug')
                    os.system('modprobe brcmsmac')

                self.log.write('Done installing Broadcome drivers', 'broadcom.installBroadcom', 'info')
            else:
                self.log.write('No Broadcom chip set found', 'broadcom.installBroadcom', 'error')

        except Exception, detail:
            self.log.write(detail, 'broadcom.installBroadcom', 'exception')
Ejemplo n.º 4
0
 def __init__(self, distribution, loggerObject):
     self.distribution = distribution.lower()
     self.distributionReleaseNumber = functions.getDistributionReleaseNumber()
     self.log = loggerObject
     self.ec = ExecCmd(self.log)
     self.packages = functions.getLinuxHeadersAndImage(True, 'pae$', '-rt')