Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
    def updateInfo(self):
        rc = system("df -h > /tmp/syinfo.tmp")
        text = _("BOX\n") + _("Brand:") + "\t" + getMachineBrand() + "\n"
        f = open("/proc/stb/info/model", 'r')
        text += _("Model:\t") + f.readline()
        f.close()

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                text += _("Chipset:\tHiSilicon %s\n") % about.getChipSetString(
                ).upper()
            elif about.getIsBroadcom():
                text += _("Chipset:\tBroadcom %s\n") % about.getChipSetString(
                ).upper()
            else:
                text += _("Chipset:\t%s\n") % about.getChipSetString().upper()

        text += _("MEMORY\n")
        memTotal = memFree = swapTotal = swapFree = 0
        for line in open("/proc/meminfo", 'r'):
            parts = line.split(':')
            key = parts[0].strip()
            if key == "MemTotal":
                memTotal = parts[1].strip()
            elif key in ("MemFree", "Buffers", "Cached"):
                memFree += int(parts[1].strip().split(' ', 1)[0])
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        text += _("Total memory:") + "\t%s\n" % memTotal
        text += _("Free memory:") + "\t%s kB\n" % memFree
        text += _("Swap total:") + "\t%s \n" % swapTotal
        text += _("Swap free:") + "\t%s \n" % swapFree
        text += "\n" + _("STORAGE") + "\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip(
        ) + "    " + parts[3].strip() + "    " + parts[4] + "\n"
        line = f.readline()
        parts = line.split()
        text += _("Flash") + "\t" + parts[1].strip() + "  " + parts[2].strip(
        ) + "  " + parts[3].strip() + "  " + parts[4] + "\n"
        for line in f.readlines():
            if line.find('/media/') != -1:
                line = line.replace('/media/', '   ')
                parts = line.split()
                if len(parts) == 6:
                    text += parts[5] + "\t" + parts[1].strip(
                    ) + "  " + parts[2].strip() + "  " + parts[3].strip(
                    ) + "  " + parts[4] + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        text += "\n" + _("SOFTWARE") + "\n"
        f = open("/etc/bpversion", 'r')
        text += "Firmware v.:\t" + f.readline()
        f.close()
        text += "Enigma2 v.: \t" + about.getEnigmaVersionString() + "\n"
        text += "Kernel v.: \t" + about.getKernelVersionString() + "\n"

        self["lab1"].setText(text)
