mirror of
				https://github.com/gutosie/neoboot.git
				synced 2025-11-03 20:55:47 +01:00 
			
		
		
		
	Add files via upload
This commit is contained in:
		@@ -138,54 +138,39 @@ class StartImage(Screen):
 | 
			
		||||
            else:
 | 
			
		||||
                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()
 | 
			
		||||
        if self.sel:
 | 
			
		||||
            self.sel = self.sel[2]     
 | 
			
		||||
        if self.sel == 0:          
 | 
			
		||||
            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
			
		||||
                os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
			
		||||
 | 
			
		||||
#################_____MIPS____################################## 
 | 
			
		||||
            #MIPS procesor: MiracleBox, ET8500, Formuler F1, Formuler F3, Atemio6000 - MIPS                                                                                                                                                                       # test -  ultra, osmini 
 | 
			
		||||
            if getCPUtype() != 'ARMv7' and getCPUSoC() or getBoxHostName() == ['bcm7358',
 | 
			
		||||
             'ax60',
 | 
			
		||||
             'bcm7362',
 | 
			
		||||
             'bcm7356',
 | 
			
		||||
             'bcm7241',
 | 
			
		||||
             'bcm7362',
 | 
			
		||||
             'bcm73625'
 | 
			
		||||
             'mbmini',
 | 
			
		||||
             'h3',
 | 
			
		||||
             'ini-1000sv',
 | 
			
		||||
             'osmini' 
 | 
			
		||||
             'formuler4turbo'] :                                
 | 
			
		||||
                        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/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])                                                         
 | 
			
		||||
                
 | 
			
		||||
            if getCPUtype() == 'MIPS' and getBoxHostName() == "vusolo" or getBoxHostName() == "mbmini" or getBoxHostName() == "mbultra" or getBoxHostName() == "osmini" or getBoxHostName() == "formuler4turbo" or getBoxHostName() == "h3" or getBoxHostName() == "formuler3" :                                
 | 
			
		||||
                        if 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 8; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f '
 | 
			
		||||
                                self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
 | 
			
		||||
                        elif getImageNeoBoot() != 'Flash':
 | 
			
		||||
                            if fileExists('/.multinfo'):
 | 
			
		||||
                                cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
 | 
			
		||||
                                cmd1='sleep 5; reboot -f '
 | 
			
		||||
                                self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
 | 
			
		||||
                            elif not fileExists('/.multinfo'):
 | 
			
		||||
                                cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
 | 
			
		||||
                                cmd1='sleep 8; ln -sfn /sbin/neoinitmips /sbin/init; reboot -f '
 | 
			
		||||
                                self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
 | 
			
		||||
                            else:
 | 
			
		||||
                                cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
 | 
			
		||||
                                cmd1='sleep 8; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f '
 | 
			
		||||
                                self.session.open(Console, _('NeoBoot-ERROR!!! ....'), [cmd, cmd1])
 | 
			
		||||
                        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() 
 | 
			
		||||
 | 
			
		||||
            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()
 | 
			
		||||
                            
 | 
			
		||||
@@ -149,11 +149,10 @@ class StartImage(Screen):
 | 
			
		||||
#################_____mips___########################## 
 | 
			
		||||
                                                                                         
 | 
			
		||||
            #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()) ):
 | 
			
		||||
                            self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() ))
 | 
			
		||||
                        else:
 | 
			
		||||
                        
 | 
			
		||||
                            self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() ))                                                                              
 | 
			
		||||
                        else:                        
 | 
			
		||||
                            if getImageNeoBoot() == 'Flash':                    
 | 
			
		||||
                                if fileExists('/.multinfo'): 
 | 
			
		||||
                                    cmd = "echo -e '\n\n%s '" % _('...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')                                                                                                       
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
# -*- 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 enigma import getDesktop
 | 
			
		||||
from enigma import eTimer
 | 
			
		||||
from Screens.Screen import Screen 
 | 
			
		||||
from Screens.Console import Console                                                                                                                                              
 | 
			
		||||
from Screens.Screen import Screen                                                                                                                                               
 | 
			
		||||
from Screens.Console import Console
 | 
			
		||||
from Screens.MessageBox import MessageBox
 | 
			
		||||
from Screens.ChoiceBox import ChoiceBox
 | 
			
		||||
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.path import dirname, isdir, isdir as os_isdir
 | 
			
		||||
import os
 | 
			
		||||
import time                  
 | 
			
		||||
import time                 
 | 
			
		||||
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;')
 | 
			
		||||
 | 
			
		||||
#################_____mips___########################## 
 | 
			
		||||
                                                                                           
 | 
			
		||||
            #VUPLUS MIPS vu_dev_mtd2.sh , #Miracle Box Ultra 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':
 | 
			
		||||
                                                                                         
 | 
			
		||||
            #VUPLUS MIPS vu_dev_mtd2.sh  
 | 
			
		||||
            if getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose'  or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero':                              
 | 
			
		||||
                        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()  ))
 | 
			
		||||
                        else:
 | 
			
		||||
                        
 | 
			
		||||
                            self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation() ))                                                                               
 | 
			
		||||
                        else:                        
 | 
			
		||||
                            if getImageNeoBoot() == 'Flash':                    
 | 
			
		||||
                                if fileExists('/.multinfo'):  
 | 
			
		||||
                                    cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'                  
 | 
			
		||||
                                elif not fileExists('/.multinfo'):  
 | 
			
		||||
                                    cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init; /etc/init.d/reboot'
 | 
			
		||||
                                if fileExists('/.multinfo'): 
 | 
			
		||||
                                    cmd = "echo -e '\n\n%s '" % _('...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')                                                                                                       
 | 
			
		||||
                                    cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'                  
 | 
			
		||||
                                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':                       
 | 
			
		||||
                                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())):
 | 
			
		||||
                                        os.system('ln -sfn /sbin/neoinitmipsvu /sbin/init')
 | 
			
		||||
                                        cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'                  
 | 
			
		||||
                                    if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'):
 | 
			
		||||
                                        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; /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'):    
 | 
			
		||||
                                    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()
 | 
			
		||||
                                    elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
			
		||||
                                        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...')                                    
 | 
			
		||||
                                        cmd1 = 'flash_eraseall /dev/mtd2; sleep 2; nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % getNeoLocation(), getBoxHostName()
 | 
			
		||||
 | 
			
		||||
                            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()
 | 
			
		||||
 | 
			
		||||
    def myclose2(self, message):
 | 
			
		||||
        self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
			
		||||
        self.close()
 | 
			
		||||
        self.close()
 | 
			
		||||
		Reference in New Issue
	
	Block a user