fix Vu+ Real Multiboot

This commit is contained in:
gutosie
2023-02-21 21:37:28 +02:00
committed by GitHub
parent 48a864c893
commit 00d90b9c99

View File

@@ -120,8 +120,10 @@ class StartImage(Screen):
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
elif getBoxVuModel() == 'zero4k':
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash')
elif fileExists('/boot/linuxrootfs1') and getCPUtype() == "ARMv7":
os.system('ln -sf "neoinitarmvu" "/boot/linuxrootfs1/sbin/init"')
else:
os.system(' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash')
#elif fileExists('/boot/linuxrootfs1') and getCPUtype() == "ARMv7":
#os.system('ln -sf "neoinitarmvu" "/boot/linuxrootfs1/sbin/init"')
self.sel = self['list'].getCurrent()
if self.sel:
@@ -142,7 +144,12 @@ class StartImage(Screen):
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"'
cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
#Vu+ Real Multiboot
if fileExists('/media/InternalFlash/STARTUP') and fileExists('/media/InternalFlash/zImage') :
cmd2 = 'dd if=/media/InternalFlash/zImage of=/dev/' + getMmcBlockDevice() + ''
else:
cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
#cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; cat /dev/' + getMmcBlockDevice() + ' | grep "kernel"; echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
elif not fileExists("/.multinfo"):