Esempio n. 1
0
    def flashimage(self):
        self["header"].setText(_("Flashing Image"))
        self["summary_header"].setText(self["header"].getText())

        def findimagefiles(path):
            for path, subdirs, files in os.walk(path):
                if not subdirs and files:
                    return checkimagefiles(files) and path

        imagefiles = findimagefiles(self.unzippedimage)
        if imagefiles:
            self.ROOTFSSUBDIR = "none"
            bootSlots = MultiBoot.getBootSlots()
            if bootSlots:
                self.MTDKERNEL = bootSlots[self.multibootslot]["kernel"].split(
                    '/')[2]
                if bootSlots[self.multibootslot].get("ubi"):
                    self.MTDROOTFS = bootSlots[self.multibootslot]["device"]
                else:
                    self.MTDROOTFS = bootSlots[
                        self.multibootslot]["device"].split('/')[2]
                if MultiBoot.hasRootSubdir():
                    self.ROOTFSSUBDIR = bootSlots[
                        self.multibootslot]["rootsubdir"]
            else:
                self.MTDKERNEL = getMachineMtdKernel()
                self.MTDROOTFS = getMachineMtdRoot()
            if getMachineBuild(
            ) in ("dm820",
                  "dm7080"):  # temp solution ofgwrite autodetection not ready
                CMD = "/usr/bin/ofgwrite -rmmcblk0p1 '%s'" % imagefiles
            elif self.MTDKERNEL == self.MTDROOTFS:  # receiver with kernel and rootfs on one partition
                CMD = "/usr/bin/ofgwrite -r '%s'" % imagefiles
            else:
                CMD = "/usr/bin/ofgwrite -r -k '%s'" % imagefiles  #normal non multiboot receiver
            if MultiBoot.canMultiBoot():
                if (self.ROOTFSSUBDIR
                    ) is None:  # receiver with SD card multiboot
                    CMD = "/usr/bin/ofgwrite -r%s -k%s -m0 '%s'" % (
                        self.MTDROOTFS, self.MTDKERNEL, imagefiles)
                else:
                    CMD = "/usr/bin/ofgwrite -r -k -m%s '%s'" % (
                        self.multibootslot, imagefiles)
            self.containerofgwrite = Console()
            self.containerofgwrite.ePopen(CMD, self.FlashimageDone)
            fbClass.getInstance().lock()
        else:
            self.session.openWithCallback(
                self.abort,
                MessageBox,
                _("Image to install is invalid\n%s") % self.imagename,
                type=MessageBox.TYPE_ERROR,
                simple=True)
Esempio n. 2
0
    def flashImage(self):
        def findImageFiles(path):
            for path, subDirs, files in walk(path):
                if not subDirs and files:
                    return checkImageFiles(files) and path

        self["header"].setText(_("Flashing Image"))
        self["summary_header"].setText(self["header"].getText())
        imageFiles = findImageFiles(self.unzippedImage)
        if imageFiles:
            rootSubDir = "none"
            bootSlots = MultiBoot.getBootSlots()
            if bootSlots:
                mtdKernel = bootSlots[self.slotCode]["kernel"].split(sep)[2]
                mtdRootFS = bootSlots[self.slotCode]["device"] if bootSlots[
                    self.slotCode].get("ubi") else bootSlots[
                        self.slotCode]["device"].split(sep)[2]
                if MultiBoot.hasRootSubdir():
                    rootSubDir = bootSlots[self.slotCode]["rootsubdir"]
            else:
                mtdKernel = BoxInfo.getItem("mtdkernel")
                mtdRootFS = BoxInfo.getItem("mtdrootfs")
            if MultiBoot.canMultiBoot(
            ):  # Receiver with SD card MultiBoot if (rootSubDir) is None.
                cmdArgs = ["-r%s" % mtdRootFS,
                           "-k%s" %
                           mtdKernel, "-m0"] if (rootSubDir) is None else [
                               "-r", "-k", "-m%s" % self.slotCode
                           ]
            elif BoxInfo.getItem("model") in (
                    "dm820", "dm7080"
            ):  # Temp solution ofgwrite auto detection not ready.
                cmdArgs = ["-rmmcblk0p1"]
            elif mtdKernel == mtdRootFS:  # Receiver with kernel and rootfs on one partition.
                cmdArgs = ["-r"]
            else:  # Normal non MultiBoot receiver.
                cmdArgs = ["-r", "-k"]
            self.containerOFGWrite = Console()
            self.containerOFGWrite.ePopen([OFGWRITE, OFGWRITE] + cmdArgs +
                                          ['%s' % imageFiles],
                                          callback=self.flashImageDone)
            fbClass.getInstance().lock()
        else:
            self.session.openWithCallback(
                self.keyCancel,
                MessageBox,
                _("Error: Image '%s' to install is invalid!") % self.imageName,
                type=MessageBox.TYPE_ERROR,
                windowTitle=self.getTitle())
Esempio n. 3
0
    "vuultimo4k", "et13000", "sf5008", "vuuno4kse", "vuduo4k",
    "vuduo4kse") or model in ("spycat4k", "spycat4kcombo", "gbquad4k")
SystemInfo["HAVEEDIDDECODE"] = fileCheck(
    "/proc/stb/hdmi/raw_edid") and fileCheck("/usr/bin/edid-decode")
SystemInfo["HaveRCA"] = getHaveRCA() == "True"
SystemInfo["HaveDVI"] = getHaveDVI() == "True"
SystemInfo["HaveAVJACK"] = getHaveAVJACK() == "True"
SystemInfo["HAVESCART"] = getHaveSCART() == "True"
SystemInfo["HAVESCARTYUV"] = getHaveSCARTYUV() == "True"
SystemInfo["HAVEYUV"] = getHaveYUV() == "True"
SystemInfo["HAVEHDMI"] = getHaveHDMI() == "True"
SystemInfo["HasMMC"] = fileHas(
    "/proc/cmdline", "root=/dev/mmcblk") or "mmcblk" in getMachineMtdRoot()
