This commit is contained in:
gutosie
2019-02-19 17:35:08 +01:00
committed by GitHub
parent cbfa7dd71f
commit 9e1fca7c35
2 changed files with 80 additions and 38 deletions

Binary file not shown.

View File

@@ -27,11 +27,19 @@ else
LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1`
fi
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 4
echo "NeoBoot is starting mdev"
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/etc/init.d/mdev > /dev/null 2>&1
sleep 5
#install=install2
mnttest="nouuid"
if [ -e $NEOBOOT/bin/install ]; then
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
@@ -52,25 +60,7 @@ else
fi
done
fi
if [ -e $NEOBOOT/bin/install2 ]; then
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
selectinstall2=`cat $NEOBOOT/bin/install2`
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
@@ -95,7 +85,48 @@ else
elif [ $mnttest="uuid" ]; then
echo "NEOBOOT mount by UUID"
fi
##############___________________
MODPROBE=/sbin/modprobe
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
#
cat /etc/videomode2 > /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/share/bootlogo.mvi || /usr/bin/showiframe /usr/share/bootlogo_wait.mvi;
) &
sleep 10
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/.opd.inf ]; then
break;
fi
#/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/fbclear > /dev/null 2>&1
##############______________________
#################################################
if [ -e $NEOBOOT/bin/neobmarm ]; then
echo " Neo-Boot start boot manager "
@@ -123,16 +154,21 @@ else
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
/usr/bin/showiframe /usr/share/bootlogo.mvi > /dev/null 2>&1
else
echo "NeoBoot is booting" $TARGET " from " $DEVICE
######### test boot new imaga>>>>
if [ -e $IMAGE/$TARGET/.control_ok ]; then
if [ -e $IMAGE/$TARGET/.control_ok ]; then
[ $PL ] && echo "Nie ma bledu, normalny start image..." || echo "No Error - Booting image normal..."
#echo "No Error - Booting image normal... "
sync
else
else
if [ -e $IMAGE/$TARGET/.control_boot_new_image ]; then
echo "First start image - The first attempt to launch a new image... "; rm -f $IMAGE/$TARGET/.control_boot_new_image
sync
else
if [ ! -e $IMAGE/$TARGET/.control_ok ] ; then
if [ $BOXNAME = "vuultimo4k" ] || [ $BOXNAME = "vusolo4k" ] || [ $BOXNAME = "vuuno4kse" ] || [ $BOXNAME = "vuuno4k" ]; then
@@ -154,24 +190,26 @@ else
echo "Wrong kernel. Press number 3" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel
ln -sfn /sbin/init.sysvinit /sbin/init
echo "Flash " > /media/neoboot/ImageBoot/.neonextboot
sync
echo "Error - NeoBoot he can not run it image !!! "
echo "Restart STB - Back to Flash... "
sleep 5; reboot -f
fi
fi
fi
######### test boot new image<<<<<
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
if [ -d $NEO/ImageBoot/$TARGET ]; then
fi
######### test boot new image<<<<<
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
if [ -f /media/opdboot/NeoBootI/$TARGET/usr/share/bootlogo.mvi ]; then
/usr/bin/showiframe /media/neoboot/ImageBoot/$TARGET/usr/share/bootlogo.mvi
else
/usr/bin/showiframe /media/neoboot/ImageBoot/$TARGET/usr/share/bootlogo.mvi
fi
sleep 1
/bin/mount -o bind /dev $NEO/ImageBoot/$TARGET/dev
/bin/mount -o bind /proc $NEO/ImageBoot/$TARGET/proc
@@ -208,13 +246,17 @@ else
echo " Back to 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 $1
sleep 10; exec /sbin/init.sysvinit $1
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