def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString() AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) AboutText += _("Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9] string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString() fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in ('gbquad'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s%sC\n\n") % (tempinfo.replace('\n', ''), mark) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def __init__(self, session, updatebackup=False): Screen.__init__(self, session) self.Console = Console() self.BackupDevice = config.imagemanager.backuplocation.value print "[ImageManager] Device: " + self.BackupDevice self.BackupDirectory = config.imagemanager.backuplocation.value + 'imagebackups/' print "[ImageManager] Directory: " + self.BackupDirectory self.BackupDate = strftime('%Y%m%d_%H%M%S', localtime()) self.WORKDIR = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + '-temp' self.TMPDIR = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + '-mount' backupType = "-" if updatebackup: backupType = "-SoftwareUpdate-" imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() self.MAINDESTROOT = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + backupType + getImageVersion() + '.' + getImageBuild() + imageSubBuild + '-' + self.BackupDate self.kernelMTD = getMachineMtdKernel() self.kernelFILE = getMachineKernelFile() self.rootMTD = getMachineMtdRoot() self.rootFILE = getMachineRootFile() self.MAINDEST = self.MAINDESTROOT + '/' + getImageFolder() + '/' print '[ImageManager] MTD: Kernel:',self.kernelMTD print '[ImageManager] MTD: Root:',self.rootMTD print '[ImageManager] Type:',getImageFileSystem() if 'ubi' in getImageFileSystem(): self.ROOTFSTYPE = 'ubifs' elif 'tar.bz2' in getImageFileSystem(): self.ROOTFSTYPE = 'tar.bz2' else: self.ROOTFSTYPE= 'jffs2' self.swapdevice = "" self.RamChecked = False self.SwapCreated = False self.Stage1Completed = False self.Stage2Completed = False self.Stage3Completed = False self.Stage4Completed = False self.Stage5Completed = False
def getlog(self): if config.usage.show_menupath.value == 'large': if not self.menu_path.endswith(self.screentitle): self.menu_path += self.screentitle title = self.menu_path self["menu_path_compressed"].setText("") elif config.usage.show_menupath.value == 'small': title = self.screentitle self["menu_path_compressed"].setText(self.menu_path + " >" if not self.menu_path.endswith(' / ') else self.menu_path[:-3] + " >" or "") else: title = self.screentitle self["menu_path_compressed"].setText("") self.setTitle(title) global ocram ocramprocessed = False releasenotes = gitlog.fetchlog(self.logtype) if '404 Not Found' not in releasenotes: if getImageType() == 'release': ImageVer = getImageBuild() else: ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild()) ImageVer = float(ImageVer) releasenotes = releasenotes.split('\n\n') ver = -1 releasever = "" viewrelease = "" while not releasever.replace('.','').isdigit(): ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openvix: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) else: releasever = releasever[0] while releasever > ImageVer: if ocram and not ocramprocessed and self.logtype == 'oe': viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n' ocramprocessed = True else: viewrelease += releasenotes[int(ver)]+'\n\n' ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openvix: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) releasever = float(releasever) else: releasever = releasever[0] if not viewrelease and ocram and not ocramprocessed and self.logtype == 'oe': viewrelease = ocram ocramprocessed = True self["text"].setText(viewrelease) summarytext = viewrelease.split(':\n') try: self['title_summary'].setText(summarytext[0]+':') self['text_summary'].setText(summarytext[1]) except: self['title_summary'].setText("") self['text_summary'].setText(viewrelease) else: self['title_summary'].setText("") self['text_summary'].setText(_("Error downloading the change log.")) self['text'].setText(_("Error downloading the change log."))
from Components.Label import Label from Components.config import config from Screens.Screen import Screen from enigma import eTimer from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType from sys import modules from datetime import datetime from json import loads import urllib2 if getImageType() == 'release': ImageVer = getImageBuild() else: ImageVer = "%s.%s" % (getImageBuild(), getImageDevBuild()) ImageVer = float(ImageVer) E2Branches = {'developer': 'Dev', 'release': 'master'} project = 0 projects = [ ("https://api.github.com/repos/OpenViX/enigma2/commits?sha=%s" % E2Branches[getImageType()], "Enigma2"), ("https://api.github.com/repos/OpenViX/vix-core/commits", "ViX Core"), ("https://api.github.com/repos/OpenViX/skins/commits", "ViX Skins"), ("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.0", "OE-A Core"), ("https://api.github.com/repos/oe-alliance/oe-alliance-plugins/commits?sha=2.3", "OE-A Plugins"), ("https://api.github.com/repos/oe-alliance/AutoBouquetsMaker/commits",
def populate(self): self["lab1"] = StaticText(_("Open Black Hole")) self["lab2"] = StaticText(_("From the BH Team")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at %s") % "www.vuplus-community.net") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["HasH9SD"]: if "rootfstype=ext4" in open( '/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(): part = " - SD card in use for Image root \n" else: part = " - eMMC slot in use for Image root \n" AboutText += _("%s") % part if SystemInfo["canMultiBoot"]: slot = image = GetCurrentImage() part = "eMMC slot %s" % slot bootmode = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() print "[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"], slot) if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][ slot]['root']: if slot > 4: image -= 4 else: image -= 1 part = "SDcard slot %s (%s) " % ( image, SystemInfo["canMultiBoot"][slot]['root']) AboutText += _("Image Slot:\t%s") % "STARTUP_" + str( slot) + " " + part + " " + bootmode + "\n" skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("FFmpeg:\t%s\n") % about.getFFmpegVersionString( ).replace("FFmpeg ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): with open('/proc/stb/sensors/temp0/value', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/fp/temp_sensor'): with open('/proc/stb/fp/temp_sensor', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/sensors/temp/value'): with open('/proc/stb/sensors/temp/value', 'r') as f: tempinfo = f.read() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): with open('/proc/stb/fp/temp_sensor_avs', 'r') as f: tempinfo = f.read() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: with open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') as f: tempinfo = f.read() tempinfo = tempinfo[:-4] except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: tempinfo = search( 'temperature = (\d+) degree', open("/proc/hisi/msp/pm_cpu").read()).group(1) except: tempinfo = "" if tempinfo and int(tempinfo) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) if SystemInfo["BoxInfo"]: BoxInfo = SystemInfo["BoxInfo"] AboutText += _("SoC:\t%s\n") % BoxInfo.getItem("socfamily").upper() tempinfo = "" if path.exists("/proc/stb/sensors/temp0/value"): with open("/proc/stb/sensors/temp0/value", "r") as f: tempinfo = f.read() elif path.exists("/proc/stb/fp/temp_sensor"): with open("/proc/stb/fp/temp_sensor", "r") as f: tempinfo = f.read() elif path.exists("/proc/stb/sensors/temp/value"): with open("/proc/stb/sensors/temp/value", "r") as f: tempinfo = f.read() if tempinfo and int(tempinfo.replace("\n", "")) > 0: AboutText += _("System temp:\t%s") % tempinfo.replace( "\n", "").replace(" ", "") + "\xb0" + "C\n" tempinfo = "" if path.exists("/proc/stb/fp/temp_sensor_avs"): with open("/proc/stb/fp/temp_sensor_avs", "r") as f: tempinfo = f.read() elif path.exists("/sys/devices/virtual/thermal/thermal_zone0/temp"): try: with open("/sys/devices/virtual/thermal/thermal_zone0/temp", "r") as f: tempinfo = f.read() tempinfo = tempinfo[:-4] except: tempinfo = "" elif path.exists("/proc/hisi/msp/pm_cpu"): try: tempinfo = search( "temperature = (\d+) degree", open("/proc/hisi/msp/pm_cpu").read()).group(1) except: tempinfo = "" if tempinfo and int(tempinfo) > 0: AboutText += _("Processor temp:\t%s") % tempinfo.replace( "\n", "").replace(" ", "") + "\xb0" + "C\n" imageSubBuild = "" if getImageType() != "release": imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["BoxInfo"]: BoxInfo = SystemInfo["BoxInfo"] if BoxInfo.getItem( "mtdbootfs") != "" and " " not in BoxInfo.getItem( "mtdbootfs"): AboutText += _("Boot Device:\t%s\n") % BoxInfo.getItem( "mtdbootfs") if SystemInfo["HasH9SD"]: if "rootfstype=ext4" in open( "/sys/firmware/devicetree/base/chosen/bootargs", "r").read(): part = " - SD card in use for Image root \n" else: part = " - eMMC slot in use for Image root \n" AboutText += _("%s") % part if SystemInfo["canMultiBoot"]: slot = image = SystemInfo["MultiBootSlot"] part = "eMMC slot %s" % slot bootmode = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() print("[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"], slot)) if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][ slot]["root"]: if slot > 4: image -= 4 else: image -= 1 part = "SDcard slot %s (%s) " % ( image, SystemInfo["canMultiBoot"][slot]["root"]) AboutText += _("Image Slot:\t%s") % "Startup " + str( slot) + " - " + part + " " + bootmode + "\n" if getMachineName() in ("ET8500") and path.exists("/proc/mtd"): self.dualboot = self.dualBoot() if self.dualboot: AboutText += _("ET8500 Multiboot: Installed\n") skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = "-".join((day, month, year)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") if isPluginInstalled( "ServiceApp" ) and config.plugins.serviceapp.servicemp3.replace.value == True: AboutText += _( "4097 iptv player:\t%s\n" ) % config.plugins.serviceapp.servicemp3.player.value else: AboutText += _("4097 iptv player:\tDefault player\n") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() flashDate = about.getFlashDateString()[8:] + about.getFlashDateString( )[4:8] + about.getFlashDateString()[0:4] AboutText += _("Installed:\t%s\n") % flashDate lastUpdate = getEnigmaVersionString()[8:] + getEnigmaVersionString( )[4:8] + getEnigmaVersionString()[0:4] AboutText += _("Last update:\t%s\n") % lastUpdate AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value uptime = about.getBoxUptime() if uptime: AboutText += _("Uptime:\t%s\n") % uptime e2uptime = about.getEnigmaUptime() if e2uptime: AboutText += _("Enigma2 uptime:\t%s\n") % e2uptime AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
from Components.Label import Label from Components.config import config from Screens.Screen import Screen from enigma import eTimer from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType from sys import modules from datetime import datetime from json import loads import urllib2 if getImageType() == 'release': ImageVer = "%03d" % int(getImageBuild()) else: ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild()) ImageVer = float(ImageVer) E2Branches = { 'developer' : 'Dev', 'release' : 'master' } project = 0 projects = [ ("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.2", "OE-A Core"), ("https://api.github.com/repos/OpenViX/enigma2/commits?sha=%s" % E2Branches[getImageType()], "Enigma2"), ("https://api.github.com/repos/OpenViX/vix-core/commits", "ViX Core"), ("https://api.github.com/repos/OpenViX/skins/commits", "ViX Skins"), ("https://api.github.com/repos/oe-alliance/oe-alliance-plugins/commits", "OE-A Plugins"), ("https://api.github.com/repos/oe-alliance/AutoBouquetsMaker/commits", "AutoBouquetsMaker"),
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n") % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n") % about.getChipSetString().upper() else: AboutText += _("Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["canMultiBoot"]: slot = image = GetCurrentImage() part = "eMMC slot %s" %slot bootmode = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" %GetCurrentImageMode() if SystemInfo["HasSDmmc"]: slot += 1 if image != 0: part = "SDC slot %s (%s%s) " %(image, SystemInfo["canMultiBoot"][2], image*2) else: part = "eMMC slot %s" %slot AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(slot) + " " + part + " " + bootmode + "\n" if getMachineName() in ('ET8500') and path.exists('/proc/mtd'): self.dualboot = self.dualBoot() if self.dualboot: AboutText += _("ET8500 Multiboot: Installed\n") skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(" (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: tempinfo = search('temperature = (\d+) degree', open("/proc/hisi/msp/pm_cpu").read()).group(1) except: tempinfo = "" if tempinfo and int(tempinfo) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["canMultiBoot"]: image = GetCurrentImage() bootmode = "" part = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() if SystemInfo["HasHiSi"]: if image != 0: part = "%s%s" % (SystemInfo["canMultiBoot"][2], image * 2) image += 1 else: part = "MMC" image += 1 AboutText += _("Image Slot:\t%s") % "STARTUP_" + str( image) + " " + part + " " + bootmode + "\n" if getMachineName() in ('ET8500') and path.exists('/proc/mtd'): self.dualboot = self.dualBoot() if self.dualboot: AboutText += _("ET8500 Multiboot: Installed\n") skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
import boxbranding print "getMachineBuild=%s<" %boxbranding.getMachineBuild() print "getMachineMake=%s<" %boxbranding.getMachineMake() print "getMachineProcModel=%s<" %boxbranding.getMachineProcModel() print "getMachineBrand=%s<" %boxbranding.getMachineBrand() print "getMachineName=%s<" %boxbranding.getMachineName() print "getMachineMtdKernel=%s<" %boxbranding.getMachineMtdKernel() print "getMachineKernelFile=%s<" %boxbranding.getMachineKernelFile() print "getMachineMtdRoot=%s<" %boxbranding.getMachineMtdRoot() print "getMachineRootFile=%s<" %boxbranding.getMachineRootFile() print "getMachineMKUBIFS=%s<" %boxbranding.getMachineMKUBIFS() print "getMachineUBINIZE=%s<" %boxbranding.getMachineUBINIZE() print "getBoxType=%s<" %boxbranding.getBoxType() print "getBrandOEM=%s<" %boxbranding.getBrandOEM() print "getOEVersion=%s<" %boxbranding.getOEVersion() print "getDriverDate=%s<" %boxbranding.getDriverDate() print "getImageVersion=%s<" %boxbranding.getImageVersion() print "getImageBuild=%s<" %boxbranding.getImageBuild() print "getImageDevBuild=%s<" %boxbranding.getImageDevBuild() print "getImageType=%s<" %boxbranding.getImageType() print "getImageDistro=%s<" %boxbranding.getImageDistro() print "getImageFolder=%s<" %boxbranding.getImageFolder() print "getImageFileSystem=%s<" %boxbranding.getImageFileSystem() print "getImageArch=%s<" %boxbranding.getImageArch()
def getlog(self): if config.usage.show_menupath.value == 'large': if not self.menu_path.endswith(self.screentitle): self.menu_path += self.screentitle title = self.menu_path self["menu_path_compressed"].setText("") elif config.usage.show_menupath.value == 'small': title = self.screentitle self["menu_path_compressed"].setText(self.menu_path + " >" if not self.menu_path.endswith(' / ') else self.menu_path[:-3] + " >" or "") else: title = self.screentitle self["menu_path_compressed"].setText("") self.setTitle(title) global ocram ocramprocessed = False releasenotes = gitlog.fetchlog(self.logtype) if '404 Not Found' not in releasenotes: if getImageType() == 'release': ImageVer = getImageBuild() else: ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild()) ImageVer = float(ImageVer) releasenotes = releasenotes.split('\n\n') ver = -1 releasever = "" viewrelease = "" while not releasever.replace('.','').isdigit(): ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openbh: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) else: releasever = releasever[0] while releasever > ImageVer: if ocram and not ocramprocessed and self.logtype == 'oe': viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n' ocramprocessed = True else: viewrelease += releasenotes[int(ver)]+'\n\n' ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openbh: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) releasever = float(releasever) else: releasever = releasever[0] if not viewrelease and ocram and not ocramprocessed and self.logtype == 'oe': viewrelease = ocram ocramprocessed = True self["text"].setText(viewrelease) summarytext = viewrelease.split(':\n') try: self['title_summary'].setText(summarytext[0]+':') self['text_summary'].setText(summarytext[1]) except: self['title_summary'].setText("") self['text_summary'].setText(viewrelease) else: self['title_summary'].setText("") self['text_summary'].setText(_("Error downloading the change log.")) self['text'].setText(_("Error downloading the change log."))
print 'getMachineProcModel=%s<' % boxbranding.getMachineProcModel() print 'getMachineBrand=%s<' % boxbranding.getMachineBrand() print 'getMachineName=%s<' % boxbranding.getMachineName() print 'getMachineMtdKernel=%s<' % boxbranding.getMachineMtdKernel() print 'getMachineKernelFile=%s<' % boxbranding.getMachineKernelFile() print 'getMachineMtdRoot=%s<' % boxbranding.getMachineMtdRoot() print 'getMachineRootFile=%s<' % boxbranding.getMachineRootFile() print 'getMachineMKUBIFS=%s<' % boxbranding.getMachineMKUBIFS() print 'getMachineUBINIZE=%s<' % boxbranding.getMachineUBINIZE() print 'getBoxType=%s<' % boxbranding.getBoxType() print 'getBrandOEM=%s<' % boxbranding.getBrandOEM() print 'getOEVersion=%s<' % boxbranding.getOEVersion() print 'getDriverDate=%s<' % boxbranding.getDriverDate() print 'getImageVersion=%s<' % boxbranding.getImageVersion() print 'getImageBuild=%s<' % boxbranding.getImageBuild() print 'getImageDevBuild=%s<' % boxbranding.getImageDevBuild() print 'getImageType=%s<' % boxbranding.getImageType() print 'getImageDistro=%s<' % boxbranding.getImageDistro() print 'getImageFolder=%s<' % boxbranding.getImageFolder() print 'getImageFileSystem=%s<' % boxbranding.getImageFileSystem() print 'getImageDevBuild=%s<' % boxbranding.getImageDevBuild() print 'getImageType=%s<' % boxbranding.getImageType() print 'getMachineMake=%s<' % boxbranding.getMachineMake() print 'getImageArch=%s<' % boxbranding.getImageArch() print 'getFeedsUrl=%s<' % boxbranding.getFeedsUrl() print 'getDisplayType=%s<' % boxbranding.getDisplayType() print 'getHaveHDMI=%s<' % boxbranding.getHaveHDMI() print 'getHaveYUV=%s<' % boxbranding.getHaveYUV() print 'getHaveRCA=%s<' % boxbranding.getHaveRCA() print 'getHaveAVJACK=%s<' % boxbranding.getHaveAVJACK() print 'getHaveSCART=%s<' % boxbranding.getHaveSCART()
def getlog(self): global ocram ocramprocessed = False releasenotes = gitlog.fetchlog(self.logtype) if '404 Not Found' not in releasenotes: if getImageType() == 'release': ImageVer = getImageBuild() else: ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild()) ImageVer = float(ImageVer) releasenotes = releasenotes.split('\n\n') ver = -1 releasever = "" viewrelease = "" while not releasever.replace('.','').isdigit(): ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openvix: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) else: releasever = releasever[0] while releasever > ImageVer: if ocram and not ocramprocessed and self.logtype == 'oe': viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n' ocramprocessed = True else: viewrelease += releasenotes[int(ver)]+'\n\n' ver += 1 releasever = releasenotes[int(ver)].split('\n') releasever = releasever[0].split('openvix: ') if len(releasever) > 1: releasever = releasever[1].split(' ') tmp = releasever[1].split('.') if len(tmp) > 2: if getImageType() == 'release': releasever = tmp[2] else: releasever = '%s.%s' % (tmp[2], tmp[3]) releasever = float(releasever) else: releasever = releasever[0] if not viewrelease and ocram and not ocramprocessed and self.logtype == 'oe': viewrelease = ocram ocramprocessed = True self["text"].setText(viewrelease) summarytext = viewrelease.split(':\n') try: self['title_summary'].setText(summarytext[0]+':') self['text_summary'].setText(summarytext[1]) except: self['title_summary'].setText("") self['text_summary'].setText(viewrelease) else: self['title_summary'].setText("") self['text_summary'].setText(_("Error downloading the change log.")) self['text'].setText(_("Error downloading the change log."))
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() cpuMHz = "" if getMachineBuild() in ('vusolo4k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('hd52','hd51'): try: import binascii f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb') clockfrequency = f.read() f.close() cpuMHz = " (%s MHz)" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1)) except: cpuMHz = " (1,7 GHz)" else: if path.exists('/proc/cpuinfo'): f = open('/proc/cpuinfo', 'r') temp = f.readlines() f.close() try: for lines in temp: lisp = lines.split(': ') if lisp[0].startswith('cpu MHz'): #cpuMHz = " (" + lisp[1].replace('\n', '') + " MHz)" cpuMHz = " (" + str(int(float(lisp[1].replace('\n', '')))) + " MHz)" break except: pass AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("CPU:\t%s\n") % about.getCPUString().replace('bcm', 'BCM') AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(22) image = f.read(1) f.close() if bootname: bootname = " (%s)" %bootname AboutText += _("Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(" (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" self["AboutScrollLabel"] = ScrollLabel(AboutText)
import os from time import time if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"): sys.path.append("/usr/lib/enigma2/python/enigma.zip") from Tools.Profile import profile, profile_final profile("PYTHON_START") import Tools.RedirectOutput from boxbranding import getBrandOEM, getImageVersion, getImageBuild, getImageDevBuild, getImageType print "[Image Type] %s" % getImageType() print "[Image Version] %s" % getImageVersion() print "[Image Build] %s" % getImageBuild() if getImageType() != 'release': print "[Image DevBuild] %s" % getImageDevBuild() import enigma import eConsoleImpl import eBaseImpl enigma.eTimer = eBaseImpl.eTimer enigma.eSocketNotifier = eBaseImpl.eSocketNotifier enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer from traceback import print_exc profile("SimpleSummary") from Screens import InfoBar from Screens.SimpleSummary import SimpleSummary from sys import stdout, exc_info
if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"): sys.path.append("/usr/lib/enigma2/python/enigma.zip") from Tools.Profile import profile, profile_final profile("PYTHON_START") # Don't remove this line. It may seem to do nothing, but if removed, # it will break output redirection for crash logs. import Tools.RedirectOutput from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType, getImageArch print "[Image Type] %s" % getImageType() print "[Image Version] %s" % getImageVersion() print "[Image Build] %s" % getImageBuild() if getImageType() != 'release': print "[Image DevBuild] %s" % getImageDevBuild() import enigma import eConsoleImpl import eBaseImpl enigma.eTimer = eBaseImpl.eTimer enigma.eSocketNotifier = eBaseImpl.eSocketNotifier enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer if getImageArch() in ("aarch64"): import usb.core import usb.backend.libusb1 usb.backend.libusb1.get_backend( find_library=lambda x: "/lib64/libusb-1.0.so.0") from traceback import print_exc
print("getMachineMtdKernel=%s<" %boxbranding.getMachineMtdKernel()) print("getMachineKernelFile=%s<" %boxbranding.getMachineKernelFile()) print("getMachineMtdRoot=%s<" %boxbranding.getMachineMtdRoot()) print("getMachineRootFile=%s<" %boxbranding.getMachineRootFile()) print("getMachineMKUBIFS=%s<" %boxbranding.getMachineMKUBIFS()) print("getMachineUBINIZE=%s<" %boxbranding.getMachineUBINIZE()) print("getBoxType=%s<" %boxbranding.getBoxType()) print("getBrandOEM=%s<" %boxbranding.getBrandOEM()) print("getOEVersion=%s<" %boxbranding.getOEVersion()) print("getDriverDate=%s<" %boxbranding.getDriverDate()) print("getImageVersion=%s<" %boxbranding.getImageVersion()) print("getImageBuild=%s<" %boxbranding.getImageBuild()) print("getImageDistro=%s<" %boxbranding.getImageDistro()) print("getImageFolder=%s<" %boxbranding.getImageFolder()) print("getImageFileSystem=%s<" %boxbranding.getImageFileSystem()) print("getImageDevBuild=%s<" %boxbranding.getImageDevBuild()) print("getImageType=%s<" %boxbranding.getImageType()) print("getMachineMake=%s<" %boxbranding.getMachineMake()) print("getImageArch=%s<" %boxbranding.getImageArch()) print("getFeedsUrl=%s<" %boxbranding.getFeedsUrl()) print("getDisplayType=%s<" %boxbranding.getDisplayType()) print("getHaveHDMI%s<" %boxbranding.getHaveHDMI()) print("getHaveYUV%s<" %boxbranding.getHaveYUV()) print("getHaveRCA%s<" %boxbranding.getHaveRCA()) print("getHaveAVJACK%s<" %boxbranding.getHaveAVJACK()) print("getHaveSCART%s<" %boxbranding.getHaveSCART()) print("getHaveSCARTYUV%s<" %boxbranding.getHaveSCARTYUV()) print("getHaveDVI%s<" %boxbranding.getHaveDVI()) print("getHaveMiniTV%s<" %boxbranding.getHaveMiniTV()) print("getHaveHDMIinHD%s<" %boxbranding.getHaveHDMIinHD()) print("getHaveHDMIinFHD%s<" %boxbranding.getHaveHDMIinFHD())
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if about.getIsBroadcom(): AboutText += _( "Chipset:\tBCM%s\n") % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString().replace('bcm', 'BCM') AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(" (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Open Black Hole Image")) self["lab2"] = StaticText(_("By Bh Team")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.vuplus-community.net") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString().replace( 'bcm', 'BCM') AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) AboutText += _( "Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9] string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString() tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temperature:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)