SystemInfo["CanProc"] = SystemInfo["HasMMC"] and getBrandOEM() != "vuplus"
SystemInfo["HasHiSi"] = pathExists("/proc/hisi")
SystemInfo["canMultiBoot"] = MultiBoot.getBootSlots()
SystemInfo["RecoveryMode"] = fileCheck(
    "/proc/stb/fp/boot_mode") or MultiBoot.hasRecovery()
SystemInfo["HasMMC"] = fileHas(
    "/proc/cmdline",
    "root=/dev/mmcblk") or MultiBoot.canMultiBoot() and fileHas(
        "/proc/cmdline", "root=/dev/sda")
SystemInfo["HasSDmmc"] = MultiBoot.canMultiBoot(
) and "sd" in MultiBoot.getBootSlots()["2"] and "mmcblk" in getMachineMtdRoot(
)
SystemInfo["HasSDswap"] = getMachineBuild() in (
    "h9", "i55plus") and pathExists("/dev/mmcblk0p1")
SystemInfo["HasFullHDSkinSupport"] = model not in ("et4000", "et5000", "sh1",
                                                   "hd500c", "hd1100",
                                                   "xp1000", "lc")
SystemInfo["CanProc"] = SystemInfo["HasMMC"] and getBrandOEM() != "vuplus"
Esempio n. 4
0
# ]
# BoxInfo.setItem("InformationDistributionWelcome", welcome)

BoxInfo.setItem("12V_Output", Misc_Options.getInstance().detected_12V_output())  #FIXME : Do we need this?
BoxInfo.setItem("3DMode", fileCheck("/proc/stb/fb/3dmode") or fileCheck("/proc/stb/fb/primary/3d"))
BoxInfo.setItem("3DZNorm", fileCheck("/proc/stb/fb/znorm") or fileCheck("/proc/stb/fb/primary/zoffset"))
BoxInfo.setItem("7segment", DISPLAYTYPE in ("7segment",))
BoxInfo.setItem("AmlogicFamily", SOC_FAMILY.startswith(("aml", "meson")) or exists("/proc/device-tree/amlogic-dt-id") or exists("/usr/bin/amlhalt") or exists("/sys/module/amports"))
BoxInfo.setItem("ArchIsARM64", ARCHITECTURE == "aarch64" or "64" in ARCHITECTURE)
BoxInfo.setItem("ArchIsARM", ARCHITECTURE.startswith(("arm", "cortex")))
BoxInfo.setItem("Blindscan", isPluginInstalled("Blindscan"))
BoxInfo.setItem("BoxName", GetBoxName())
canImageBackup = not MODEL.startswith('az') and not BRAND.startswith('cube') and not BRAND.startswith('wetek') and not MODEL.startswith('alien')
BoxInfo.setItem("canImageBackup", canImageBackup)
BoxInfo.setItem("CanMeasureFrontendInputPower", eDVBResourceManager.getInstance().canMeasureFrontendInputPower())
BoxInfo.setItem("canMultiBoot", MultiBoot.getBootSlots())
BoxInfo.setItem("CanNotDoSimultaneousTranscodeAndPIP", MODEL in ("vusolo4k", "gbquad4k", "gbue4k"))
BoxInfo.setItem("canRecovery", MODEL in ("hd51", "vs1500", "h7", "8100s") and ("disk.img", "mmcblk0p1") or MODEL in ("xc7439", "osmio4k", "osmio4kplus", "osmini4k") and ("emmc.img", "mmcblk1p1") or MODEL in ("gbmv200", "cc1", "sf8008", "sf8008m", "sf8008opt", "sx988", "ustym4kpro", "ustym4kottpremium", "beyonwizv2", "viper4k", "og2ott4k") and ("usb_update.bin", "none"))
BoxInfo.setItem("CanUse3DModeChoices", fileExists("/proc/stb/fb/3dmode_choices") and True or False)
BoxInfo.setItem("CIHelper", fileExists("/usr/bin/cihelper"))
BoxInfo.setItem("DeepstandbySupport", MODEL != 'dm800')
BoxInfo.setItem("DefaultDisplayBrightness", MODEL in ("dm900", "dm920") and 8 or 5)
BoxInfo.setItem("FBLCDDisplay", fileCheck("/proc/stb/fb/sd_detach"))
BoxInfo.setItem("Fan", fileCheck("/proc/stb/fp/fan"))
BoxInfo.setItem("FanPWM", BoxInfo.getItem("Fan") and fileCheck("/proc/stb/fp/fan_pwm"))
BoxInfo.setItem("ForceLNBPowerChanged", fileCheck("/proc/stb/frontend/fbc/force_lnbon"))
BoxInfo.setItem("ForceToneBurstChanged", fileCheck("/proc/stb/frontend/fbc/force_toneburst"))
BoxInfo.setItem("FrontpanelDisplay", fileExists("/dev/dbox/oled0") or fileExists("/dev/dbox/lcd0"))
BoxInfo.setItem("GBWOL", fileExists("/usr/bin/gigablue_wol"))
BoxInfo.setItem("grautec", fileExists("/tmp/usbtft"))
BoxInfo.setItem("GraphicLCD", MODEL in ("vuultimo", "xpeedlx3", "et10000", "mutant2400", "quadbox2400", "sezammarvel", "atemionemesis", "mbultra", "beyonwizt4", "osmio4kplus"))