diff --git a/bin/fbcleararm b/bin/fbcleararm new file mode 100644 index 0000000..47beddd Binary files /dev/null and b/bin/fbcleararm differ diff --git a/bin/fbclearmips b/bin/fbclearmips new file mode 100644 index 0000000..4b3447f Binary files /dev/null and b/bin/fbclearmips differ diff --git a/bin/fontforneoboot.ttf b/bin/fontforneoboot.ttf new file mode 100644 index 0000000..2e8af5f Binary files /dev/null and b/bin/fontforneoboot.ttf differ diff --git a/bin/inithelp b/bin/inithelp new file mode 100644 index 0000000..9348b8b --- /dev/null +++ b/bin/inithelp @@ -0,0 +1,163 @@ +#!/bin/sh + +NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` +IMAGEKATALOG=ImageBoot + +echo -e "\n_________________________ Start inithelp __________________________>>>>" + +if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + mnttest="nolocation" + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install ]; then + orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1` + selectinstall=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install` + for item in $orgimag1; do + selectmnt=`blkid | find "$selectinstall" | cut -d" " -f1` + if [ $selectmnt = $selectinstall ]; then + echo -e "selectmnt="$selectmnt + mnttest="location" + mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + echo -e "Neoboot location detected. " + fi + + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $selectinstall + umount -l $NEODEVICE > /dev/null 2>&1 + else + echo -e "NEOBOOT has been installed on: " $selectmnt + break; + fi + done + fi + + if [ $mnttest = "location" ] ; then + break; + else + echo "NeoBoot mount by Device" + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then + echo -e "neoboot checking installation on: " $DEVICE + mount $DEVICE `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo -e "NeoBoot hasn't been installed on: " $DEVICE + umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + else + echo -e "NeoBoot has been installed on: " $DEVICE + break; + fi + done + fi + + if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then + /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh + echo -e "\n_________________________ NeoBoot mount by MOUNTPOINT _________________________ " + fi + elif [ $mnttest == "label" ]; then + echo -e "\n_________________________ NeoBoot mount by DEVICE_________________________ " + elif [ $mnttest == "location" ]; then + echo -e "\n_______________________ NeoBoot mount by LOCATION _______________________ " + fi +fi + +neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log +if [ -f $neoLOG ]; then + rm -f $neoLOG; touch $neoLOG +fi +echo "" +echo -e "\nNeoInit.log READY" +echo -e "\n \n>>>>>>>>>>>>>>>>> \nSTART NEXT LOG... \n>>>>>>>>>>>>>>>>> \n" >> $neoLOG +echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG +echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG +echo "......................................................." >> $neoLOG +echo ">>>>>>>>>>>>>>>>>>>>>> // START \\ >>>>>>>>>>>>>>>>>>> :" >> $neoLOG + +if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + #if [ -f /proc/stb/info/vumodel ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + #fi + #echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot + echo "" + echo -e "\n#### __NEOBOOT - does not detect the location file neonextboot - Error - Back to Flash... __>>>> " + echo "#### __NEOBOOT - does not detect the location file neonextboot - Error - Back to Flash... __>>>>" >> $neoLOG + sleep 5 +fi + +TARGET=Flash +if [ -f $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` +fi + +if [ $TARGET = "Flash" ]; then + echo "BOOTNEO is booting image from " $TARGET + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neowait.mvi > /dev/null 2>&1 + #if [ -f /proc/stb/info/vumodel ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + echo -e "\n----------------------------------" + echo -e " BOOT UP IMAGE FROM FLASH " + echo -e "----------------------------------" + echo " REBOOT - UP IMAGE FROM FLASH " >> $neoLOG + sleep 5 + PATH=/sbin:/bin:/usr/sbin:/usr/bin + reboot -d -f + #fi +else + ######### test boot new imaga>>>> + + VUMODEL=`cat /proc/stb/info/vumodel` + BOXNAME=`cat /etc/hostname` + UPLOAD=ImagesUpload + NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` + IMAGEKATALOG=ImageBoot + + echo -e "\n ________ test boot new imaga ________>>>> " + sleep 2 + + if [ -e $NEODEVICE$IMAGEKATALOG/$TARGET/.control_ok ]; then + [ $PL ] && echo "Nie ma bledu, normalny start image..." || echo "No Error - Booting image normal..." + sleep 2 + elif [ -e $NEODEVICE$IMAGEKATALOG/$TARGET/.control_boot_new_image ];then + rm -r $NEODEVICE$IMAGEKATALOG/$TARGET/.control_boot_new_image + echo -e "\n____!!!Remove file control_boot_new_image!!!____\nFirst start image - The first attempt to launch a new image... " + sleep 2 + else + /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1 + echo -e "\n\n!!!error!!!\n\n>>> ERROR, Please reinstalling the kernel for flash image now... <<<\n\n>>> Error - NeoBoot he can not run it image !!! Restart STB - Back to Flash... <<<" + echo "!!!error!!!, ERROR, Please reinstalling the kernel for flash image now... " >> $neoLOG + echo "Error - NeoBoot he can not run it image !!! Restart STB - Back to Flash..." >> $neoLOG + echo "\nWrong kernel-Press number 3" > $NEODEVICE$UPLOAD/.kernel/used_flash_kernel + echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot + #if [ -f /proc/stb/info/vumodel ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + echo ">>> DONE <<<"; + echo -n "END INIT INFO Rebooting... " + sleep 15 + PATH=/sbin:/bin:/usr/sbin:/usr/bin + reboot -d -f + #fi + fi + + if [ -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + if [ ! -e $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh ] ; then + rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo -e "\n#### ________ DELETE enigma2_pre_start.sh ________>>>> " + cp -af /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + cp -af /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh + chmod 0755 $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo -e "\nNeoBOOT created the file mount enigma2_pre_start.sh " + echo "NeoBOOT created the file mount enigma2_pre_start.sh " >> $neoLOG + fi + fi + +fi + +echo -e "\n_________________ END inithelp and start of the software__________________" +echo "_________________ END inithelp and start of the software__________________" >> $neoLOG +sleep 5 +echo ok + +exit 0 \ No newline at end of file diff --git a/bin/libpngneo b/bin/libpngneo new file mode 100644 index 0000000..1d26726 Binary files /dev/null and b/bin/libpngneo differ diff --git a/bin/nanddump_arm b/bin/nanddump_arm new file mode 100644 index 0000000..febd71e Binary files /dev/null and b/bin/nanddump_arm differ diff --git a/bin/nanddump_mips b/bin/nanddump_mips new file mode 100644 index 0000000..fe507fd Binary files /dev/null and b/bin/nanddump_mips differ diff --git a/bin/neobm b/bin/neobm new file mode 100644 index 0000000..2bfacce Binary files /dev/null and b/bin/neobm differ diff --git a/bin/neobm_mips b/bin/neobm_mips new file mode 100644 index 0000000..2bfacce Binary files /dev/null and b/bin/neobm_mips differ diff --git a/bin/neobmarm b/bin/neobmarm new file mode 100644 index 0000000..d4344eb Binary files /dev/null and b/bin/neobmarm differ diff --git a/bin/neoinitarm b/bin/neoinitarm new file mode 100644 index 0000000..ff28b5c Binary files /dev/null and b/bin/neoinitarm differ diff --git a/bin/neoinitarmvu b/bin/neoinitarmvu new file mode 100644 index 0000000..cbd2d99 --- /dev/null +++ b/bin/neoinitarmvu @@ -0,0 +1,342 @@ +#!/bin/sh +#script mod by gutosie +#neo init arm + +echo "====================================================> " +echo " " +echo " -=*[ NEOBOOT - BOOT UP ]*=- " +echo " NEO BOOT INIT Version: gutosie " +echo " q(-_-)p " +echo " " +echo "====================================================> " + + +NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` +IMAGEKATALOG=ImageBoot +HOSTNAME=`cat /etc/hostname` + +if [ -e /tmp/.init_reboot ]; then + rm /tmp/.init_reboot > /dev/null 2>&1 + break; + +else + if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ] ; then + CELBOOT=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` + if [ $CELBOOT = "Flash" ]; then + exec /sbin/init.sysvinit $1 + exit 0 + else + break; + fi + fi + + LIBDIR=/lib/modules/`uname -r` + if [ ! -d $LIBDIR ]; then + LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1` + fi + if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then + break; + else + echo "Mount local filesystems ..." + if [ `mount | grep /proc | wc -l` -lt 1 ]; then + /bin/mount -a + /bin/mount -n -t proc proc /proc > /dev/null 2>&1 + /bin/mount -n -t sysfs sysfs /sys > /dev/null 2>&1 + /sbin/depmod -Ae > /dev/null 2>&1 + fi + fi + + if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then + break; + else + echo "NeoBoot is starting mdev fom FLASH..." + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + /etc/init.d/mdev > /dev/null 2>&1 + fi + + sleep 5 + + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then + mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + echo "_______________________NeoBoot created location media_______________________" + fi + + if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then + /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh > /dev/null 2>&1 + echo "_______________________NeoBoot mount by MOUNTPOINT_______________________" + fi + else + mnttest="nolocation" + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install ]; then + orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1` + selectinstall=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install` + for item in $orgimag1; do + selectmnt=`blkid | find "$selectinstall" | cut -d" " -f1` + if [ $selectmnt = $selectinstall ]; then + echo "selectmnt="$selectmnt + mnttest="location" + mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + echo "Neoboot location detected." + fi + + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $selectinstall + umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + else + echo "NEOBOOT has been installed on: " $selectmnt + echo "_______________________ NeoBoot mount by LOCATION_______________________ " + break; + fi + done + fi + + if [ $mnttest = "location" ] ; then + break; + else + echo "NeoBoot mount by Device" + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then + echo "neoboot checking installation on: " $DEVICE + mount $DEVICE `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $DEVICE + umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + else + echo "NeoBoot has been installed on: " $DEVICE + echo "_______________________ NeoBoot mount by DEVICE_______________________" + break; + fi + done + fi + fi + + if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then + /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh + echo "_______________________NeoBoot mount by MOUNTPOINT_______________________" + fi + fi + + neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log + if [ -f $neoLOG ]; then + rm -f $neoLOG + touch $neoLOG + fi + + echo " >>> START NEXT LOG... >>> " >> $neoLOG + echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG + echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG + echo "......................................................." >> $neoLOG + echo "Tuner name: " `cat /etc/hostname` >> $neoLOG + echo "Boot image: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG + echo "Init image, base kernel: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG + + UPLOAD=ImagesUpload + if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot + echo "Reinstall kernel -Press number 3" > $NEODEVICE$UPLOAD/.kernel/used_flash_kernel + echo " Sending all processes the TERM- KILL signal..." + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + echo -n "<<>>" + echo " Sending all processes the TERM- KILL signal..." >> $neoLOG + echo "Error mounting, Return to image Flash..."; echo "Error mounting, Return to image Flash..." >> $neoLOG + reboot -d -f + fi + + TARGET=Flash + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ]; then + TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` + fi + + if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/boot/zImage.$HOSTNAME ]; then + echo "Image launched on a base kernel flash. " >> $neoLOG + echo "Image launched on a base kernel flash. " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/kernel_flash + + echo "NeoBoot is starting mdev fom FLASH..." + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + /etc/init.d/mdev > /dev/null 2>&1 + + MODPROBE=/sbin/modprobe + + echo "Load video and frame buffer modules ..." + #modprobe dvb + + echo "NeoBoot is loading modules" + for mod in dvb; do + $MODPROBE $mod + done + + # Hack for loading modules which are not loaded on diffrent kernel images + /etc/init.d/modutils.sh + # + echo -n "Set BOOTLOGO ..." + + cat /etc/videomode > /proc/stb/video/videomode + + #we must wait until udev has created the video device + ( + if [ -d /proc/stb ]; then + while true; do + if [ -e /dev/dvb/adapter0/video0 ]; then + break; + fi; + done; + fi; + [ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neowait.mvi; + ) & + + /etc/init.d/bootlogo > /dev/null 2>&1 + + sleep 5 + echo "Driverload end" + + if [ -f $LIBDIR/kernel/fs/autofs4/autofs4.ko ]; then + /sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1 + fi + + /usr/lib/enigma2/python/Plugins/Extensions/NFR4XBoot/bin/fbclear > /dev/null 2>&1 + fi + + #TARGET=Flash + HARDWARETYPE=`uname -m` + if [ $TARGET = "Flash" ]; then + echo "NEOBOOT is booting image from " $TARGET + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + if [ $HARDWARETYPE != "armv7l" ]; then + /usr/bin/showiframe /usr/share/bootlogo.mvi > /dev/null 2>&1 + fi + echo "----------------------------------" + echo " BOOT UP IMAGE FROM FLASH " + echo "----------------------------------"; + echo " BOOT UP IMAGE FROM FLASH " >> $neoLOG + ln -sfn /sbin/init.sysvinit /sbin/init + else + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ]; then + echo "No Error - Booting image normal..." + echo "No Error - Booting image normal... " >> $neoLOG + else + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image ]; then + echo " First start image - The first attempt to launch a new image..." >> $neoLOG + echo "First start image - The first attempt to launch a new image... " + echo "====================================================> " + rm -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image > /dev/null 2>&1 + else + if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ] ; then + if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then + dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p1 + elif [ $HOSTNAME = "vuzero4k" ] ; then + dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p4 + elif [ $HOSTNAME = "vuduo4k" ] ; then + dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p6 + fi + echo " Wrong kernel. FATAL ERROR - Back to image Flash..." >> $neoLOG + echo "Wrong kernel. Press number 3" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel + ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + echo -n "<<>>" + reboot -d -f + fi + fi + fi + + echo "NeoBoot is booting" $TARGET " from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` + + if [ -d $NEODEVICE$IMAGEKATALOG/$TARGET ]; then + if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev ]; then + sed -ie "s#\$4#\$3#g" $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev + fi + + if [ $HARDWARETYPE != "armv7l" ]; then + if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi ]; then + /usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi + else + /usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi + fi + fi + + sleep 1 + + /bin/mount -o bind /dev $NEODEVICE$IMAGEKATALOG/$TARGET/dev + /bin/mount -o bind /proc $NEODEVICE$IMAGEKATALOG/$TARGET/proc + /bin/mount -o bind /sys $NEODEVICE$IMAGEKATALOG/$TARGET/sys + rm $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1 + mkdir $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1 + + if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then + break; + else + orgimag=`mount | sed '/sd/!d' | cut -d" " -f1` + rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + for item in $orgimag; do + ohdd=`echo $item | cut -d"/" -f3` + nhdd=`mount | sed "/\$ohdd/!d" | grep '' | cut -d' ' -f3` + echo "Copied mount to run image." $nhdd >> $neoLOG + echo $nhdd + echo "mkdir "$nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + done + chmod 755 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "NeoBOOT created the file enigma2_pre_start.sh " + + if [ ! -e $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh ]; then + cp -f /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh #nie powinno sie zdarzyc + fi + fi + + echo " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..." + cp -f -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh + #/bin/mount /dev/sda1 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$TARGET/media/hdd + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init ]; then + echo "----------------------------------------" + echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " + echo "----------------------------------------" + echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " >> $neoLOG + echo "Boot from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` >> $neoLOG + echo "start file - init >" $TARGET >> $neoLOG + echo "====================================================> " + exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init.sysvinit + elif [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init.sysvinit ]; then + echo " start file - init.sysvinit" >> $neoLOG + exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init + echo "====================================================> " + else + echo " NEOBOOT - ERROR !!! " + echo "Not found correctly unpacked image "$TARGET" z partycji " $DEVICE + echo "Check the correctness of unpacked catalogs in the selected one image. " + echo " Back to image Flash... " + /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1 + echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot + echo "Used Kernel: Reinstall kernel !" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + echo -n " FATAL ERROR - Back to image Flash...\n<<>>" >> $neoLOG + echo -n "<<>>" + ln -sfn /sbin/init.sysvinit /sbin/init + reboot -d -f + + fi + exit 0 + fi + fi +fi + +# boot Flash + +if [ -f /sbin/init.sysvinit ]; then + echo "Running /sbin/init.sysvinit - boot Flash" + exec /sbin/init.sysvinit $1 +fi + +exit 0 +;; +esac +exit diff --git a/bin/neoinitarmvuDuo4k b/bin/neoinitarmvuDuo4k new file mode 100644 index 0000000..279cb02 --- /dev/null +++ b/bin/neoinitarmvuDuo4k @@ -0,0 +1,275 @@ +#!/bin/sh +#script mod by gutosie +#neo init arm + +echo "====================================================> " +echo " " +echo " -=*[ NEOBOOT - BOOT UP ]*=- " +echo " NEO BOOT INIT Version: gutosie " +echo " q(-_-)p " +echo " " +echo "====================================================> " + + +NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` +IMAGEKATALOG=ImageBoot + + +if [ -e /tmp/.init_reboot ]; then + rm /tmp/.init_reboot + break; + +else + if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`IMAGEKATALOG/.neonextboot ] ; then + CELBOOT=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` + if [ $CELBOOT = "Flash" ]; then + exec /sbin/init.sysvinit $* + exit 0 + else + echo " " + break; + fi + fi + + + LIBDIR=/lib/modules/`uname -r` + if [ ! -d $LIBDIR ]; then + LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1` + fi + echo "Mount kernel filesystems ..." + if [ `mount | grep /proc | wc -l` -lt 1 ]; then + /bin/mount -a + /bin/mount -t proc proc /proc > /dev/null 2>&1 + /bin/mount -t sysfs sysfs /sys > /dev/null 2>&1 + /sbin/depmod -Ae > /dev/null 2>&1 + fi + + sleep 5 + + echo "NeoBoot is starting mdev and mout HDD USB ..." + sleep 1 + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + /etc/init.d/mdev > /dev/null 2>&1 + + +############..>>>>>>>> + + sleep 5 + mnttest="nouuid" + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install ]; then + orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1` + selectinstall=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install` + for item in $orgimag1; do + selectmnt=`blkid | sed "/$selectinstall/!d" | cut -d":" -f1` + if [ $selectmnt == $item ]; then + echo "selectmnt=" $selectmnt + mnttest="uuid" + mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $selectmnt + umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + else + echo "NeoBoot has been installed on: " $selectmnt + break; + fi + done + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG ]; then + mkdir -p /media/hdd > /dev/null 2>&1 + mkdir -p /media/usb > /dev/null 2>&1 + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then + mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + fi + if [ $mnttest == "nouuid" ] ; then + echo "NeoBoot mount by Device" + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then + echo "neoboot checking installation on: " $DEVICE + mount $DEVICE `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + fi + if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $DEVICE + umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 + else + echo "NeoBoot has been installed on: " $DEVICE + break; + fi + done + elif [ $mnttest == "uuid" ]; then + echo "NeoBoot mount by UUID" + fi + + if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then + if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh ]; then + /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh + echo "___________________neoMountpoint_______________________ " + sleep 1 + fi + + fi + + MODPROBE=/sbin/modprobe + + echo "Load video and frame buffer modules ..." + #modprobe dvb + + echo "NeoBoot is loading modules" + for mod in dvb; do + $MODPROBE $mod + done + + # Hack for loading modules which are not loaded on diffrent kernel images + /etc/init.d/modutils.sh + # + + echo "Set BOOTLOGO ..." + sleep 1 + + + cat /etc/videomode > /proc/stb/video/videomode + + #we must wait until udev has created the video device + ( + if [ -d /proc/stb ]; then + while true; do + if [ -e /dev/dvb/adapter0/video0 ]; then + break; + fi; + done; + fi; + [ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neowait.mvi; + ) & + + /etc/init.d/bootlogo > /dev/null 2>&1 + + sleep 2 + echo "Driverload end" + + if [ -f $LIBDIR/kernel/fs/autofs4/autofs4.ko ]; then + /sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1 + fi + + if [ -e /tmp/init_reboot ]; then + break; + fi + + +###>>>>>>>>>>>>>>>>> + + UPLOAD=ImagesUpload + mount /dev/sda1 /media/hdd + if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then + echo "Error mounting, Return to image Flash..." + sleep 2 + ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot + echo "Reinstall kernel -Press number 3" > $NEODEVICE$UPLOAD/.kernel/used_flash_kernel + echo " Sending all processes the TERM- KILL signal..." + reboot -f + fi + + + TARGET=Flash + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ]; then + TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` + fi + + if [ $TARGET = "Flash" ]; then + echo "NEOBOOT is booting image from " $TARGET + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + /usr/bin/showiframe /usr/share/bootlogo.mvi > /dev/null 2>&1 + sync; ln -sfn /sbin/init.sysvinit /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh + echo "----------------------------------" + echo " BOOT UP IMAGE FROM FLASH " + echo "----------------------------------" + else + + echo "NeoBoot is booting" $TARGET " from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` + + if [ -d $NEODEVICE$IMAGEKATALOG/$TARGET ]; then + if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev ]; then + sed -ie s!"\$4"!"\$3"!g $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev + fi + + if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi ]; then + /usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi + else + /usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi + fi + + sleep 1 + + /bin/mount -o bind /dev $NEODEVICE$IMAGEKATALOG/$TARGET/dev + /bin/mount -o bind /proc $NEODEVICE$IMAGEKATALOG/$TARGET/proc + /bin/mount -o bind /sys $NEODEVICE$IMAGEKATALOG/$TARGET/sys + + rm $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1 + mkdir $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1 + + rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + + orgimag=`mount | sed '/sd/!d' | cut -d" " -f1` + for item in $orgimag; do + ohdd=`echo $item | cut -d"/" -f3` + nhdd=`mount | sed "/\$ohdd/!d" | sed q | cut -d" " -f3` + if [ $nhdd == '$NEODEVICE' ]; then + echo $nhdd + echo "mkdir "$nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + else + echo "umount "$nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mkdir "$nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo ok + fi + done + if [ ! -e $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh ]; then + cp -f /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + fi + chmod 755 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh + echo "NeoBOOT created the file mount enigma2_pre_start.sh " + + echo " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..." + + if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init.sysvinit ]; then + echo "----------------------------------------" + echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " + echo "----------------------------------------" + exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init.sysvinit + elif [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init ]; then + exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init + else + echo " " + echo " NEOBOOT - ERROR !!! " + echo "Not found correctly unpacked image "$TARGET" z partycji " $DEVICE + echo "Check the correctness of unpacked catalogs in the selected one image. " + echo " Back to image Flash... " + + /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1 + sync; ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot + echo "Used Kernel: Reinstall kernel !" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel + sleep 15; reboot -f + + fi + exit 0 + fi + fi +fi + +# boot Flash + +if [ -f /sbin/init.sysvinit ]; then + #echo "Running /sbin/init.sysvinit" + exec /sbin/init.sysvinit $1 +fi + +exit 0 +;; +esac +exit diff --git a/bin/neoinitmips b/bin/neoinitmips new file mode 100644 index 0000000..5069cfe --- /dev/null +++ b/bin/neoinitmips @@ -0,0 +1,322 @@ +#!/bin/sh +#DESCRIPTION = This script mod. by gutosie +#NeoBoot INIT Version: 6.00 +#Scrypt Unix Shell - init for neoboot + +IMAGE=/media/neoboot/ImageBoot +IMAGEBOOT=/media/neoboot/ImageBoot/.neonextboot +NEO=/media/neoboot +NEOBOOT=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot +MODPROBE=/sbin/modprobe +BOXNAME=`cat /etc/hostname` +FINDBOOT=/media/*/ImageBoot/.neonextboot + + +if [ -e /tmp/.init_reboot ]; then + rm /tmp/.init_reboot + break; + +else + if [ -e $FINDBOOT ] ; then + CELBOOT=`cat $FINDBOOT` + if [ $CELBOOT = "Flash" ]; then + exec /sbin/init.sysvinit $* + exit 0 + else + echo " " + break; + fi + fi + + echo "====================================================> " + echo " " + echo " -=*[ NEOBOOT - BOOT UP ]*=- " + echo " NEO BOOT INIT Version: 6.00 Update 6.15 16-11-2017 " + echo " q(-_-)p " + echo " " + echo "====================================================> " + + /etc/init.d/sysfs.sh + /etc/init.d/modutils.sh + + echo "NEOBOOT is starting mdev" + echo " " + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + /etc/init.d/mdev > /dev/null 2>&1 + + mknod /dev/sda b 8 0 + mknod /dev/sda1 b 8 1 + mknod /dev/sda2 b 8 2 + mknod /dev/sdb b 8 16 + mknod /dev/sdb1 b 8 17 + mknod /dev/sdb2 b 8 18 + mknod /dev/sdc b 8 32 + mknod /dev/sdc1 b 8 33 + mknod /dev/sdc2 b 8 34 + mknod /dev/sdd b 8 48 + mknod /dev/sdd1 b 8 49 + mknod /dev/sdd2 b 8 50 + + mkdir /dev/input + mknod /dev/input/event0 c 13 64 + + mknod /dev/fb0 c 29 0 + mkdir /dev/fb + ln -s ../fb0 /dev/fb/0 + + sleep 1 + + if [ -e /etc/videomode ]; then + cat /etc/videomode > /proc/stb/video/videomode + fi + if [ -e /etc/videomode2 ]; then + cat /etc/videomode2 > /proc/stb/video/videomode + fi + + ( + if [ -d /proc/stb ]; then + while true; do + if [ -e /dev/dvb/adapter0/video0 ]; then + break; + fi; + done; + fi; + [ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe $NEOBOOT/neowait.mvi; + + ) & + + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ ! -e /media/neoboot/ImageBoot/.neonextboot ]; then + mount $DEVICE /media/neoboot > /dev/null 2>&1 + fi + if [ ! -e /media/neoboot/ImageBoot/.neonextboot ]; then + umount /media/neoboot > /dev/null 2>&1 + fi + done + + LIBDIR=/lib/modules/`uname -r` + if [ ! -d $LIBDIR ]; then + LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1` + fi + + if [ `mount | grep /proc | wc -l` -lt 1 ]; then + /bin/mount -t proc proc /proc > /dev/null 2>&1 + /bin/mount -t sysfs sysfs /sys > /dev/null 2>&1 + /sbin/depmod -Ae > /dev/null 2>&1 + fi + + sleep 1 + echo " " + echo "Search NEOBOOT... " + #sed=grep + mnttest="nouuid" + if [ -e $NEOBOOT/bin/install ]; then + orgimag1=`mount | grep '/sd/!d' | cut -d" " -f1` + selectinstall=`cat $NEOBOOT/bin/install` + for item in $orgimag1; do + selectmnt=`blkid | grep "/$selectinstall/!d" | cut -d":" -f1` + if [ $selectmnt == $item ]; then + echo "selectmnt=" $selectmnt + mnttest="uuid" + mount $selectmnt $NEO > /dev/null 2>&1 + fi + if [ ! -e $IMAGE ]; then + echo "NEOBOOT hasn't been installed on: " $selectmnt + umount $NEO > /dev/null 2>&1 + else + echo "NEOBOOT has been installed on: " $selectmnt + break; + fi + done + fi + + if [ ! -e $NEO ]; then + mkdir $NEO > /dev/null 2>&1 + fi + + if [ $mnttest == "nouuid" ]; then + echo "NEOBOOT mount by Device" + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ -e $NEO ]; then + echo "NEOBOOT checking installation on: " $DEVICE + mount $DEVICE $NEO > /dev/null 2>&1 + fi + if [ ! -e $IMAGE ]; then + echo "NEOBOOT hasn't been installed on:" $DEVICE + umount $NEO > /dev/null 2>&1 + else + echo "NEOBOOT has been installed on: " $DEVICE + break; + fi + done + elif [ $mnttest == "uuid" ]; then + echo "NEOBOOT mount by UUID" + fi + + #dodatkowe szukanie neoboota + #mount /dev/sdb1 $NEO > /dev/null 2>&1 # <<< tu mozesz zmienic sdb1 i wpisac Twoje montowanie dysku dla neoboot + + echo "NEOBOOT is loading modules." + for mod in dvb; do + echo "=======================> NeoBoot is loading modules" + $MODPROBE $mod + done + + if [ -f $LIBDIR/kernel/fs/autofs4/autofs4.ko ]; then + /sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1 + fi + + sleep 1 + + if [ -e $NEOBOOT/bin/fbclear ]; then + $NEOBOOT/bin/fbclear; $NEOBOOT/bin/fbclear; $NEOBOOT/bin/fbclear; $NEOBOOT/bin/fbclear > /dev/null 2>&1 + fi + + + if [ -e $NEOBOOT/bin/neobm ]; then + echo " Neo-Boot start boot manager " + echo " Waiting to change image - 20s " + echo " " + chmod 0755 $NEOBOOT/bin/neobm + $NEOBOOT/neologo.mvi > /dev/null 2>&1 + sleep 1 + $NEOBOOT/bin/neobm > /dev/null 2>&1 + fi + + if [ ! -e $IMAGEBOOT ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > $IMAGEBOOT + echo "Used Kernel: Reinstall kernel !" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel + reboot -f + fi + + + TARGETIMAGE=`cat $IMAGEBOOT` + if [ $TARGETIMAGE = "BlackHoleVU" ] || [ $TARGETIMAGE = "BlackHoleVU+" ] ; then + if ! [ -e $NEO/ImagesUpload/.kernel/used_bh_kernel ]; then + rm -f $IMAGEBOOT + echo "Flash " >> $IMAGEBOOT + echo "Halt init image - " $TARGETIMAGE + echo "Start image Flash... " + $NEOBOOT/bh.mvi > /dev/null 2>&1 + sync; sleep 1 + exec /sbin/init.sysvinit $* + exit 0 + else + break; + fi + fi + + sync + + TARGET=Flash + if [ -f $IMAGEBOOT ]; then + TARGET=`cat $IMAGEBOOT` + fi + + if [ $TARGET = "Flash" ]; then + echo "____________________________________" + echo "____________________________________" + echo " " + echo "NEOBOOT is booting image from " $TARGET + echo "____________________________________" + echo "____________________________________" + /bin/umount $NEO > /dev/null 2>&1 + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + /usr/bin/showiframe /usr/share/bootlogo.mvi > /dev/null 2>&1 + echo "----------------------------------" + echo " BOOT UP IMAGE FROM FLASH " + echo "----------------------------------" + else + echo " " + echo "NEOBOOT is booting image" $TARGET " from " $DEVICE + echo " " + if [ -d $IMAGE/$TARGET ]; then + if [ -f $IMAGE/$TARGET/etc/init.d/udev ]; then + sed -ei s!"\$4"!"\$3"!g $IMAGE/$TARGET/etc/init.d/udev + fi + + if [ -f $IMAGE/$TARGET/usr/share/bootlogo.mvi ]; then + /usr/bin/showiframe $IMAGE/$TARGET/usr/share/bootlogo.mvi > /dev/null 2>&1 + fi + + sleep 1 + + /bin/mount -o bind /dev $IMAGE/$TARGET/dev + /bin/mount -o bind /proc $IMAGE/$TARGET/proc + /bin/mount -o bind /sys $IMAGE/$TARGET/sys + rm $IMAGE/$TARGET/media/neoboot > /dev/null 2>&1 + mkdir $IMAGE/$TARGET/media/neoboot > /dev/null 2>&1 + orgimag=`mount | sed '/sd/!d' | cut -d" " -f1` + rm -f $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + for item in $orgimag; do + ohdd=`echo $item | cut -d"/" -f3` + nhdd=`mount | sed "/\$ohdd/!d" | sed q | cut -d" " -f3` + if [ $nhdd == '$NEO' ]; then + echo $nhdd + echo "mkdir "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + else + echo "umount "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mkdir "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + fi + done + + if [ -f $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh ]; then + chmod 755 $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + fi + echo "----------------------------------------" + echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " + echo "----------------------------------------" + + + if [ ! -f /media/neoboot/ImageBoot/$TARGET/media/neoboot/ImageBoot/.neonextboot ]; then + /bin/mount -o bind /media/neoboot /media/neoboot/ImageBoot/$TARGET/media/neoboot + fi + + DEVICES1=`ls /media` + for DEVICE in $DEVICES1; + do + if [ -f /media/$DEVICE/ImageBoot/.neonextboot ]; then + /bin/mount -o bind /media/neoboot /media/neoboot/ImageBoot/$TARGET/media/$DEVICE + fi + done + + cd /media/neoboot/ImageBoot/$TARGET; + + if [ -f $IMAGE/$TARGET/sbin/init.sysvinit ]; then + exec /usr/sbin/chroot . /sbin/init.sysvinit $* + elif [ -f $IMAGE/$TARGET/sbin/init ]; then + exec /usr/sbin/chroot . /sbin/init $* + else + echo " " + echo " NEOBOOT - ERROR !!! " + echo "Nie odnaleziono poprawnie rozpakowanego image "$TARGET" z partycji " $DEVICE + echo " Sprawdz poprawnosc rozpakowanych katalogow w wybranym image. " + echo " Powrot do image Flash... " + rm -f $IMAGEBOOT; touch $IMAGEBOOT; echo "Flash " >> $IMAGEBOOT + /usr/bin/showiframe $NEOBOOT/error.mvi > /dev/null 2>&1 + sync; sleep 10; exec /sbin/init.sysvinit $* + + fi + exit 0 + + fi + fi +fi + +if [ -f /sbin/init.sysvinit ]; then + exec /sbin/init.sysvinit $* +fi + +exit 0 +;; +esac +exit + \ No newline at end of file diff --git a/bin/neoinitmipsvu b/bin/neoinitmipsvu new file mode 100644 index 0000000..59c54a9 --- /dev/null +++ b/bin/neoinitmipsvu @@ -0,0 +1,136 @@ +#!/bin/sh +#script mod by gutosie +IMAGE=/media/neoboot/ImageBoot +IMAGEBOOT=/media/neoboot/ImageBoot/.neonextboot +NEO=/media/neoboot +NEOBOOT=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot +MODPROBE=/sbin/modprobe +BOXNAME=`cat /etc/hostname` +FINDBOOT=/media/*/ImageBoot/.neonextboot +CELBOOT=`cat $FINDBOOT` + +if [ $CELBOOT = "Flash" ] || [ -e /tmp/.init_reboot ] ; then + exec /sbin/init.sysvinit $1 +else + LIBDIR=/lib/modules/`uname -r` + if [ ! -d $LIBDIR ]; then + LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1` + fi + if [ `mount | grep /proc | wc -l` -lt 1 ]; then + /bin/mount -t proc proc /proc > /dev/null 2>&1 + /bin/mount -t sysfs sysfs /sys > /dev/null 2>&1 + /sbin/depmod -Ae > /dev/null 2>&1 + fi + sleep 2 + mnttest="nouuid" + if [ -e $NEOBOOT/bin/install ]; then + orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1` + selectinstall=`cat $NEOBOOT/bin/install` + for item in $orgimag1; do + selectmnt=`blkid | sed '/$selectinstall/!d' | cut -d":" -f1` + if [ $selectmnt == $item ]; then + echo "selectmnt=" $selectmnt + mnttest="uuid" + mount $selectmnt $NEO > /dev/null 2>&1 + fi + if [ ! -e $NEO/ImageBoot ]; then + echo "NEOBOOT hasn't been installed on: " $selectmnt + umount $NEO > /dev/null 2>&1 + else + echo "NEOBOOT has been installed on: " $selectmnt + break; + fi + done + fi + if [ ! -e $NEO ]; then + mkdir $NEO > /dev/null 2>&1 + fi + if [ $mnttest == "nouuid" ] ; then + echo "NeoBoot mount by Device" + DEVICES1=`find /dev/sd??` + for DEVICE in $DEVICES1; + do + if [ -e $NEO ]; then + echo "neoboot checking installation on: " $DEVICE + mount $DEVICE $NEO > /dev/null 2>&1 + fi + + if [ ! -e $NEO/ImageBoot ]; then + echo "NeoBoot hasn't been installed on: " $DEVICE + umount $NEO > /dev/null 2>&1 + else + echo "NEOBOOTt has been installed on: " $DEVICE + break; + fi + done + elif [ $mnttest == "uuid" ]; then + echo "NEOBOOT mount by UUID" + fi + if [ ! -e $IMAGEBOOT ]; then + ln -sfn /sbin/init.sysvinit /sbin/init + echo "Flash " > $IMAGEBOOT + echo "Used Kernel: Reinstall kernel !" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel + reboot -f + fi + TARGET=Flash + if [ -f $IMAGEBOOT ]; then + TARGET=`cat $IMAGEBOOT` + fi + if [ $TARGET = "Flash" ]; then + echo "NEOBOOT is booting image from " $TARGET + /bin/umount $NEO > /dev/null 2>&1 + /bin/umount /media/usb > /dev/null 2>&1 + /bin/umount /media/hdd > /dev/null 2>&1 + else + echo "NEOBOOT is booting" $TARGET " from " $DEVICE + echo 3 > /proc/sys/vm/drop_caches + if [ -d $NEO/ImageBoot/$TARGET ]; then + if [ -f $NEO/ImageBoot/$TARGET/etc/init.d/udev ]; then + sed -ie s!"\$4"!"\$3"!g $NEO/ImageBoot/$TARGET/etc/init.d/udev + fi + sleep 1 + /bin/mount -o bind /dev $NEO/ImageBoot/$TARGET/dev + /bin/mount -o bind /proc $NEO/ImageBoot/$TARGET/proc + /bin/mount -o bind /sys $NEO/ImageBoot/$TARGET/sys + rm $NEO/ImageBoot/$TARGET$NEO > /dev/null 2>&1 + mkdir $NEO/ImageBoot/$TARGET$NEO > /dev/null 2>&1 + orgimag=`mount | sed '/sd/!d' | cut -d" " -f1` + rm -f $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + for item in $orgimag; do + ohdd=`echo $item | cut -d"/" -f3` + nhdd=`mount | sed "/\$ohdd/!d" | sed q | cut -d" " -f3` + if [ $nhdd == '$NEO' ]; then + echo $nhdd + echo "mkdir "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + else + echo "umount "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mkdir "$nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo "mount "$item $nhdd >> $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + echo ok + fi + done + chmod 755 $IMAGE/$TARGET/usr/bin/enigma2_pre_start.sh + + if [ -f $IMAGE/$TARGET/sbin/init.sysvinit ]; then + exec /usr/sbin/chroot $IMAGE/$TARGET /sbin/init.sysvinit + elif [ -f $IMAGE/$TARGET/sbin/init ]; then + exec /usr/sbin/chroot $IMAGE/$TARGET /sbin/init + else + echo " " + echo " NEOBOOT - ERROR !!! " + echo "Nie odnaleziono poprawnie rozpakowanego image "$TARGET" z partycji " $DEVICE + echo " Sprawdz poprawnosc rozpakowanych katalogow w wybranym image. " + echo " Powrot do image Flash... " + rm -f $IMAGEBOOT; touch $IMAGEBOOT; echo "Flash " >> $IMAGEBOOT + sync; sleep 10; exec /sbin/init.sysvinit $1 + fi + exit 0 + fi + fi +fi +if [ -f /sbin/init.sysvinit ]; then + exec /sbin/init.sysvinit $1 +fi + +exit 0 \ No newline at end of file diff --git a/bin/nfidump b/bin/nfidump new file mode 100644 index 0000000..d56bf4d Binary files /dev/null and b/bin/nfidump differ diff --git a/bin/utilsbh b/bin/utilsbh new file mode 100644 index 0000000..d5dc9c9 --- /dev/null +++ b/bin/utilsbh @@ -0,0 +1,189 @@ +from re import sub +from Tools.Directories import fileExists, resolveFilename, SCOPE_CURRENT_SKIN +import xml.etree.cElementTree +entities = [('ä', u'\xe4'), + ('ä', u'\xe4'), + ('ü', u'\xfc'), + ('ü', u'\xfc'), + ('ö', u'\xf6'), + ('ö', u'\xf6'), + ('Ä', u'\xc4'), + ('Ä', u'\xc4'), + ('Ü', u'\xdc'), + ('Ü', u'\xdc'), + ('Ö', u'\xd6'), + ('Ö', u'\xd6'), + ('ß', u'\xdf'), + ('ß', u'\xdf'), + ('…', u'...'), + ('–', u'-'), + (' ', u' '), + ('"', u'"'), + ('&', u'&'), + (''', u"'"), + ('<', u'<'), + ('>', u'>'), + ('<', u'<'), + ('>', u'>'), + (' ', u' '), + ('&', u'&'), + ('"', u'"'), + (''', u"'")] + +def nab_strip_html(html): + html = html.replace('\n', ' ') + html = sub('\\s\\s+', ' ', html) + html = sub('', '\n', html) + html = sub('', '\n', html) + html = sub('', '-', html) + html = html.replace('', '\n') + return nab_strip_pass1(html) + + +def nab_strip_pass1(html): + html = sub('<(.*?)>', '', html) + html.replace('Ä', '\xc3\x84') + html.replace('ä', '\xc3\xa4') + html.replace('ä', '\xc3\xa4') + html.replace('ü', '\xc3\xbc') + html.replace('ü', '\xc3\xbc') + html.replace('ö', '\xc3\xb6') + html.replace('ö', '\xc3\xb6') + html.replace('Ä', '\xc3\x84') + html.replace('Ä', '\xc3\x84') + html.replace('Ü', '\xc3\x9c') + html.replace('Ü', '\xc3\x9c') + html.replace('Ö', '\xc3\x96') + html.replace('Ö', '\xc3\x96') + html.replace('ß', '\xc3\x9f') + html.replace('ß', '\xc3\x9f') + html.replace('<', '<') + html.replace('>', '>') + html.replace(' ', ' ') + html.replace('&', '&') + html.replace('"', '"') + html.replace(''', "'") + return html + + +def nab_Read_CCCinfoCfg(): + myhost = '127.0.0.1' + myuser = mypass = '' + myport = '16001' + if fileExists('/etc/delcccaminfo'): + f = open('/etc/delcccaminfo', 'r') + for line in f.readlines(): + line = line.strip() + if line.find('HOST ADDRESS:') != -1: + myhost = line[13:] + elif line.find('WEBINFO USERNAME:') != -1: + myuser = line[17:] + elif line.find('WEBINFO PASSWORD:') != -1: + mypass = line[17:] + elif line.find('WEBINFO LISTEN PORT:') != -1: + myport = line[20:] + + f.close() + myurl = 'http://' + myhost + ':' + myport + if myuser and mypass: + myurl = 'http://' + myuser + ':' + mypass + '@' + myhost + ':' + myport + return [myhost, + myuser, + mypass, + myport, + myurl] + + +def nab_Write_CCCinfoCfg(mycfg): + out = open('/etc/delcccaminfo', 'w') + strview = 'HOST ADDRESS:' + mycfg[0] + '\n' + out.write(strview) + strview = 'WEBINFO USERNAME:' + mycfg[1] + '\n' + out.write(strview) + strview = 'WEBINFO PASSWORD:' + mycfg[2] + '\n' + out.write(strview) + strview = 'WEBINFO LISTEN PORT:' + mycfg[3] + '\n' + out.write(strview) + out.close() + + +def DeliteGetSkinPath(): + myskinpath = resolveFilename(SCOPE_CURRENT_SKIN, '') + if myskinpath == '/usr/share/enigma2/': + myskinpath = '/usr/share/enigma2/skin_default/' + return myskinpath + + +def nab_Detect_Machine(): + machine = 'dm8000' + if fileExists('/etc/bhmachine'): + f = open('/etc/bhmachine', 'r') + machine = f.readline().strip() + f.close() + return machine + + +def BhU_get_Version(): + ver = '' + if fileExists('/boot/blackhole/version'): + f = open('/boot/blackhole/version', 'r') + ver = f.readline().strip() + f.close() + return ver + + +def BhU_check_proc_version(): + ver = '' + if fileExists('/boot/blackhole/version'): + f = open('/boot/blackhole/version', 'r') + ver = f.readline().strip() + f.close() + return ver + + +def BhU_checkSkinVersion(skinfile): + version = '2.0.0' + authors = ['Army', 'Matrix10', 'capa'] + ret = 'Sorry this skin is not compatible with the current Black Hole image version.' + curversion = int(version.replace('.', '')) + fullfile = '/usr/share/enigma2/' + skinfile + checkver = False + checkauth = False + if fileExists(fullfile): + f = open(fullfile) + for line in f.readlines(): + if line.find('black hole version:') != -1: + parts = line.strip().split(':') + ver = int(parts[1].strip().replace('.', '')) + if ver >= curversion: + checkver = True + elif line.find('skin author:') != -1: + parts = line.strip().split(':') + auth = parts[1].strip() + for a in authors: + if a == auth: + checkauth = True + + f.close() + if checkver == True: + if checkauth == True: + ret = 'passed' + return ret + + +def BhU_find_hdd(): + hdd = '' + hdds = ['sda', + 'sdb', + 'sdc', + 'sdd', + 'sde', + 'sdf'] + for device in hdds: + filename = '/sys/block/%s/removable' % device + if fileExists(filename): + if file(filename).read().strip() == '0': + hdd = device + break + + return hdd \ No newline at end of file diff --git a/bin/version b/bin/version new file mode 100644 index 0000000..347f583 --- /dev/null +++ b/bin/version @@ -0,0 +1 @@ +1.4.1