Add files via upload

This commit is contained in:
gutosie
2021-02-16 23:08:54 +02:00
committed by GitHub
parent 4a7acefc82
commit 38e5b7278f
3 changed files with 61 additions and 67 deletions

View File

@@ -138,54 +138,39 @@ class StartImage(Screen):
else: else:
system('touch %sImageBoot/%s/.control_boot_new_image ' % ( getNeoLocation(), getImageNeoBoot() )) system('touch %sImageBoot/%s/.control_boot_new_image ' % ( getNeoLocation(), getImageNeoBoot() ))
system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') #system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh')
self.sel = self['list'].getCurrent() self.sel = self['list'].getCurrent()
if self.sel: if self.sel:
self.sel = self.sel[2] self.sel = self.sel[2]
if self.sel == 0: if self.sel == 0:
if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
#################_____MIPS____################################## if getCPUtype() == 'MIPS' and getBoxHostName() == "vusolo" or getBoxHostName() == "mbmini" or getBoxHostName() == "mbultra" or getBoxHostName() == "osmini" or getBoxHostName() == "formuler4turbo" or getBoxHostName() == "h3" or getBoxHostName() == "formuler3" :
#MIPS procesor: MiracleBox, ET8500, Formuler F1, Formuler F3, Atemio6000 - MIPS # test - ultra, osmini if getImageNeoBoot() == 'Flash':
if getCPUtype() != 'ARMv7' and getCPUSoC() or getBoxHostName() == ['bcm7358', cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
'ax60', cmd1='sleep 8; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f '
'bcm7362', self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
'bcm7356', elif getImageNeoBoot() != 'Flash':
'bcm7241', if fileExists('/.multinfo'):
'bcm7362', cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
'bcm73625' cmd1='sleep 5; reboot -f '
'mbmini', self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
'h3', elif not fileExists('/.multinfo'):
'ini-1000sv', cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
'osmini' cmd1='sleep 8; ln -sfn /sbin/neoinitmips /sbin/init; reboot -f '
'formuler4turbo'] : self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
if getImageNeoBoot() == 'Flash': else:
self.session.open(TryQuitMainloop, 2) cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
elif getImageNeoBoot() != 'Flash': cmd1='sleep 8; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f '
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n') self.session.open(Console, _('NeoBoot-ERROR!!! ....'), [cmd, cmd1])
cmd1='sleep 5; ln -sfn /sbin/neoinitmips /sbin/init; reboot -d -f -h -i'
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
else:
os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
self.messagebox = self.session.open(MessageBox, _('Wygląda na to że multiboot nie wspiera tego modelu STB !!! '), MessageBox.TYPE_INFO, 8)
self.close()
elif getCPUtype() != 'ARMv7' and getCPUSoC() or getBoxHostName() == ['bcm7424',
'mbultra',
'ini-8000sv' ] :
if getImageNeoBoot() == 'Flash':
self.session.open(TryQuitMainloop, 2)
elif getImageNeoBoot() != 'Flash':
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
cmd1='sleep 5; ln -sfn /sbin/neoinitmipsvu /sbin/init; reboot -d -f -h -i'
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
else: else:
os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
self.close() self.close()
else: else:
os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
self.close() self.close()

View File

@@ -149,11 +149,10 @@ class StartImage(Screen):
#################_____mips___########################## #################_____mips___##########################
#VUPLUS MIPS vu_dev_mtd1.sh #VUPLUS MIPS vu_dev_mtd1.sh
if getCPUSoC() == '7335' or getCPUSoC() == '7325' or getCPUSoC() == '7405' or getCPUSoC() == '7405(with 3D)' or getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'duo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo': if getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo':
if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) ): if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) ):
self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() )) self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() ))
else: else:
if getImageNeoBoot() == 'Flash': if getImageNeoBoot() == 'Flash':
if fileExists('/.multinfo'): if fileExists('/.multinfo'):
cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')

View File

@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.__init__ import _
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5 from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5
from enigma import getDesktop from enigma import getDesktop
from enigma import eTimer from enigma import eTimer
from Screens.Screen import Screen from Screens.Screen import Screen
from Screens.Console import Console from Screens.Console import Console
from Screens.MessageBox import MessageBox from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox from Screens.ChoiceBox import ChoiceBox
from Screens.VirtualKeyBoard import VirtualKeyBoard from Screens.VirtualKeyBoard import VirtualKeyBoard
@@ -28,7 +28,7 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
from os.path import dirname, isdir, isdir as os_isdir from os.path import dirname, isdir, isdir as os_isdir
import os import os
import time import time
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
@@ -147,38 +147,48 @@ class StartImage(Screen):
os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
#################_____mips___########################## #################_____mips___##########################
#VUPLUS MIPS vu_dev_mtd2.sh , #Miracle Box Ultra dev_mtd2.sh #VUPLUS MIPS vu_dev_mtd2.sh
if getCPUSoC() == '7356' or getCPUSoC() == '7429' or getCPUSoC() == '7424' or getCPUSoC() == '7241' or getCPUSoC() == '7362' or getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero': if getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero':
if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) ): if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) ):
self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() )) self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() ))
else: else:
if getImageNeoBoot() == 'Flash': if getImageNeoBoot() == 'Flash':
if fileExists('/.multinfo'): if fileExists('/.multinfo'):
cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
elif not fileExists('/.multinfo'): cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'
cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init; /etc/init.d/reboot' elif not fileExists('/.multinfo'):
cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...')
cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init; /etc/init.d/reboot'
elif getImageNeoBoot() != 'Flash': elif getImageNeoBoot() != 'Flash':
if not fileExists('/.multinfo'): if not fileExists('/.multinfo'):
if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
os.system('ln -sfn /sbin/neoinitmipsvu /sbin/init')
cmd = '/etc/init.d/reboot'
elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())): if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'):
os.system('ln -sfn /sbin/neoinitmipsvu /sbin/init') cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'
elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /etc/init.d/reboot'
elif fileExists('/.multinfo'): elif fileExists('/.multinfo'):
if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())): if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
cmd = 'flash_eraseall /dev/mtd2; sleep 2; nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % getNeoLocation(), getBoxHostName() cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd1 = 'flash_eraseall /dev/mtd2; sleep 2; nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % getNeoLocation(), getBoxHostName()
cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'
self.session.open(Console, _('NeoBoot MIPS....'), [cmd]) elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...')
cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'
self.session.open(Console, _('NeoBoot MIPS....'), [cmd, cmd1])
self.close()
else:
os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
self.close() self.close()
def myclose2(self, message): def myclose2(self, message):
self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
self.close() self.close()