From 00d90b9c9911761527f85f7bf504c3e5cadac2cc Mon Sep 17 00:00:00 2001 From: gutosie Date: Tue, 21 Feb 2023 21:37:28 +0200 Subject: [PATCH] fix Vu+ Real Multiboot --- NeoBoot/tmpfiles/vu4k_run.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/NeoBoot/tmpfiles/vu4k_run.py b/NeoBoot/tmpfiles/vu4k_run.py index 47662fa..8c02741 100644 --- a/NeoBoot/tmpfiles/vu4k_run.py +++ b/NeoBoot/tmpfiles/vu4k_run.py @@ -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"):