예제 #1
0
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        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;')
            if not fileExists('/bin/busybox.nosuid'):
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
#################_____mips___##########################

#VUPLUS MIPS vu_dev_mtd1.sh
            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:
                    if getImageNeoBoot() == 'Flash':
                        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; reboot -d -f'

                    elif getImageNeoBoot() != 'Flash':
                        if not fileExists('/.multinfo'):

                            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; reboot -d -f'

                        elif fileExists('/.multinfo'):
                            if 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 = 'flash_eraseall /dev/mtd1; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd1 %sImagesUpload/.kernel/%s.vmlinux.gz; reboot -d -f' % (
                                    getNeoLocation(), getBoxHostName())

                            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()
예제 #2
0
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        system(
            'chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo_location'
        )
        self.sel = self['list'].getCurrent()
        if self.sel:
            self.sel = self.sel[2]
        if self.sel == 0:
            if fileExists('/media/mmc/etc/init.d/neobootmount.sh'):
                os.system('rm -f /media/mmc/etc/init.d/neobootmount.sh;')

#################_____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 not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' %
                                  (getNeoLocation(), getBoxHostName())):
                    self.myclose2(
                        _('\n\n\nError - w lokalizacji %sImagesUpload/.kernel/  \nnie odnaleziono pliku kernela 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...'
                            )
                            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 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 = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'flash_eraseall /dev/mtd1; sleep 2; nandwrite -p /dev/mtd1 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % getNeoLocation(
                                ), getBoxHostName()

                            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,
                    _('Wygląda na to że multiboot nie wspiera tego modelu STB !!! '
                      ), MessageBox.TYPE_INFO, 8)
                self.close()
