diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-08-21 16:22:05 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-08-21 16:22:05 +0000 |
| commit | f864b8d52978a36cc0b56e7873ccbbd95f2a4a08 (patch) | |
| tree | d868eb622feb8d92c8ce0f2f7ea579d2b3b313ca /lib/python | |
| parent | 32f4c3875b106243e27f418665779fe16f567af5 (diff) | |
| download | enigma2-f864b8d52978a36cc0b56e7873ccbbd95f2a4a08.tar.gz enigma2-f864b8d52978a36cc0b56e7873ccbbd95f2a4a08.zip | |
add box detection as fallback when /proc/stb/info is not avail (old drivers
are used)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Tools/HardwareInfo.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/python/Tools/HardwareInfo.py b/lib/python/Tools/HardwareInfo.py index f426d180..f5c45345 100644 --- a/lib/python/Tools/HardwareInfo.py +++ b/lib/python/Tools/HardwareInfo.py @@ -9,7 +9,21 @@ class HardwareInfo: print "----------------" print "you should upgrade to new drivers for the hardware detection to work properly" print "----------------" - + print "fallback to detect hardware via /proc/cpuinfo!!" + try: + rd = open("/proc/cpuinfo", "r").read() + if rd.find("Brcm4380 V4.2") != 0: + self.device = "dm8000" + print "dm8000 detected!" + elif rd.find("Brcm7401 V0.0") != 0: + self.device = "dm800" + print "dm800 detected!" + elif rd.find("MIPS 4KEc V4.8") != 0: + self.device = "dm7025" + print "dm7025 detected!" + except: + pass + def get_device_name(self): return self.device |
