SystemInfo["HasH265Encoder"] = fileHas("/proc/stb/encoder/0/vcodec_choices", "h265") SystemInfo["CanNotDoSimultaneousTranscodeAndPIP"] = getBoxType() in ( "vusolo4k", "gbquad4k") SystemInfo["hasXcoreVFD"] = getBoxType() in ( "osmega", "spycat4k", "spycat4kmini", "spycat4kcomb") and fileCheck( "/sys/module/brcmstb_%s/parameters/pt6302_cgram" % getBoxType()) SystemInfo["HasHDMIin"] = getHaveHDMIinHD() in ( "True", ) or getHaveHDMIinFHD() in ("True", ) SystemInfo["HasHDMI-CEC"] = fileExists( "/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.pyo") SystemInfo["Has24hz"] = fileCheck("/proc/stb/video/videomode_24hz") SystemInfo["AndroidMode"] = SystemInfo["RecoveryMode"] and getMachineBuild( ) in ("multibox", ) SystemInfo["MBbootdevice"] = getMBbootdevice() SystemInfo["canMultiBoot"] = getMultibootslots() SystemInfo["HasHiSi"] = pathExists("/proc/hisi") SystemInfo["canBackupEMC"] = getMachineBuild() in ("hd51", "h7") and ( "disk.img", "%s" % SystemInfo["MBbootdevice"]) or getMachineBuild() in ( "osmio4k", "osmio4kplus", "osmini4k") and ( "emmc.img", "%s" % SystemInfo["MBbootdevice"] ) or SystemInfo["HasHiSi"] and ("usb_update.bin", "none") SystemInfo["canMode12"] = getMachineBuild() in ( "hd51", "h7") and ("brcm_cma=440M@328M brcm_cma=192M@768M", "brcm_cma=520M@248M brcm_cma=200M@768M") SystemInfo["HasMMC"] = fileHas( "/proc/cmdline", "root=/dev/mmcblk") or "mmcblk" in getMachineMtdRoot() SystemInfo["HasH9SD"] = getMachineBuild() in ( "h9", "h9se", "i55plus", "i55se") and pathExists("/dev/mmcblk0p1") SystemInfo["HasSDnomount"] = getMachineBuild() in ( "h9", "h9se", "i55plus", "i55se") and (False, "none") or getMachineBuild(
from boxbranding import getBoxType, getBrandOEM, getDisplayType, getHaveAVJACK, getHaveHDMIinFHD, getHaveHDMIinHD, getHaveRCA, getHaveSCART, getHaveSCARTYUV, getHaveYUV, getImageType, getMachineBrand, getMachineBuild, getMachineMtdRoot, getMachineName from enigma import Misc_Options, eDVBCIInterfaces, eDVBResourceManager from Components.About import getChipSetString from Components.RcModel import rc_model from Tools.BoxConfig import BoxConfig from Tools.Directories import fileCheck, fileExists, fileHas, pathExists from Tools.HardwareInfo import HardwareInfo SystemInfo = {} SystemInfo["BoxInfo"] = BoxConfig() SystemInfo["HasRootSubdir"] = False # This needs to be here so it can be reset by getMultibootslots! SystemInfo["RecoveryMode"] = False # This needs to be here so it can be reset by getMultibootslots! from Tools.Multiboot import GetCurrentImage, getMultibootslots # This import needs to be here to avoid a SystemInfo load loop! SystemInfo["HasHiSi"] = pathExists("/proc/hisi") and getBoxType() not in ("vipertwin", "viper4kv20", "viper4kv40") # This needs to be for later checks SystemInfo["canMultiBoot"] = getMultibootslots() # SystemInfo["MBbootdevice"] set on call SystemInfo["MultiBootSlot"] = GetCurrentImage() if SystemInfo["canMultiBoot"] else False def getNumVideoDecoders(): numVideoDecoders = 0 while fileExists("/dev/dvb/adapter0/video%d" % numVideoDecoders, "f"): numVideoDecoders += 1 return numVideoDecoders def countFrontpanelLEDs(): numLeds = fileExists("/proc/stb/fp/led_set_pattern") and 1 or 0 while fileExists("/proc/stb/fp/led%d_pattern" % numLeds): numLeds += 1 return numLeds