예제 #3
0
 def KeyOk(self):
     if getImageNeoBoot() != 'Flash':
         os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' %
                   (getNeoLocation(), getImageNeoBoot()))
         self.StartImageInNeoBoot()
     else:
         os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' %
                   (getNeoLocation(), getImageNeoBoot()))
         self.StartImageInNeoBoot()
     #---------------------------------------------
     os.system(
         'touch ' + LinkNeoBoot +
         '/files/mountpoint.sh; echo "#!/bin/sh\n#DESCRIPTION=This script by gutosie\n"  > '
         + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot +
         '/files/mountpoint.sh')
     if getNeoMount() == 'hdd_install_/dev/sda1':
         os.system(
             'echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda1 /media/hdd"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount() == 'hdd_install_/dev/sdb1':
         os.system(
             'echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sdb1 /media/hdd"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount() == 'hdd_install_/dev/sda2':
         os.system(
             'echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount() == 'hdd_install_/dev/sdb2':
         os.system(
             'echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     #---------------------------------------------
     if getNeoMount2() == 'usb_install_/dev/sdb1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sda1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sda1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sdb2':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb2 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sdc1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdc1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sdd1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdd1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sde1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sde1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount2() == 'usb_install_/dev/sdf1':
         os.system(
             'echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdf1 /media/usb"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     #---------------------------------------------
     elif getNeoMount3() == 'cf_install_/dev/sda1':
         os.system(
             'echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sda1 /media/cf"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount3() == 'cf_install_/dev/sdb1':
         os.system(
             'echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sdb1 /media/cf"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     #---------------------------------------------
     elif getNeoMount4() == 'card_install_/dev/sda1':
         os.system(
             'echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sda1 /media/card"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount4() == 'card_install_/dev/sdb1':
         os.system(
             'echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sdb1 /media/card"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     #---------------------------------------------
     elif getNeoMount5() == 'mmc_install_/dev/sda1':
         os.system(
             'echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sda1 /media/mmc"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     elif getNeoMount5() == 'mmc_install_/dev/sdb1':
         os.system(
             'echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sdb1 /media/mmc"  >> '
             + LinkNeoBoot + '/files/mountpoint.sh')
     os.system('echo "\n\nexit 0"  >> ' + LinkNeoBoot +
               '/files/mountpoint.sh')
예제 #4
0
파일: duo4k_run.py 프로젝트: OpenE2/neoboot
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        if fileExists('/.multinfo') and getCPUtype() == 'ARMv7':
            if getBoxVuModel() == 'duo4k':
                os.system(
                    'mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash'
                )

        system('chmod 755 ' + LinkNeoBoot + '/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;')
            if not fileExists('/bin/busybox.nosuid'):
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
#################_____ARM____##########################

#VUPLUS ARM - Duo4k vu_mmcblk0p6.sh
            if getCPUSoC() == '7278' or getBoxHostName() == 'vuduo4k':
                if not fileExists(
                        '%sImagesUpload/.kernel/flash-kernel-%s.bin' %
                    (getNeoLocation(), getBoxHostName())):
                    mess = (_(
                        'Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash-kernel-%s.bin'
                    ) % (getNeoLocation(), getBoxHostName()))
                    self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
                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...'
                            )
                            cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/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 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi'

                    elif getImageNeoBoot() != 'Flash':
                        if not fileExists('/.multinfo'):
                            if not fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot'

                            elif fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (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/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh '

                        elif fileExists('/.multinfo'):
                            if not fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'dd if=' + getNeoLocation(
                                ) + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName(
                                ) + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi '

                            elif fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh '

                    self.session.open(Console, _('NeoBoot ARM '), [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()
예제 #5
0
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        system(
            'chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/*'
        )
        self.sel = self['list'].getCurrent()
        if self.sel:
            self.sel = self.sel[2]
        if self.sel == 0:
            if fileExists('/media/mmc/etc/init.d/neobootmount.sh'):
                os.system('rm -f /media/mmc/etc/init.d/neobootmount.sh;')

#################_____ARM____##########################

#VUPLUS ARM - Duo4k vu_mmcblk0p6.sh
            if getCPUSoC() == '7278' or getBoxHostName() == 'vuduo4k':
                if not fileExists(
                        '%sImagesUpload/.kernel/flash-kernel-%s.bin' %
                    (getNeoLocation(), getBoxHostName())):
                    self.myclose2(
                        _(
                            '\n\n\nError - w lokalizacji %sImagesUpload/.kernel/  \nnie odnaleziono pliku kernela flash-kernel-%s.bin '
                            % getNeoLocation(), getBoxHostName()))
                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...'
                            )
                            cmd1 = 'cd /media/mmc; ln -sf "init.sysvinit" "/media/mmc/sbin/init"; /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 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi'

                    elif getImageNeoBoot() != 'Flash':
                        if not fileExists('/.multinfo'):
                            if not fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot'

                            elif fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (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/neoinitarmvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh '

                        elif fileExists('/.multinfo'):
                            if not fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'dd if=' + getNeoLocation(
                                ) + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName(
                                ) + '.bin of=/dev/mmcblk0p1; cd /media/mmc; ln -sf "neoinitarm" "/media/mmc/sbin/init" ; sleep 2; reboot -dfhi '

                            elif fileExists(
                                    '%sImageBoot/%s/boot/zImage.%s' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n\n%s '" % _(
                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'cd /media/mmc; ln -sf "neoinitarmvu" "/media/mmc/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh '

                    self.session.open(Console, _('NeoBoot ARM VU+....'),
                                      [cmd, cmd1])
                    self.close()

            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()
예제 #6
0
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        system(
            'chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/*'
        )

        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;')
            if not fileExists('/bin/busybox.nosuid'):
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
#################_____mips___##########################

#VUPLUS MIPS vu_dev_mtd1.sh
            if "vu" + getBoxVuModel() == getBoxHostName():
                if getBoxHostName() == 'vuultimo' or getBoxHostName(
                ) == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName(
                ) == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName(
                ) == 'vuduo':
                    mtd = 'mtd1'
                    if fileExists('' + getNeoLocation() + 'ImageBoot/' +
                                  getImageNeoBoot() + '/etc/vtiversion.info'
                                  ) and getExtCheckHddUsb() == 'ext4':
                        if fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' %
                                      (getNeoLocation(), getImageNeoBoot(),
                                       getBoxHostName())):
                            os.system(
                                'rm -r %sImageBoot/%s/boot/%s.vmlinux.gz' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName()))

                elif getBoxHostName() == 'vusolo2' or getBoxHostName(
                ) == 'vusolose' or getBoxHostName(
                ) == 'vuduo2' or getBoxHostName() == 'vuzero':
                    mtd = 'mtd2'
                else:
                    self.messagebox = self.session.open(
                        MessageBox,
                        _('It looks like it that multiboot does not found MTD.'
                          ), MessageBox.TYPE_INFO, 8)
                    self.close()

                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:
                    if getImageNeoBoot() == 'Flash':
                        if fileExists('/.multinfo'):
                            cmd = "echo -e '\n%s '" % _(
                                '...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                            )
                            cmd1 = 'flash_erase /dev/' + mtd + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + mtd + ' 0 0 > /dev/null 2>&1'
                            if getNandWrite() == 'nandwrite':
                                cmd2 = 'nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                ) + 'ImagesUpload/.kernel/' + getBoxHostName(
                                ) + '.vmlinux.gz > /dev/null 2>&1'
                            else:
                                cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                ) + 'ImagesUpload/.kernel/' + getBoxHostName(
                                ) + '.vmlinux.gz > /dev/null 2>&1'
                            cmd3 = "echo -e '\n%s '" % _(
                                'Start image FLASH - kernel flash !\n' +
                                getNandWrite() + '\nSTB NAME: ' +
                                getBoxHostName() + '\nNeoBoot location:' +
                                getNeoLocation() + '\nCPU: ' + getCPUSoC() +
                                '\nImage boot: ' + getImageNeoBoot() +
                                '\n____Your device will reboot in 5 seconds !____ '
                            )
                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'

                        elif not fileExists('/.multinfo'):
                            cmd = "echo -e '\n%s '" % _(
                                '...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...'
                            )
                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
                            cmd2 = 'sync'
                            cmd3 = "echo -e '\n%s '" % _(
                                'Start image flash !\nSTB NAME: ' +
                                getBoxHostName() + '\nNeoBoot location:' +
                                getNeoLocation() + '\nCPU: ' + getCPUSoC() +
                                '\nImage boot: ' + getImageNeoBoot() +
                                '\n____Your device will reboot in 5 seconds !____ '
                            )
                            cmd4 = 'sleep 8; reboot -d -f'

                    elif getImageNeoBoot() != 'Flash':
                        if fileExists('/.multinfo') and getImageNeoBoot(
                        ) == getImageBootNow():
                            cmd = "echo -e '\n%s '" % _(
                                '...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                            )
                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
                            cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
                            cmd3 = "echo -e '\n%s '" % _(
                                'Reboot system E2 now !\nSTB NAME: ' +
                                getBoxHostName() + '\nNeoBoot location:' +
                                getNeoLocation() + '\nCPU: ' + getCPUSoC() +
                                '\nImage boot: ' + getImageNeoBoot() +
                                '\n____Your device will REBOOT in 5 seconds !____ '
                            )
                            cmd4 = 'sync; sleep 8; reboot -d -f '

                        elif not fileExists('/.multinfo'):
                            if fileExists('' + getNeoLocation() +
                                          'ImageBoot/' + getImageNeoBoot() +
                                          '/boot/' + getBoxHostName() +
                                          '.vmlinux.gz'):
                                cmd = "echo -e '\n%s '" % _(
                                    '...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'flash_erase /dev/' + mtd + ' 0 0 > /dev/null 2>&1; flash_eraseall /dev/' + mtd + ' 0 0 > /dev/null 2>&1'
                                if getNandWrite() == 'nandwrite':
                                    cmd2 = 'nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImageBoot/' + getImageNeoBoot(
                                    ) + '/boot/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                else:
                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImageBoot/' + getImageNeoBoot(
                                    ) + '/boot/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                cmd3 = "echo -e '\n%s '" % _(
                                    'Changed kernel COMPLETE ! ' +
                                    getNandWrite() + '\nSTB NAME: ' +
                                    getBoxHostName() + '\nNeoBoot location:' +
                                    getNeoLocation() + '\nCPU: ' +
                                    getCPUtype() + ' ' + getCPUSoC() +
                                    '\nImage boot: ' + getImageNeoBoot() +
                                    '\n____Your device will reboot in 5 seconds !____ '
                                )
                                cmd4 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'

                            elif not fileExists(
                                    '%sImageBoot/%s/boot/%s.vmlinux.gz' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n%s '" % _(
                                    '...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init'
                                cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
                                cmd3 = "echo -e '\n%s '" % _(
                                    'Start image without changing the kernel!\nSTB NAME: '
                                    + getBoxHostName() +
                                    '\nNeoBoot location:' + getNeoLocation() +
                                    '\nCPU: ' + getCPUSoC() +
                                    '\nImage boot: ' + getImageNeoBoot() +
                                    '\n____Your device will reboot in 5 seconds !____ '
                                )
                                cmd4 = 'sync; sleep 8; reboot -d -f'

                        elif fileExists('/.multinfo'):
                            if not fileExists(
                                    '%sImageBoot/%s/boot/%s.vmlinux.gz' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n%s '" % _(
                                    '...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'flash_erase /dev/' + mtd + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + mtd + ' 0 0 > /dev/null 2>&1'
                                if getNandWrite() == 'nandwrite':
                                    cmd2 = 'nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImagesUpload/.kernel/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                else:
                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImagesUpload/.kernel/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                cmd3 = "echo -e '\n%s '" % _(
                                    'Changed kernel COMPLETE ! ' +
                                    getNandWrite() + '\nSTB NAME: ' +
                                    getBoxHostName() + '\nNeoBoot location:' +
                                    getNeoLocation() + '\nCPU: ' +
                                    getCPUSoC() + '\nImage boot: ' +
                                    getImageNeoBoot() +
                                    '\n____Your device will reboot in 5 seconds !____ '
                                )
                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'

                            elif fileExists(
                                    '%sImageBoot/%s/boot/%s.vmlinux.gz' %
                                (getNeoLocation(), getImageNeoBoot(),
                                 getBoxHostName())):
                                cmd = "echo -e '\n%s '" % _(
                                    '...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...'
                                )
                                cmd1 = 'flash_erase /dev/' + mtd + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + mtd + ' 0 0 > /dev/null 2>&1 '
                                if getNandWrite() == 'nandwrite':
                                    cmd2 = 'nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImageBoot/' + getImageNeoBoot(
                                    ) + '/boot/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                else:
                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + mtd + ' ' + getNeoLocation(
                                    ) + 'ImageBoot/' + getImageNeoBoot(
                                    ) + '/boot/' + getBoxHostName(
                                    ) + '.vmlinux.gz > /dev/null 2>&1'
                                cmd3 = "echo -e '\n%s '" % _(
                                    'Changed kernel COMPLETE ! ' +
                                    getNandWrite() + '\nSTB NAME: ' +
                                    getBoxHostName() + '\nNeoBoot location:' +
                                    getNeoLocation() + '\nCPU: ' +
                                    getCPUSoC() + '\nImage boot: ' +
                                    getImageNeoBoot() +
                                    '\n____Your device will reboot in 5 seconds !____ '
                                )
                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'

                    self.session.open(Console, _('NeoBoot MIPS....'),
                                      [cmd, cmd1, cmd2, cmd3, cmd4])
                    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()
예제 #7
0
    def StartImageInNeoBoot(self):
        if getImageNeoBoot() != 'Flash':
            if fileExists('%sImageBoot/%s/.control_ok' %
                          (getNeoLocation(), getImageNeoBoot())):
                system('touch /tmp/.control_ok ')
            else:
                system('touch %sImageBoot/%s/.control_boot_new_image ' %
                       (getNeoLocation(), getImageNeoBoot()))

        system(
            'chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo_location'
        )
        self.sel = self['list'].getCurrent()
        if self.sel:
            self.sel = self.sel[2]
        if self.sel == 0:
            if fileExists('/media/mmc/etc/init.d/neobootmount.sh'):
                os.system('rm -f /media/mmc/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':
                if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' %
                                  (getNeoLocation(), getBoxHostName())):
                    self.myclose2(
                        _('\n\n\nError - w lokalizacji %sImagesUpload/.kernel/  \nnie odnaleziono pliku kernela 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'

                    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'

                        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' %
                                (getImageNeoBoot(), getBoxHostName())):
                                cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'

                    self.session.open(Console, _('NeoBoot MIPS....'), [cmd])
                    self.close()