Пример #4
0
def getAboutText():
    AboutText = ""

    AboutText += _("Model:\t %s %s\n") % (getMachineBrand(), getMachineName())

    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)

    if about.getChipSetString() != _("unavailable"):
        if about.getIsBroadcom():
            AboutText += _("Chipset:\t BCM%s\n") % str(
                about.getChipSetString().upper())
        else:
            AboutText += _("Chipset:\t %s\n") % str(
                about.getChipSetString().upper())

    bogoMIPS = ""
    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('BogoMIPS'):
                    bogoMIPS = "" + str(int(float(lisp[1].replace('\n',
                                                                  '')))) + ""
                    #bogoMIPS = "" + lisp[1].replace('\n','') + ""
                    break
        except:
            pass

    cpuMHz = ""
    if getMachineBuild() in ('vusolo4k', 'vuultimo4k', 'vuzero4k'):
        cpuMHz = "   (1,5 GHz)"
    elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex',
                               'tiviaraplus'):
        cpuMHz = "   (1,3 GHz)"
    elif getMachineBuild() in ('u51', 'u5', 'u53', 'u52', 'u5pvr', 'h9'):
        cpuMHz = "   (1,6 GHz)"
    elif getMachineBuild() in ('vuuno4kse', 'vuuno4k', 'dm900', 'dm920',
                               'gb7252', 'dags7252', 'xc7439', '8100s'):
        cpuMHz = "   (1,7 GHz)"
    elif getMachineBuild() in ('alien5'):
        cpuMHz = "   (2,0 GHz)"
    elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51',
                               'sf4008', 'vs1500', 'h7'):
        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

    openLD = "OpenLD "

    AboutText += _("CPU:\t %s") % str(
        about.getCPUString()) + cpuMHz + " " + str(
            about.getCpuCoresString2()) + "\n"
    AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"

    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"
    elif path.exists('/boot/cmdline.txt'):
        f = open('/boot/cmdline.txt', 'r')
        f.seek(38)
        image = f.read(1)
        f.close()
        if bootname: bootname = "   (%s)" % bootname
        AboutText += _(
            "Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"

    AboutText += _("Architecture:\t %s") % str(about.getCPUArch()) + "\n"
    AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n"
    AboutText += _("Firmware:\t %s") % openLD + str(getImageVersion()) + "\n"
    #AboutText += _("Build:\t %s") % getImageBuild() + "\n"
    #AboutText += _("Image Type:\t%s\n") % getImageType() + "\n"
    AboutText += _("CodeName:\t %s") % getImageCodeName() + "\n"
    AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n"
    AboutText += _("DVB drivers:\t %s") % str(
        about.getDriverInstalledDate()) + "\n"
    AboutText += _("Last update:\t %s") % MyDateConverter(
        str(getEnigmaVersionString())) + "\n"
    AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n"
    AboutText += _("Uptime:\t %s") % str(about.getUptimeString()) + "\n"
    AboutText += _("GStreamer:\t %s") % str(
        about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
    if path.exists('/usr/bin/ffmpeg'):
        try:
            AboutText += _("FFmpeg:\t %s") % str(
                about.getFFmpegVersionString()) + "\n"
        except:
            pass
    AboutText += _("Python:\t %s") % str(
        about.getPythonVersionString()) + "\n\n"
    #AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"

    #AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n"
    #AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n"

    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ""
    elif fp_version != 0:
        fp_version = _("Frontprocessor version: %s") % fp_version
    else:
        fp_version = _("Frontprocessor version: %d") % fp_version
        AboutText += fp_version + "\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 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()
    elif path.exists('/proc/stb/power/avs'):
        try:
            f = open('/proc/stb/power/avs', 'r')
            temp = f.read()
            celsius = temp[0:-1]
            tempinfo = celsius
            f.close()
        except:
            tempinfo = ""
    elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
        try:
            f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
            temp = f.read()
            tempinfo = temp[:-4]
            f.close()
        except:
            tempinfo = ""
    if tempinfo and str(round(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', ' ')

    return AboutText, AboutLcdText
Пример #5
0
    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)
Пример #6
0
	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)
Пример #7
0
    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)
Пример #8
0
    def populate(self, bootLoaderInfo):
        # Check that About wasn't closed while the boot loader search
        # ran
        if "list" not in self:
            return

        self.list = []

        self.list.append(
            self.makeHeadingInfoEntry(
                _("Model:"), "%s %s" % (getMachineBrand(), getMachineName())))

        self.list.append(self.makeEmptyEntry())

        if about.getChipSetString() != _("unknown"):
            if about.getIsBroadcom():
                self.list.append(
                    self.makeInfoEntry(
                        _("Chipset:"),
                        "BCM%s" % about.getChipSetString().upper()))
            else:
                self.list.append(
                    self.makeInfoEntry(_("Chipset:"),
                                       about.getChipSetString().upper()))
        self.list.append(
            self.makeInfoEntry(_("CPU:"),
                               about.getCPUString().replace('bcm', 'BCM')))
        self.list.append(
            self.makeInfoEntry(_("Architecture:"), about.getCPUArch()))
        self.list.append(
            self.makeInfoEntry(_("Speed:"), about.getCPUSpeedString()))
        self.list.append(
            self.makeInfoEntry(_("Cores:"), str(about.getCpuCoresString())))
        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            tempinfo = file('/proc/stb/sensors/temp0/value').read()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            tempinfo = file('/proc/stb/fp/temp_sensor').read()
        elif path.exists('/proc/stb/sensors/temp/value'):
            tempinfo = file('/proc/stb/sensors/temp/value').read()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            self.list.append(
                self.makeInfoEntry(_("System temperature:"),
                                   tempinfo.replace('\n', '') + mark + "C"))
        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            tempinfo = file('/proc/stb/fp/temp_sensor_avs').read()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            self.list.append(
                self.makeInfoEntry(_("Processor temperature:"),
                                   tempinfo.replace('\n', '') + mark + "C"))
        if path.exists('/sys/class/thermal/thermal_zone0/temp'):
            tempinfo = file(
                '/sys/class/thermal/thermal_zone0/temp').read().replace(
                    '\n', '')
        if tempinfo and int(tempinfo) > 0:
            self.list.append(
                self.makeInfoEntry(
                    _("CPU temperature:"),
                    "%d\xc2\xb0C" % ((int(tempinfo) + 500) / 1000)))
        fp_version = getFPVersion()
        if fp_version is not None:
            self.list.append(
                self.makeInfoEntry(_("Front Panel:"), "%d" % fp_version))
        self.list.append(self.makeInfoEntry(_("Bootloader:"), bootLoaderInfo))
        self.list.append(
            self.makeInfoEntry(_("Kernel:"), about.getKernelVersionString()))
        self.list.append(self.makeInfoEntry(_("Drivers:"), getDriverDate()))

        self.list.append(self.makeEmptyEntry())

        self.list.append(
            self.makeInfoEntry(_("WWW:"), about.getImageUrlString()))
        self.list.append(
            self.makeInfoEntry(_("Version:"), about.getImageVersionString()))
        self.list.append(
            self.makeInfoEntry(_("Build:"), about.getBuildString()))
        self.list.append(self.makeInfoEntry(_("Revision:"), getImageBuild()))
        self.list.append(
            self.makeInfoEntry(_("Enigma2:"), about.getEnigmaVersionString()))
        self.list.append(
            self.makeInfoEntry(
                _("GStreamer:"),
                about.getGStreamerVersionString().replace("GStreamer",
                                                          "").strip()))
        self.list.append(
            self.makeInfoEntry(_("Python:"), about.getPythonVersionString()))

        self["list"].updateList(self.list)
Пример #9
0
	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)