Compare commits
121 Commits
git-commit
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4862c0444c | ||
|
|
77ddc53c33 | ||
|
|
37beecea96 | ||
|
|
89b4bdbe6f | ||
|
|
8e1b0c751f | ||
|
|
d740371520 | ||
|
|
494ab6070c | ||
|
|
6e42a21ef0 | ||
|
|
3b9dfa151e | ||
|
|
7920b9cc24 | ||
|
|
b8c421f3e1 | ||
|
|
561c7d3978 | ||
|
|
767c1f43ce | ||
|
|
688c0b0a6f | ||
|
|
8f136eb189 | ||
|
|
b9d237f2ef | ||
|
|
1b0bc634d7 | ||
|
|
9a733ffe1f | ||
|
|
49b9cf1ca1 | ||
|
|
74efb17f9d | ||
|
|
91b8ff9d22 | ||
|
|
13c5421ed4 | ||
|
|
a8d26cbfee | ||
|
|
3e6d4adcfe | ||
|
|
f944c63ca7 | ||
|
|
eb55824c25 | ||
|
|
80de61ce65 | ||
|
|
c3aed90ecb | ||
|
|
97601b8764 | ||
|
|
c99ff99938 | ||
|
|
27bed75762 | ||
|
|
8fc7952fe9 | ||
|
|
4e57e1f12b | ||
|
|
0a7b20ef4e | ||
|
|
b911cbf027 | ||
|
|
008e262417 | ||
|
|
c3c5d38895 | ||
|
|
7ff36d8aad | ||
|
|
068f0f7a13 | ||
|
|
8602c4219e | ||
|
|
5a21a49c99 | ||
|
|
1969dc68f0 | ||
|
|
5540aa582c | ||
|
|
657b1da170 | ||
|
|
5b6b19fe35 | ||
|
|
055310a614 | ||
|
|
b36c6e322a | ||
|
|
a407874ea9 | ||
|
|
9f35e90223 | ||
|
|
ef4076b3db | ||
|
|
6464131d51 | ||
|
|
8761fe68dc | ||
|
|
95a7f2fbce | ||
|
|
e8752916c6 | ||
|
|
24a3ec389d | ||
|
|
7ec821394b | ||
|
|
a3e94faa29 | ||
|
|
01abf0d3c5 | ||
|
|
81adf88a68 | ||
|
|
49582a0f5a | ||
|
|
88af20cf4f | ||
|
|
0f2b00efc1 | ||
|
|
c81899d78a | ||
|
|
d0539ac854 | ||
|
|
95524f0d0d | ||
|
|
a4e0d038fe | ||
|
|
bb3dd4f6b1 | ||
|
|
3eae0e71db | ||
|
|
742bb68d9e | ||
|
|
d3887aba6e | ||
|
|
55c19b421e | ||
|
|
bff40d438b | ||
|
|
b147768b93 | ||
|
|
2af9ce5af2 | ||
|
|
e9ee94a212 | ||
|
|
40573af355 | ||
|
|
6b32f70569 | ||
|
|
9e81277518 | ||
|
|
c7eb640bff | ||
|
|
20241d0b1c | ||
|
|
1d7f6b2ced | ||
|
|
4f7aef3687 | ||
|
|
4bd52ad665 | ||
|
|
1ffe1c38f5 | ||
|
|
6d30483ff4 | ||
|
|
d52d041df9 | ||
|
|
3424072776 | ||
|
|
5b9ba95115 | ||
|
|
e1828cf4a1 | ||
|
|
87fff1e17f | ||
|
|
443d275f13 | ||
|
|
5eeef11f55 | ||
|
|
2ea6defee7 | ||
|
|
cc68350452 | ||
|
|
50024f8dba | ||
|
|
f90bedd977 | ||
|
|
b75f4174b5 | ||
|
|
ce1b9d3050 | ||
|
|
c6703120d9 | ||
|
|
ec5b17b716 | ||
|
|
334ad6c009 | ||
|
|
4773334ae3 | ||
|
|
76585a3be0 | ||
|
|
74c7ec1afd | ||
|
|
9dc8d2c580 | ||
|
|
6cb2ec7748 | ||
|
|
984f4e3db8 | ||
|
|
7f7f36bb82 | ||
|
|
4c0d28dd2d | ||
|
|
0655fd8534 | ||
|
|
859ae20178 | ||
|
|
75d5bd7de1 | ||
|
|
f8e6dd6a8b | ||
|
|
3f00077098 | ||
|
|
e0bf6e52c3 | ||
|
|
f10c28e7d3 | ||
|
|
9183e51af7 | ||
|
|
0a071c4c1a | ||
|
|
be53d81a9a | ||
|
|
4d4ebf6143 | ||
|
|
0b730f36e1 |
@@ -9,7 +9,7 @@ PluginLanguagePath = 'Extensions/NeoBoot/locale'
|
||||
def localeInit():
|
||||
lang = language.getLanguage()[:2]
|
||||
os.environ['LANGUAGE'] = lang
|
||||
print '[NeoBoot] set language to ', lang
|
||||
# print '[NeoBoot] set language to ', lang
|
||||
gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))
|
||||
|
||||
|
||||
|
||||
322
NeoBoot/bin/neoinitmips
Normal file
@@ -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
|
||||
|
||||
136
NeoBoot/bin/neoinitmipsvu
Normal file
@@ -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
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import sys, extract
|
||||
if len(sys.argv) < 13:
|
||||
if len(sys.argv) < 14:
|
||||
pass
|
||||
else:
|
||||
extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13])
|
||||
extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13] , sys.argv[14])
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import struct
|
||||
import shutil
|
||||
|
||||
# ver. gutosie
|
||||
import time, sys, os, struct, shutil
|
||||
|
||||
def LanguageUsed():
|
||||
language = ''
|
||||
@@ -71,7 +75,7 @@ mediahome = media + '/ImageBoot/'
|
||||
extensions_path = '/usr/lib/enigma2/python/Plugins/Extensions/'
|
||||
dev_null = ' > /dev/null 2>&1'
|
||||
|
||||
def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, BlackHole):
|
||||
def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, BlackHole):
|
||||
media_target = mediahome + target
|
||||
list_one = ['rm -r ' + media_target + dev_null, 'mkdir ' + media_target + dev_null, 'chmod -R 0777 ' + media_target]
|
||||
for command in list_one:
|
||||
@@ -90,6 +94,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
||||
os.system('mkdir -p %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins' % (media, target))
|
||||
os.system('mkdir -p %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions' % (media, target))
|
||||
|
||||
if os.path.exists('%s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' % (media, target)):
|
||||
os.system('rm -r %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' % (media, target))
|
||||
|
||||
list_two = ['mkdir -p ' + media_target + '/media' + dev_null,
|
||||
'rm ' + media_target + media + dev_null,
|
||||
@@ -158,7 +164,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
||||
os.system('mv ' + getNeoLocation() + 'ImagesUpload/' + getBoxHostName() + '/kernel.bin ' + media_target + '/boot/zImage.' + getBoxHostName() + '' + dev_null)
|
||||
os.system('echo "Copied kernel.bin STB-ARM DM920 4K."')
|
||||
|
||||
#arm Dreambox dm920
|
||||
#arm ax51
|
||||
elif getBoxHostName() == 'ax51':
|
||||
os.system('mv ' + getNeoLocation() + 'ImagesUpload/hd51/kernel.bin ' + media_target + '/boot/zImage.' + getBoxHostName() + '' + dev_null)
|
||||
os.system('echo "Copied kernel.bin STB-ARM AX 4K Box HD51 4K."')
|
||||
@@ -169,7 +175,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
||||
os.system('echo "Copied kernel.bin STB-ARM Ariva 4K Combo."')
|
||||
|
||||
#arm Zgemma h7
|
||||
elif getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7':
|
||||
elif getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' and getBoxHostName() != 'ax51':
|
||||
os.system('mv ' + getNeoLocation() + 'ImagesUpload/zgemma/' + getBoxHostName() + '/kernel.bin ' + media_target + '/boot/zImage.' + getBoxHostName() + '' + dev_null)
|
||||
os.system('echo "Copied kernel.bin STB-ARM Zgemma h7."')
|
||||
#arm gbquad4k
|
||||
@@ -237,6 +243,31 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
||||
rc = os.system(cmd)
|
||||
os.system('echo "Copied TV list..."')
|
||||
|
||||
if LanWlan == 'True':
|
||||
if os.path.exists('%s/ImageBoot/%s/etc/vtiversion.info' % (media, target)):
|
||||
os.system('echo "Not copied LAN-WLAN, not recommended for this image."')
|
||||
elif os.path.exists('/etc/vtiversion.info') and os.path.exists('%s/usr/lib/enigma2/python/Plugins/PLi' % (media, target)):
|
||||
os.system('echo "Not copied LAN-WLAN, not recommended for this image."')
|
||||
elif os.path.exists('/etc/bhversion') and os.path.exists('%s/usr/lib/enigma2/python/Plugins/PLi' % (media, target)):
|
||||
os.system('echo "Not copied LAN-WLAN, not recommended for this image."')
|
||||
else:
|
||||
if os.path.exists('/etc/wpa_supplicant.wlan0.conf'):
|
||||
cmd = 'cp -Rpf /etc/wpa_supplicant.wlan0.conf %s/ImageBoot/%s/etc/wpa_supplicant.wlan0.conf > /dev/null 2>&1' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
if os.path.exists('/etc/network/interfaces'):
|
||||
cmd = 'cp -r /etc/network/interfaces %s/ImageBoot/%s/etc/network/interfaces > /dev/null 2>&1' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
if os.path.exists('/etc/wpa_supplicant.conf'):
|
||||
cmd = 'cp -Rpf /etc/wpa_supplicant.conf %s/ImageBoot/%s/etc/wpa_supplicant.conf > /dev/null 2>&1' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
if os.path.exists('/etc/resolv.conf'):
|
||||
cmd = 'cp -Rpf /etc/resolv.conf %s/ImageBoot/%s/etc/resolv.conf > /dev/null 2>&1' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
if os.path.exists('/etc/wl.conf.wlan3'):
|
||||
cmd = 'cp -r /etc/wl.conf.wlan3 %s/ImageBoot/%s/etc/wl.conf.wlan3 > /dev/null 2>&1' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
os.system('echo "Copied LAN-WLAN..."')
|
||||
|
||||
if Sterowniki == 'True':
|
||||
if os.path.exists('%s/ImageBoot/%s/lib/modules' % (media, target)):
|
||||
cmd = 'rm -r %s/ImageBoot/%s/lib/modules' % (media, target)
|
||||
@@ -373,12 +404,19 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
||||
cmd = 'chmod 0755 %s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
|
||||
if not os.path.exists('%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)) and not os.path.exists('%s/ImageBoot/%s/etc/rc.local' % (media, target)) :
|
||||
cmd = 'ln -s %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %s/ImageBoot/%s/etc/init.d/S99neo.local' % (media,
|
||||
target,
|
||||
media,
|
||||
target)
|
||||
rc = os.system(cmd)
|
||||
if not os.path.exists('%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)) and not os.path.exists('%s/ImageBoot/%s/etc/rc.local' % (media, target)) :
|
||||
if os.path.exists('%s/ImageBoot/%s/etc/init.d' % (media, target)):
|
||||
# cmd = 'ln -s %sImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %sImageBoot/%s/etc/rcS.d/S99neo.local' % (media,
|
||||
# target,
|
||||
# media,
|
||||
# target)
|
||||
cmd = 'cp -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %sImageBoot/%s/etc/rcS.d/S99neo.local' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
cmd = 'chmod 0755 %s/ImageBoot/%s/etc/rcS.d/S99neo.local' % (media, target)
|
||||
rc = os.system(cmd)
|
||||
elif not os.path.exists('%s/ImageBoot/%s/etc/init.d' % (media, target)):
|
||||
os.system('echo "/etc/init.d not found."')
|
||||
os.system('echo "Copied file neo_userscript.sh"')
|
||||
|
||||
if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'):
|
||||
if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)):
|
||||
@@ -610,7 +648,9 @@ def RemoveUnpackDirs():
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/sf4008'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/sf4008')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmio4k'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4k')
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4k')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmio4kplus'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4kplus')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm900'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm900')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd51'):
|
||||
@@ -647,8 +687,12 @@ def RemoveUnpackDirs():
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/e2')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et1x000'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et1x000')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/protek4k'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/protek4k')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm920 '):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm920 ')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox'):
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/unforce_multibox ' + getNeoLocation() + 'ImagesUpload/multibox; rm -r ' + getNeoLocation() + 'ImagesUpload/multibox')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/octagon/sf8008'):
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/octagon; rm -r ' + getNeoLocation() + 'ImagesUpload/octagon')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd60'):
|
||||
@@ -666,7 +710,8 @@ def RemoveUnpackDirs():
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h10_READ.ME ' + getNeoLocation() + 'ImagesUpload/h10; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h10.txt ' + getNeoLocation() + 'ImagesUpload/h10')
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h10')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/uclan'):
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/uclan')
|
||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/usb_update.bin'):
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/uclan')
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/uclan')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/beyonwiz'):
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz')
|
||||
@@ -691,7 +736,17 @@ def RemoveUnpackDirs():
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/gigablue')
|
||||
rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/gigablue')
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/gigablue')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz'):
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz') :
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2') :
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2')
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et10000') :
|
||||
rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et10000')
|
||||
|
||||
|
||||
|
||||
def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
RemoveUnpackDirs()
|
||||
os.system('echo "Press green to hide Console or red to abort the installation\nInstallation started:"; date +%T;echo "Extracting the installation file..."')
|
||||
@@ -1004,6 +1059,8 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.chdir('ultimo4k')
|
||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/duo4k'):
|
||||
os.chdir('duo4k')
|
||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/duo4kse'):
|
||||
os.chdir('duo4kse')
|
||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/zero4k'):
|
||||
os.chdir('zero4k')
|
||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/uno4kse'):
|
||||
@@ -1114,6 +1171,23 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
rc = os.system(cmd)
|
||||
cmd = 'rm -rf ' + getNeoLocation() + 'ubi'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et10000/rootfs.bin'):
|
||||
os.chdir('et10000')
|
||||
os.system('mv -f rootfs.bin rootfs.bin')
|
||||
os.system('echo "Instalacja - ubi_reader w toku..."')
|
||||
print '[NeoBoot] Extracting UBIFS image and moving extracted image to our target'
|
||||
cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py'
|
||||
rc = os.system(cmd)
|
||||
cmd = 'python ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py rootfs.bin -o ' + getNeoLocation() + 'ubi'
|
||||
rc = os.system(cmd)
|
||||
os.chdir('/home/root')
|
||||
cmd = 'cp -r -p ' + getNeoLocation() + 'ubi/rootfs/* ' + getNeoLocation() + 'ImageBoot/' + target
|
||||
rc = os.system(cmd)
|
||||
cmd = 'chmod -R +x ' + getNeoLocation() + 'ImageBoot/' + target
|
||||
rc = os.system(cmd)
|
||||
cmd = 'rm -rf ' + getNeoLocation() + 'ubi'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/sf4008'):
|
||||
os.system('echo "Please wait. System installation Octagon SF4008."')
|
||||
@@ -1127,15 +1201,18 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.system('echo "Please wait. System installation EDISION osmio4k"')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/osmio4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/osmio4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmio4kplus'):
|
||||
os.system('echo "Please wait. System installation EDISION osmio4kplus"')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/osmio4kplus/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/osmio4kplus/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm900'):
|
||||
os.system('echo "Please wait. System installation Dreambox DM900."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/%s.tar.xz' % source):
|
||||
os.system('echo "Please wait. System installation spakowanego w plik tar.xz w toku..."')
|
||||
os.system('cp -r ' + getNeoLocation() + 'ImagesUpload/%s.tar.xz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz' % source)
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz; tar -jJxvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm920'):
|
||||
os.system('echo "Please wait. System installation Dreambox DM920."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm920; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/dm920/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2'):
|
||||
os.system('echo "Please wait. System installation AX 4K Box HD51 "')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
@@ -1176,10 +1253,18 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.system('echo "Please wait. System installation VuPlus Duo4k."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/vuplus/duo4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/vuplus/duo4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/duo4kse'):
|
||||
os.system('echo "Please wait. System installation VuPlus Duo4kse."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/vuplus/duo4kse/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/vuplus/duo4kse/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/revo4k'):
|
||||
os.system('echo "Please wait. System installation Revo4k."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/revo4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/update/revo4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/force3uhd'):
|
||||
os.system('echo "Please wait. System installation force3uhd."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/force3uhd/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/update/force3uhd/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/galaxy4k'):
|
||||
os.system('echo "Please wait. System installation Galaxy4k."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/galaxy4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/update/galaxy4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
@@ -1192,17 +1277,14 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.system('echo "Please wait. System installation Zgemma H9S ."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/zgemma/h9/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/zgemma/h9/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2'):
|
||||
os.system('echo "Please wait. System installation Zgemma h9combo ."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2'):
|
||||
os.system('echo "Please wait. System installation Zgemma h10 ."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k'):
|
||||
os.system('echo "Please wait. System installation Miraclebox mini4k."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
@@ -1235,10 +1317,6 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.system('echo "Please wait. System installation Ferguson Ariva 4K Combo w toku..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/e2/update; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/e2/update/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/e2/update'):
|
||||
os.system('echo "Please wait. System installation Ferguson Ariva 4K Combo w toku..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm920; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/dm920/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2'):
|
||||
os.system('echo "Please wait. System installation beyonwiz v2 4K w toku..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
@@ -1247,14 +1325,64 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole):
|
||||
os.system('echo "Please wait. System installation Amiko viper4k 4K w toku..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/amiko/viper4k; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/amiko/viper4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k'):
|
||||
os.system('echo "Please wait. System installation tmtwin4k."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k/rootfs.tar.bz2; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k'):
|
||||
os.system('echo "Please wait. System installation trio4k 4K Combo w toku..."')
|
||||
os.system('echo "Please wait. System installation trio4k 4K Combo..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k'):
|
||||
os.system('echo "Please wait. System installation gbip4k 4K w toku..."')
|
||||
os.system('echo "Please wait. System installation gbip4k 4K..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/protek4k'):
|
||||
os.system('echo "Please wait. System installation protek4k..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/protek4k; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/protek4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox'):
|
||||
os.system('echo "Please wait. System installation multibox..."')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/multibox; tar -jxvf ' + getNeoLocation() + 'ImagesUpload/multibox/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.xz'):
|
||||
os.system('echo "Please wait. System installation spakowanego w plik tar.xz w toku..."')
|
||||
os.system('cp -r ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.xz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz; tar -jJxvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.gz'):
|
||||
os.system('echo "Please wait. System installation spakowanego w plik tar.gz w toku..."')
|
||||
os.system('cp -r ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.gz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz; /bin/tar -xzvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.bz2'):
|
||||
os.system('echo "Please wait. System installation spakowanego w plik tar.bz2 w toku..."')
|
||||
os.system('cp -r ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.bz2 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2; /bin/tar -xzvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.mb'):
|
||||
os.system('echo "Please wait. System installation spakowanego w plik .mb w toku..."')
|
||||
os.system('cp -r ' + getNeoLocation() + 'ImagesUpload/' + source + '.mb ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz')
|
||||
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/*.tar.gz; tar -xzvf ' + getNeoLocation() + 'ImagesUpload/*.tar.gz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
|
||||
rc = os.system(cmd)
|
||||
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.bin'):
|
||||
os.chdir('ImagesUpload')
|
||||
os.system('mv -f rootfs.bin rootfs.bin')
|
||||
os.system('echo "Instalacja - ubi_reader w toku..."')
|
||||
print '[NeoBoot] Extracting UBIFS image and moving extracted image to our target'
|
||||
cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py'
|
||||
rc = os.system(cmd)
|
||||
cmd = 'python ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py rootfs.bin -o ' + getNeoLocation() + 'ubi'
|
||||
rc = os.system(cmd)
|
||||
os.chdir('/home/root')
|
||||
cmd = 'cp -r -p ' + getNeoLocation() + 'ubi/rootfs/* ' + getNeoLocation() + 'ImageBoot/' + target
|
||||
rc = os.system(cmd)
|
||||
cmd = 'chmod -R +x ' + getNeoLocation() + 'ImageBoot/' + target
|
||||
rc = os.system(cmd)
|
||||
cmd = 'rm -rf ' + getNeoLocation() + 'ubi'
|
||||
rc = os.system(cmd)
|
||||
|
||||
else:
|
||||
os.system('echo "NeoBoot wykrył dłąd!!! Prawdopodobnie brak pliku instalacyjnego."')
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ from Tools.Directories import fileExists, pathExists, fileCheck
|
||||
from Tools.CList import CList
|
||||
from Components.SystemInfo import SystemInfo
|
||||
from Components.Console import Console
|
||||
from Task import LoggingTask
|
||||
try:
|
||||
from Task import LoggingTask
|
||||
except:
|
||||
from Components.Task import LoggingTask
|
||||
import Task
|
||||
from Screens.Screen import Screen
|
||||
from Components.ActionMap import ActionMap
|
||||
@@ -973,7 +976,10 @@ class HarddiskSetup(Screen):
|
||||
def hddConfirmed(self, confirmed):
|
||||
if not confirmed:
|
||||
return
|
||||
from Components.Task import job_manager
|
||||
try:
|
||||
from Task import job_manager
|
||||
except:
|
||||
from Components.Task import job_manager
|
||||
try:
|
||||
job = self.action()
|
||||
job_manager.AddJob(job, onSuccess=job_manager.popupTaskView)
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
IMAGE=ImageBoot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
|
||||
if [ -f $NEOBOOTMOUNT/NeoBoot_Backup.tar.gz ] ; then
|
||||
rm -R $NEOBOOTMOUNT/NeoBoot_Backupt.tar.gz
|
||||
/bin/tar -czf $NEOBOOTMOUNT/NeoBoot_Backup.tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot*/
|
||||
echo " "
|
||||
echo "Kopia o nazwie NeoBoot_Backup.tar.gz zostala utworzona w lokalizacji:" $NEOBOOTMOUNT" . "
|
||||
echo " "
|
||||
else
|
||||
/bin/tar -czf $NEOBOOTMOUNT/NeoBoot_Backup.tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot*/
|
||||
echo " "
|
||||
echo "Kopia o nazwie NeoBoot_Backup.tar.gz zostala utworzona w lokalizacji:" $NEOBOOTMOUNT" . "
|
||||
echo " "
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -89,8 +89,14 @@ class ManagerDevice(Screen):
|
||||
self.onShown.append(self.setWindowTitle)
|
||||
|
||||
def Format_ext3(self):
|
||||
from Harddisk import HarddiskSelection
|
||||
self.session.openWithCallback(self.updateList, HarddiskSelection)
|
||||
try:
|
||||
if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion'):
|
||||
self.session.open(MessageBox, _("This option is available only from openpli or derivatives."), MessageBox.TYPE_INFO, timeout=10)
|
||||
else:
|
||||
from Harddisk import HarddiskSelection
|
||||
self.session.openWithCallback(self.updateList, HarddiskSelection)
|
||||
except:
|
||||
self.session.open(MessageBox, _("This option is available only from openpli or derivatives."), MessageBox.TYPE_INFO, timeout=10)
|
||||
|
||||
def Format_ext4(self):
|
||||
from Screens.HarddiskSetup import HarddiskSelection
|
||||
|
||||
16
NeoBoot/files/modulecheck.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#DESCRIPTION=This script by gutosie
|
||||
|
||||
opkg update
|
||||
opkg install --force-reinstall mtd-utils
|
||||
opkg install --force-reinstall mtd-utils-ubifs
|
||||
opkg install --force-reinstall mtd-utils-jffs2
|
||||
opkg install --force-reinstall kernel-module-nandsim
|
||||
opkg install --force-reinstall python-subprocess
|
||||
opkg install --force-reinstall python-argparse
|
||||
opkg install --force-reinstall curl
|
||||
opkg install --force-reinstall liblzo2-2
|
||||
opkg install --force-reinstall python-imaging
|
||||
opkg install --force-maintainer --force-reinstall --force-overwrite kernel-image
|
||||
opkg configure update-modules
|
||||
cd
|
||||
27
NeoBoot/files/neobackup.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#script by gutosie
|
||||
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
IMAGE=ImageBoot
|
||||
LOCATIONBACKUP=CopyNEOBoot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
TiME=$(date +"%Y%m%d_%H%M%S")
|
||||
UPDATEv=$(cat $NEOBOOTMOUNT/ImageBoot/.updateversion)
|
||||
NB=_NeoBoot_
|
||||
|
||||
if [ ! -e $NEOBOOTMOUNT$LOCATIONBACKUP ]; then
|
||||
mkdir $NEOBOOTMOUNT$LOCATIONBACKUP > /dev/null 2>&1
|
||||
/bin/tar -czf $NEOBOOTMOUNT/CopyNEOBoot/Copy_$UPDATEv$NB$TiME.tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot*/
|
||||
echo " "
|
||||
[ $PL ] && echo "Kopia wtyczki neoboot o nazwie Copy_$UPDATEv$NB$TiME.tar.gz utworzono w:" $NEOBOOTMOUNT$LOCATIONBACKUP" " || echo "Copy named Copy_$UPDATEv$NB$TiME.tar.gz was created at location:" $NEOBOOTMOUNT$LOCATIONBACKUP" "
|
||||
echo " "
|
||||
else
|
||||
/bin/tar -czf $NEOBOOTMOUNT/CopyNEOBoot/Copy_$UPDATEv$NB$TiME.tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot*/
|
||||
echo " "
|
||||
[ $PL ] && echo "Kopia wtyczki o nazwie Copy_$UPDATEv$NB$TiME.tar.gz utworzono w:" $NEOBOOTMOUNT$LOCATIONBACKUP" " || echo "Copy named Copy_$UPDATEv$NB$TiME.tar.gz was created at location:" $NEOBOOTMOUNT$LOCATIONBACKUP" "
|
||||
echo " "
|
||||
fi
|
||||
exit 0
|
||||
@@ -9,6 +9,17 @@ from Tools.Directories import fileExists, SCOPE_PLUGINS
|
||||
def fileCheck(f, mode = 'r'):
|
||||
return fileExists(f, mode) and f
|
||||
|
||||
#check imageATV
|
||||
def getImageATv():
|
||||
atvimage='UNKNOWN'
|
||||
if os.path.exists('/etc/issue.net'):
|
||||
with open('/etc/issue.net', 'r') as f:
|
||||
lines = f.read()
|
||||
f.close()
|
||||
if lines.find('openatv') != -1:
|
||||
atvimage='okfeedCAMatv'
|
||||
return atvimage
|
||||
|
||||
#check install
|
||||
def getNeoLocation():
|
||||
locatino='UNKNOWN'
|
||||
|
||||
@@ -22,7 +22,7 @@ from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE,
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
from enigma import eTimer
|
||||
from stbbranding import getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC
|
||||
from stbbranding import getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
@@ -55,8 +55,8 @@ def getKernelVersion():
|
||||
try:
|
||||
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
||||
except:
|
||||
return _('unknown')
|
||||
|
||||
return _('unknown')
|
||||
|
||||
def getCPUtype():
|
||||
cpu='UNKNOWN'
|
||||
if os.path.exists('/proc/cpuinfo'):
|
||||
@@ -95,14 +95,13 @@ class BoundFunction:
|
||||
self.fnc(*self.args)
|
||||
|
||||
|
||||
# <ePixmap position="587,631" zPosition="-2" size="545,340" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
|
||||
class MBTools(Screen):
|
||||
if isFHD():
|
||||
skin = """<screen name="MBTools" position="70,93" size="910,938" title="NeoBoot tools">
|
||||
<eLabel position="20,68" size="890,2" backgroundColor="blue" foregroundColor="blue" name="linia" />
|
||||
<eLabel position="20,935" size="890,2" backgroundColor="blue" foregroundColor="blue" name="linia" />
|
||||
<ePixmap position="25,-1" size="45,65" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/updown.png" alphatest="on" />
|
||||
<eLabel backgroundColor="background" font="Regular; 30" foregroundColor="#00ff2525" position="293,2" size="275,57" text="Menu list NEOBoot" />
|
||||
<eLabel backgroundColor="background" font="baslk; 30" foregroundColor="yellow" position="293,2" size="275,57" text="Menu list NEOBoot" />
|
||||
<widget source="list" render="Listbox" position="20,75" size="885,847" scrollbarMode="showOnDemand">
|
||||
<convert type="TemplatedMultiContent">\n \t\t{"template": [\n \t\t\tMultiContentEntryText(pos = (50, 1), size = (920, 56), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (6, 4), size = (66, 66), png = 1),\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 35)],\n \t\t\t"itemHeight": 60\n \t\t}\n \t\t</convert>
|
||||
</widget>
|
||||
@@ -190,11 +189,15 @@ class MBTools(Screen):
|
||||
self.list.append (res)
|
||||
self ['list']. list = self.list
|
||||
|
||||
res = (_ ('Supported sat tuners'), png, 16)
|
||||
res = (_ ('Add cams to feed for OpenATV '), png, 16)
|
||||
self.list.append (res)
|
||||
self ['list']. list = self.list
|
||||
|
||||
res = (_ ('NeoBoot Information'), png, 17)
|
||||
res = (_ ('Supported sat tuners'), png, 17)
|
||||
self.list.append (res)
|
||||
self ['list']. list = self.list
|
||||
|
||||
res = (_ ('NeoBoot Information'), png, 18)
|
||||
self.list.append (res)
|
||||
self ['list']. list = self.list
|
||||
|
||||
@@ -235,14 +238,16 @@ class MBTools(Screen):
|
||||
pass
|
||||
if self.sel == 15 and self.session.open(DeletingLanguages):
|
||||
pass
|
||||
if self.sel == 16 and self.session.open(TunerInfo):
|
||||
if self.sel == 16 and self.session.open(ATVcamfeed):
|
||||
pass
|
||||
if self.sel == 17 and self.session.open(MultiBootMyHelp):
|
||||
if self.sel == 17 and self.session.open(TunerInfo):
|
||||
pass
|
||||
if self.sel == 18 and self.session.open(MultiBootMyHelp):
|
||||
pass
|
||||
|
||||
class MBBackup(Screen):
|
||||
if isFHD():
|
||||
skin = """ <screen name="MBBackup" title="Backup image from NeoBoot" position="center,center" size="850,750">
|
||||
skin = """ <screen name="MBBackupFHD" title="Backup image from NeoBoot" position="center,center" size="850,750">
|
||||
<widget name="lab1" position="17,5" size="819, 62" font="baslk;35" halign="center" valign="center" transparent="1" foregroundColor="#99FFFF" />
|
||||
<widget name="lab2" position="17,75" size="819,68" font="baslk;35" halign="center" valign="center" transparent="1" foregroundColor="#99FFFF" />
|
||||
<widget name="lab3" position="17,150" size="819,85" font="baslk;35" halign="center" valign="center" transparent="1" foregroundColor="#99FFFF" />
|
||||
@@ -250,10 +255,18 @@ class MBBackup(Screen):
|
||||
<convert type="StringList" font="Regular;35" />
|
||||
</widget>
|
||||
<ePixmap position="270,705" size="34, 34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="325,705" zPosition="2" size="280,35" font="baslk;30" halign="left" valign="center" backgroundColor="#f23d21" transparent="1" foregroundColor="#f23d21" />
|
||||
<widget name="key_red" position="325,705" zPosition="2" size="520,35" font="baslk;30" halign="left" valign="center" backgroundColor="#f23d21" transparent="1" foregroundColor="#f23d21" />
|
||||
</screen>"""
|
||||
else:
|
||||
skin = ' <screen position="center,center" size="700,550" title="Backup the image from NeoBoot">\n\t\t\n <widget name="lab1" position="20,20" size="660,30" font="Regular;24" halign="center" valign="center" transparent="1"/>\n\n <widget name="lab2" position="20,50" size="660,30" font="Regular;24" halign="center" valign="center" transparent="1"/>\n\n <widget name="lab3" position="20,100" size="660,30" font="Regular;22" halign="center" valign="center" transparent="1"/>\n \n <widget source="list" render="Listbox" position="40,130" zPosition="1" size="620,360" scrollbarMode="showOnDemand" transparent="1" >\n\t\t\t\n <convert type="StringList" />\n</widget>\n<ePixmap position="280,500" size="140,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/redcor.png" alphatest="on" zPosition="1" />\n\n <widget name="key_red" position="280,500" zPosition="2" size="140,40" font="Regular;20" halign="left" valign="center" backgroundColor="red" transparent="1" />\n\n </screen>'
|
||||
skin = """ <screen name="MBBackupHD" position="center,center" size="700,550" title="Backup the image from NeoBoot">
|
||||
<widget name="lab1" position="20,20" size="660,30" font="Regular;24" halign="center" valign="center" transparent="1" />
|
||||
<widget name="lab2" position="20,50" size="660,30" font="Regular;24" halign="center" valign="center" transparent="1" />
|
||||
<widget name="lab3" position="20,100" size="660,30" font="Regular;22" halign="center" valign="center" transparent="1" />
|
||||
<widget source="list" render="Listbox" position="40,141" zPosition="1" size="620,349" scrollbarMode="showOnDemand" transparent="1">\
|
||||
<convert type="StringList" />
|
||||
</widget>\n<ePixmap position="272,498" size="140,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/redcor.png" alphatest="on" zPosition="1" />
|
||||
<widget name="key_red" position="270,500" zPosition="2" size="390,40" font="Regular;20" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
@@ -375,15 +388,15 @@ class MBBackup(Screen):
|
||||
|
||||
class MBRestore(Screen):
|
||||
__module__ = __name__
|
||||
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,750">
|
||||
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,626">
|
||||
<widget name="lab1" position="20,15" size="820,50" font="baslk;30" halign="center" valign="center" transparent="1" foregroundColor="#00ffa500" />
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,85" zPosition="1" size="815,600" scrollbarMode="showOnDemand" transparent="1">
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,80" zPosition="1" size="815,464" scrollbarMode="showOnDemand" transparent="1">
|
||||
<convert type="StringList" font="Regular;35" />
|
||||
</widget>
|
||||
<ePixmap position="40,695" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<ePixmap position="530,695" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/green.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="85,695" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<widget name="key_green" position="575,695" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="green" transparent="1" />
|
||||
<ePixmap position="40,570" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<ePixmap position="525,570" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/green.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="83,570" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<widget name="key_green" position="579,570" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="green" transparent="1" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
@@ -703,15 +716,15 @@ class ReinstllNeoBoot(Screen):
|
||||
|
||||
class ReinstllNeoBoot2(Screen):
|
||||
__module__ = __name__
|
||||
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,750">
|
||||
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,654">
|
||||
<widget name="lab1" position="20,15" size="820,50" font="baslk;30" halign="center" valign="center" transparent="1" foregroundColor="#00ffa500" />
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,85" zPosition="1" size="815,600" scrollbarMode="showOnDemand" transparent="1">
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,94" zPosition="1" size="815,494" scrollbarMode="showOnDemand" transparent="1">
|
||||
<convert type="StringList" font="Regular;35" />
|
||||
</widget>
|
||||
<ePixmap position="40,695" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<ePixmap position="530,695" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/green.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="85,695" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<widget name="key_green" position="575,695" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="green" transparent="1" />
|
||||
<ePixmap position="40,600" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<ePixmap position="527,600" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/green.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="85,600" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<widget name="key_green" position="575,600" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="green" transparent="1" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
@@ -1152,6 +1165,8 @@ class SkinChange(Screen):
|
||||
system('cp -r ' + LinkNeoBoot + '/images/solo4k.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'vuduo4k':
|
||||
system('cp -r ' + LinkNeoBoot + '/images/duo4k.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'vuduo4kse':
|
||||
system('cp -r ' + LinkNeoBoot + '/images/duo4k.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'vuuno4k':
|
||||
system('cp -r ' + LinkNeoBoot + '/images/uno4k.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'vuuno4kse':
|
||||
@@ -1160,7 +1175,11 @@ class SkinChange(Screen):
|
||||
system('cp -r ' + LinkNeoBoot + '/images/zero4kse.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'sf4008':
|
||||
system('cp -r ' + LinkNeoBoot + '/images/sf4008.png ' + LinkNeoBoot + '/images/box.png')
|
||||
|
||||
elif getBoxHostName() == 'ustym4kpro':
|
||||
system('cp -r ' + LinkNeoBoot + '/images/ustym4kpro.png ' + LinkNeoBoot + '/images/box.png')
|
||||
elif getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7' :
|
||||
system('cp -r ' + LinkNeoBoot + '/images/zgmmah7.png ' + LinkNeoBoot + '/images/box.png')
|
||||
|
||||
cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBot is working, skin change is progress...')
|
||||
cmd1 = 'rm -f ' +LinkNeoBoot+ '/usedskin.p*; sleep 2'
|
||||
cmd2 = 'sleep 2; cp -r ' + self.skindir + '/' + self.selectedskin + '/*.py ' +LinkNeoBoot+ '/usedskin.py'
|
||||
@@ -1179,16 +1198,7 @@ class SkinChange(Screen):
|
||||
# localfile2 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/usedskin.py'
|
||||
# temp_file2 = open(localfile2, 'w')
|
||||
# temp_file2.write(content.replace('selektor.png', 'slekvti.png'))
|
||||
# temp_file2.close()
|
||||
fail = '/usr/share/enigma2/CobaltFHD/skin.xml'
|
||||
f = open(fail, 'r')
|
||||
content = f.read()
|
||||
f.close()
|
||||
localfile2 = '/usr/share/enigma2/CobaltFHD/skin.xml'
|
||||
temp_file2 = open(localfile2, 'w')
|
||||
temp_file2.write(content.replace('NeoBootImageChoose', '#NeoBootImageChoose'))
|
||||
temp_file2.close()
|
||||
|
||||
# temp_file2.close()
|
||||
self.restareE2()
|
||||
else:
|
||||
self.restareE2()
|
||||
@@ -1206,13 +1216,13 @@ class SkinChange(Screen):
|
||||
|
||||
class BlocUnblockImageSkin(Screen):
|
||||
__module__ = __name__
|
||||
skin = """<screen name="Skin tool" title="Skin tool" position="529,158" size="856,779">
|
||||
skin = """<screen name="Skin tool" title="Skin tool" position="center,center" size="856,657">
|
||||
<widget name="lab1" position="20,5" size="820,130" font="baslk;30" halign="center" valign="center" transparent="1" foregroundColor="#00ffa500" />
|
||||
<widget source="list" render="Listbox" itemHeight="43" font="Regular;21" position="25,155" zPosition="1" size="815,484" scrollbarMode="showOnDemand" transparent="1">
|
||||
<widget source="list" render="Listbox" itemHeight="43" font="Regular;21" position="25,155" zPosition="1" size="815,430" scrollbarMode="showOnDemand" transparent="1">
|
||||
<convert type="StringList" font="Regular;43" />
|
||||
</widget>
|
||||
<ePixmap position="180,714" size="37,38" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="228,716" zPosition="2" size="611,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<ePixmap position="172,609" size="37,38" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="224,611" zPosition="2" size="611,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
@@ -1237,6 +1247,14 @@ class BlocUnblockImageSkin(Screen):
|
||||
self['list'].list = imageslist
|
||||
|
||||
def deleteback(self):
|
||||
image = self['list'].getCurrent()
|
||||
self.delimage = image.strip()
|
||||
if fileExists(self.backupdir + '/' + self.delimage + '/skin.xml'):
|
||||
self.deleteback2()
|
||||
else:
|
||||
self.myClose(_('Sorry, not find skin neoboot.'))
|
||||
|
||||
def deleteback2(self):
|
||||
image = self['list'].getCurrent()
|
||||
if image:
|
||||
self.delimage = image.strip()
|
||||
@@ -1275,17 +1293,9 @@ class BlocUnblockImageSkin(Screen):
|
||||
else:
|
||||
self.close()
|
||||
|
||||
|
||||
|
||||
# else:
|
||||
# self.myClose(_('Sorry, There is no skin for a neoboot'))
|
||||
|
||||
# def myClose(self, message):
|
||||
# self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
# self.close()
|
||||
|
||||
|
||||
|
||||
def myClose(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
|
||||
|
||||
class InternalFlash(Screen):
|
||||
@@ -1325,7 +1335,7 @@ class InternalFlash(Screen):
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7':
|
||||
if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7' :
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p3 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
@@ -1358,12 +1368,18 @@ class InternalFlash(Screen):
|
||||
if getBoxVuModel() == 'duo4k':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
||||
|
||||
if getBoxVuModel() == 'duo4kse':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
||||
|
||||
if getCPUSoC() == 'bcm7252s' or getBoxHostName() == 'gbquad4k':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p5 /media/InternalFlash')
|
||||
|
||||
#if getBoxHostName == 'osmio4k':
|
||||
#os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p5 /media/InternalFlash')
|
||||
|
||||
else:
|
||||
self.myClose(_('Your image flash cannot be mounted.'))
|
||||
|
||||
if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
|
||||
os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
|
||||
|
||||
@@ -1377,13 +1393,13 @@ class InternalFlash(Screen):
|
||||
|
||||
class DeletingLanguages(Screen):
|
||||
__module__ = __name__
|
||||
skin = """ <screen name="ReinstllNeoBoot2" title="Deleting Languages" position="center,center" size="850,750">
|
||||
<widget name="lab1" position="20,15" size="820,50" font="baslk;30" halign="center" valign="center" transparent="1" foregroundColor="#00ffa500" />
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,85" zPosition="1" size="815,600" scrollbarMode="showOnDemand" transparent="1">
|
||||
skin = """ <screen name="DeletingLanguages" title="Deleting Languages" position="center,center" size="850,647">
|
||||
<widget name="lab1" position="20,73" size="820,50" font="baslk;30" halign="center" valign="center" transparent="1" foregroundColor="#00ffa500" />
|
||||
<widget source="list" render="Listbox" itemHeight="40" font="Regular;21" position="25,142" zPosition="1" size="815,416" scrollbarMode="showOnDemand" transparent="1">
|
||||
<convert type="StringList" font="Regular;35" />
|
||||
</widget>
|
||||
<ePixmap position="40,695" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="85,695" zPosition="2" size="250,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
<ePixmap position="107,588" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="153,588" zPosition="2" size="368,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
@@ -1426,6 +1442,35 @@ class DeletingLanguages(Screen):
|
||||
self.close()
|
||||
|
||||
|
||||
class ATVcamfeed(Screen):
|
||||
__module__ = __name__
|
||||
skin = """<screen name="ATV add cam feed" title="Password change" position="center,center" size="700,300" flags="wfNoBorder">
|
||||
<widget name="lab1" position="20,20" size="660,210" font="baslk;25" halign="center" valign="center" transparent="1" />
|
||||
<ePixmap position="200,250" size="34,34" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/red.png" alphatest="blend" zPosition="1" />
|
||||
<widget name="key_red" position="250,250" zPosition="2" size="280,35" font="baslk;30" halign="left" valign="center" backgroundColor="red" transparent="1" foregroundColor="red" />
|
||||
</screen>"""
|
||||
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self['lab1'] = Label(_('Add Cam dowloand from feed.'))
|
||||
self['key_red'] = Label(_('Start'))
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close,
|
||||
'red': self.addcamatv})
|
||||
|
||||
def addcamatv(self):
|
||||
if getImageATv() == 'okfeedCAMatv':
|
||||
cmd = "echo -e '\n\n%s '" % _('NeoBoot - ATV add cam feed ...')
|
||||
cmd1 = 'wget -O - -q http://updates.mynonpublic.com/oea/feed | bash'
|
||||
self.session.open(Console, _('NeoBoot: Cams feed add...'), [cmd, cmd1])
|
||||
|
||||
elif getImageATv() != 'okfeedCAMatv':
|
||||
self.myClose(_('Sorry, is not image Open ATV !!!'))
|
||||
|
||||
def myClose(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
|
||||
|
||||
class TunerInfo(Screen):
|
||||
__module__ = __name__
|
||||
skin = """<screen name="TunerInfo" title="NeoBoot - Sat Tuners " position="center,center" size="700,300" flags="wfNoBorder">
|
||||
@@ -1489,8 +1534,6 @@ class MultiBootMyHelp(Screen):
|
||||
self['lab1'].setText(message)
|
||||
|
||||
|
||||
|
||||
|
||||
###______\\\\\\----for plugin----////_____###
|
||||
|
||||
class MyHelpNeo(Screen):
|
||||
|
||||
65
NeoBoot/files/userscript.sh
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
# script gutosie
|
||||
# here you can add your own command to perform
|
||||
# line - Checking internet connection by @j00zek thank you
|
||||
|
||||
IMAGEKATALOG=ImageBoot
|
||||
|
||||
if [ -e /.control_boot_new_image ] ; then
|
||||
passwd -d root
|
||||
fi
|
||||
|
||||
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ] ; then
|
||||
mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
||||
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh
|
||||
echo "_(_________Start mountpoint location NEOBOOT_________)"
|
||||
fi
|
||||
|
||||
echo "_(Checking internet connection)..."
|
||||
ping -c 1 github.com 1>/dev/null 2>%1
|
||||
if [ $? -gt 0 ]; then
|
||||
echo -n "_(github server unavailable, update impossible)\n!!! network restart...!!! )"
|
||||
/etc/init.d/networking stop;
|
||||
echo "_____(stopping network connection)_____"
|
||||
sleep 1;
|
||||
/etc/init.d/networking start;
|
||||
echo "_____(start network connection)_____"
|
||||
sleep 5
|
||||
|
||||
if [ $? -gt 0 ]; then
|
||||
if [ -e /usr/bin/curl ]; then
|
||||
cd /tmp; curl -O --ftp-ssl https://raw.githubusercontent.com/gutosie/NeoBoot8/master/ver.txt;
|
||||
cd /
|
||||
elif [ -e /usr/bin/wget ]; then
|
||||
wget https://raw.githubusercontent.com/gutosie/NeoBoot8/master/ver.txt -O /tmp/ver.txt
|
||||
cd /
|
||||
|
||||
fi
|
||||
if [ ! -f /tmp/ver.txt ] ; then
|
||||
/etc/init.d/networking stop;
|
||||
echo "_____(stopping network connection)_____"
|
||||
sleep 2;
|
||||
/etc/init.d/networking start;
|
||||
echo "_____(start network connection)_____"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# echo " dns-nameservers 1.1.1.1 " >> /etc/network/interfaces
|
||||
else
|
||||
echo "_____!!!(github server available)!!!_____"
|
||||
fi
|
||||
|
||||
if [ -e /%1 ] ; then
|
||||
rm -f /%1
|
||||
fi
|
||||
if [ -e /home/root/%1 ] ; then
|
||||
rm -f /home/root/%1
|
||||
fi
|
||||
|
||||
echo "!!!_____([NEOBOOT] used userscript)_____!!! "
|
||||
echo ok
|
||||
|
||||
exit 0
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1001 B |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 946 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 331 B |
BIN
NeoBoot/locale/en/LC_MESSAGES/NeoBoot.mo
Normal file
1362
NeoBoot/locale/en/LC_MESSAGES/NeoBoot.po
Normal file
BIN
NeoBoot/locale/it/LC_MESSAGES/NeoBoot.mo
Normal file
1354
NeoBoot/locale/it/LC_MESSAGES/NeoBoot.po
Normal file
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: NeoBoot\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2020-05-11 13:57+0300\n"
|
||||
"PO-Revision-Date: 2020-05-16 10:53+0300\n"
|
||||
"Last-Translator: gutosie <Krzysio Gutosie>\n"
|
||||
"Language-Team: gutosie- GaduGadu nr. 5111900 <http://all-forum.cba.pl >\n"
|
||||
"Language: pl\n"
|
||||
@@ -2389,6 +2389,9 @@ msgstr "NeoBoot: lista wspieranych modeli STB."
|
||||
msgid "Run"
|
||||
msgstr "Uruchom"
|
||||
|
||||
msgid "Your image flash cannot be mounted."
|
||||
msgstr "Twoje oprogramowanie nie może być zamontowane."
|
||||
|
||||
msgid "Sorry you can delete only from the image Flash."
|
||||
msgstr "Przepraszamy, możesz usunąć tylko z poziomu wewnętrznego oprogramowania Flash."
|
||||
|
||||
@@ -2487,3 +2490,13 @@ msgid ""
|
||||
msgstr ""
|
||||
"Udanaj zabawy! q(-_-)p :) gutosie \n"
|
||||
"\n"
|
||||
|
||||
msgid "This option is available only from openpli or derivatives."
|
||||
msgstr "Ta opcja dostępna tylko z poziomu openpli lub pochodnych."
|
||||
|
||||
msgid ""
|
||||
"Do you really want to initialize the device?\n"
|
||||
"All data on the disk will be lost!"
|
||||
msgstr ""
|
||||
"Czy naprawdę chcesz zainicjować urządzenie?\n"
|
||||
"Wszystkie dane na dysku zostaną utracone!"
|
||||
|
||||
BIN
NeoBoot/neo.png
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,127 +0,0 @@
|
||||
#!/bin/sh
|
||||
#script mod by gutosie
|
||||
#neo init arm
|
||||
|
||||
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
||||
IMAGEKATALOG=ImageBoot
|
||||
|
||||
|
||||
if [ -f /tmp/.init_reboot ]; then
|
||||
rm /tmp/.init_reboot
|
||||
break;
|
||||
else
|
||||
if [ -f `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
|
||||
|
||||
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
|
||||
|
||||
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
|
||||
/etc/init.d/mdev > /dev/null 2>&1
|
||||
|
||||
sleep 5
|
||||
|
||||
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neom; sleep 2
|
||||
fi
|
||||
|
||||
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
|
||||
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
|
||||
/bin/umount /media/usb > /dev/null 2>&1
|
||||
/bin/umount /media/hdd > /dev/null 2>&1
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init > /dev/null 2>&1
|
||||
else
|
||||
|
||||
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ]; then
|
||||
echo "No Error - Booting image normal..."
|
||||
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... ";
|
||||
rm -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image > /dev/null 2>&1
|
||||
else
|
||||
HOSTNAME=`cat /etc/hostname`
|
||||
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. 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 sleep 5; reboot -f
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
cp -f /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
|
||||
chmod 755 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
|
||||
|
||||
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init.sysvinit ]; then
|
||||
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
|
||||
/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
|
||||
|
||||
if [ -f /sbin/init.sysvinit ]; then
|
||||
exec /sbin/init.sysvinit $1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
exit
|
||||
@@ -50,8 +50,8 @@ if fileExists('/etc/vtiversion.info') and fileExists('/.multinfo'):
|
||||
else:
|
||||
from files.neoconsole import Console
|
||||
|
||||
PLUGINVERSION = '9.00'
|
||||
UPDATEVERSION = '9.00'
|
||||
PLUGINVERSION = '9.03'
|
||||
UPDATEVERSION = '9.08'
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
try:
|
||||
@@ -65,6 +65,17 @@ try:
|
||||
except:
|
||||
print 'ERROR INSERTING FONT'
|
||||
|
||||
def neoTranslator():
|
||||
neolang = ''
|
||||
usedlang = open('/etc/enigma2/settings', 'r')
|
||||
lang = 'config.osd.language=pl_PL'
|
||||
local = usedlang.read().find(lang)
|
||||
if local != -1:
|
||||
neolang = 'islangPL'
|
||||
else:
|
||||
neolang = 'isnotlangPL'
|
||||
return neolang
|
||||
|
||||
def getDS():
|
||||
s = getDesktop(0).size()
|
||||
return (s.width(), s.height())
|
||||
@@ -528,11 +539,10 @@ class NeoBootInstallation(Screen):
|
||||
os.system('opkg install mtd-utils')
|
||||
if os.system('opkg list-installed | grep mtd-utils-ubifs') != 0:
|
||||
os.system('opkg install mtd-utils-ubifs')
|
||||
|
||||
|
||||
# ARM - OctagonSF4008 - DM900 - Zgemma h7S - Octagon sf 8008 - AX HD60 4K #gbquad4k arm , #osmio4k arm, #Zgemma h9 arm, #Zgemma h7S arm , #Octagon SF4008
|
||||
if getBoxHostName() == 'ax51' or getBoxHostName() == 'dm920' or getBoxHostName() == 'et1x000' or getCPUSoC() == 'bcm7251' or getBoxHostName() == 'sf4008' or getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getCPUSoC() == 'bcm7252s' or getBoxHostName() == 'gbquad4k' or getBoxHostName == 'osmio4k' or getBoxHostName() == 'zgemmah9s' or getBoxHostName() == 'h9combo' or getBoxHostName() == 'h10' or getBoxHostName() == 'ax60' or getBoxHostName() == 'sf8008' or getCPUSoC() == 'bcm7251' or getCPUSoC() == 'BCM97252SSFF' or getBoxHostName() == 'dm900':
|
||||
os.system('cp -f ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init; mv ' + LinkNeoBoot + '/tmpfiles/runpy/arm_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
|
||||
if getBoxHostName() == 'ustym4kpro' or getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7' or getBoxHostName() == 'ax51' or getBoxHostName() == 'tmtwin4k' or getBoxHostName() == 'anadol4k' or getBoxHostName() == 'protek4k' or getBoxHostName() == 'maxytecmulti' or getBoxHostName() == 'force3uhd' or getBoxHostName() == 'viper4k' or getBoxHostName() == 'dm920' or getBoxHostName() == 'et1x000' or getCPUSoC() == 'bcm7251' or getBoxHostName() == 'sf4008' or getCPUSoC() == 'bcm7252s' or getBoxHostName() == 'gbquad4k' or getBoxHostName == 'osmio4k' or getBoxHostName == 'osmio4kplus' or getBoxHostName() == 'zgemmah9s' or getBoxHostName() == 'h9combo' or getBoxHostName() == 'h10' or getBoxHostName() == 'ax60' or getBoxHostName() == 'sf8008' or getCPUSoC() == 'bcm7251' or getCPUSoC() == 'BCM97252SSFF' or getBoxHostName() == 'dm900' and getBoxHostName() != 'vuultimo4k' and getBoxHostName() != 'vuuno4k' and getBoxHostName() != 'vusolo4k' and getBoxHostName() != 'vuuno4kse' and getBoxHostName() != 'vuultimo4k' and getBoxHostName() != 'vuduo4k' and getBoxHostName() != 'duo4kse' and getBoxHostName() != 'vuzero4k':
|
||||
os.system('cp -f ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init; mv ' + LinkNeoBoot + '/tmpfiles/runpy/arm_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
#VUPLUS ARM
|
||||
elif getCPUtype() == 'ARMv7' and getBoxHostName() != 'ustym4kpro':
|
||||
if getCPUSoC() == '7278' or getBoxHostName() == 'vuduo4k':
|
||||
@@ -542,6 +552,15 @@ class NeoBootInstallation(Screen):
|
||||
os.system('dd if=/dev/mmcblk0p6 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()))
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Kmmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd')
|
||||
|
||||
elif getCPUtype() == 'ARMv7' and getBoxHostName() != 'ustym4kpro' and getBoxHostName() != 'vuultimo4k':
|
||||
if getCPUSoC() == '7444s' or getBoxHostName() == 'vuduo4kse':
|
||||
os.system('cd ' + LinkNeoBoot + '/' )
|
||||
os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k /sbin/neoinitarmvu; mv ' + LinkNeoBoot + '/tmpfiles/runpy/duo4kse_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu')
|
||||
os.system('dd if=/dev/mmcblk0p6 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()))
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Ksemmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd')
|
||||
|
||||
|
||||
elif getCPUSoC() == '72604' or getBoxHostName() == 'vuzero4k':
|
||||
os.system('cd ' + LinkNeoBoot + '/' )
|
||||
os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvu /sbin/neoinitarmvu; cd')
|
||||
@@ -549,18 +568,10 @@ class NeoBootInstallation(Screen):
|
||||
os.system('dd if=/dev/mmcblk0p4 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()))
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuZero4Kmmcblk0p4.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/zero4k_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
|
||||
#Zgemma h7S arm
|
||||
elif getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7':
|
||||
os.system('cd ' + LinkNeoBoot + '/' )
|
||||
os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cd')
|
||||
os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarm')
|
||||
os.system('python ' + LinkNeoBoot + '/tmpfiles/runpy/findkerneldevice.py; dd if=/dev/kernel of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()) )
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/h7s_kernel.sh ' + LinkNeoBoot + '/files/kernel.sh;mv ' + LinkNeoBoot + '/tmpfiles/runpy/h7s_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
|
||||
elif getCPUSoC() or getBoxHostName() == ['7444s',
|
||||
elif getBoxHostName() != 'vuduo4kse' and getCPUSoC() or getBoxHostName() == ['7444s',
|
||||
'7252s',
|
||||
'7376',
|
||||
'vuultimo4k',
|
||||
'vuultimo4k',
|
||||
'vuuno4k',
|
||||
'vusolo4k',
|
||||
'vuuno4kse'] :
|
||||
@@ -569,21 +580,32 @@ class NeoBootInstallation(Screen):
|
||||
os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu')
|
||||
os.system('dd if=/dev/mmcblk0p1 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()) )
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vu_mmcblk0p1.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu4k_run.py ' + LinkNeoBoot + '/run.py; cd')
|
||||
|
||||
# ARM - ustym4kpro
|
||||
# ARM - ustym4kpro
|
||||
elif getBoxHostName() == 'ustym4kpro':
|
||||
os.system('opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade kernel-image;cp -f /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; dd if=/dev/kernel of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()) )
|
||||
if fileExists('/tmp/findkerneldevice.py'):
|
||||
os.sytem('cp -fr /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; ')
|
||||
else:
|
||||
os.sytem('mv ' + LinkNeoBoot + '/tmpfiles/runpy/findustym.py ' + LinkNeoBoot + '/files/findkerneldevice.py')
|
||||
os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm')
|
||||
os.system('chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init')
|
||||
os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cd')
|
||||
os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/ustym4kpro.sh ' + LinkNeoBoot + '/files/kernel.sh; mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/tmpfiles/runpy/target/ustym4kpro.py /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/run.py; cd')
|
||||
|
||||
#Zgemma h7S arm - no testet
|
||||
# elif getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7':
|
||||
# os.system('opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade kernel-image;cp -f /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; dd if=/dev/kernel of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()) )
|
||||
# if fileExists('/tmp/findkerneldevice.py'):
|
||||
# os.sytem('cp -fr /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; ')
|
||||
# else:
|
||||
# os.sytem('mv ' + LinkNeoBoot + '/tmpfiles/runpy/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py')
|
||||
# os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm')
|
||||
# os.system('chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init')
|
||||
# os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cd')
|
||||
# os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/h7s_kernel.sh ' + LinkNeoBoot + '/files/kernel.sh; mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/tmpfiles/runpy/target/h7s_run.py /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/run.py; cd')
|
||||
|
||||
|
||||
# ARM - ustym4kpro
|
||||
# elif getBoxHostName() == 'ustym4kpro' and getCPUSoC() == '3798mv200':
|
||||
# os.system('opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade kernel-image;cp -f /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; dd if=/dev/kernel of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName()) )
|
||||
# if fileExists('/tmp/findkerneldevice.py'):
|
||||
# os.sytem('cp -fr /tmp/findkerneldevice.py ' + LinkNeoBoot + '/files/findkerneldevice.py; ')
|
||||
# else:
|
||||
# os.sytem('mv ' + LinkNeoBoot + '/tmpfiles/runpy/findustym.py ' + LinkNeoBoot + '/files/findkerneldevice.py')
|
||||
# os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm')
|
||||
# os.system('chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init')
|
||||
# os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cd')
|
||||
# os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/ustym4kpro.sh ' + LinkNeoBoot + '/files/kernel.sh; mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/tmpfiles/runpy/target/ustym4kpro.py /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/run.py; cd')
|
||||
|
||||
# MIPS
|
||||
elif getCPUtype() == 'MIPS':
|
||||
if getCPUSoC() or getBoxHostName() or getTunerModel() == ['7335',
|
||||
@@ -789,10 +811,11 @@ class NeoBootImageChoose(Screen):
|
||||
|
||||
if not fileExists('/.control_ok'):
|
||||
if fileExists('/.control_boot_new_image'):
|
||||
os.system('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh; rm -f /.control_boot_new_image; echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok ')
|
||||
os.system('rm -f /.control_boot_new_image; echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok ')
|
||||
if not fileExists('/.control_boot_new_image'):
|
||||
os.system('echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok')
|
||||
|
||||
|
||||
|
||||
self.list = []
|
||||
self.setTitle(' NeoBoot %s - Menu' % PLUGINVERSION + ' ' + 'Ver. update: %s' % UPDATEVERSION)
|
||||
self['device_icon'] = Pixmap()
|
||||
@@ -954,40 +977,52 @@ class NeoBootImageChoose(Screen):
|
||||
os.system('cd ' + LinkNeoBoot + ';curl -O --ftp-ssl https://raw.githubusercontent.com/gutosie/NeoBoot-9/master/ver.txt;sleep 3;cd /')
|
||||
if not fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
os.system('cd ' + LinkNeoBoot + ';fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/NeoBoot-9/master/ver.txt; sleep 3;cd /')
|
||||
if not fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 8)
|
||||
if fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
mypath = ''
|
||||
version = open('' + LinkNeoBoot + '/ver.txt', 'r')
|
||||
mypath = float(version.read().strip())
|
||||
version.close()
|
||||
if float(UPDATEVERSION) != mypath:
|
||||
message = _('NeoBoot has detected update.\nDo you want to update NeoBoota now ?')
|
||||
ybox = self.session.openWithCallback(self.aktualizacjamboot, MessageBox, message, MessageBox.TYPE_YESNO)
|
||||
ybox.setTitle(_('Updating ... '))
|
||||
elif fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
os.system('rm ' + LinkNeoBoot + '/ver.txt')
|
||||
if fileExists('' + LinkNeoBoot + '/wget-log'):
|
||||
os.system('rm ' + LinkNeoBoot + '/wget-log')
|
||||
self.session.open(MessageBox, _('Updated unnecessary, you have the latest version. Please try again later.'), MessageBox.TYPE_INFO)
|
||||
else:
|
||||
self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10)
|
||||
else:
|
||||
mypath = ''
|
||||
version = open('' + LinkNeoBoot + '/ver.txt', 'r')
|
||||
mypath = float(version.read().strip())
|
||||
version.close()
|
||||
if float(UPDATEVERSION) != mypath:
|
||||
message = _('NeoBoot has detected update.\nDo you want to update NeoBoota now ?')
|
||||
ybox = self.session.openWithCallback(self.aktualizacjamboot, MessageBox, message, MessageBox.TYPE_YESNO)
|
||||
ybox.setTitle(_('Updating ... '))
|
||||
elif fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
os.system('rm ' + LinkNeoBoot + '/ver.txt')
|
||||
self.session.open(MessageBox, _('Updated unnecessary, you have the latest version. Please try again later.'), MessageBox.TYPE_INFO)
|
||||
if not fileExists('' + LinkNeoBoot + '/ver.txt'):
|
||||
self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10)
|
||||
|
||||
def aktualizacjamboot(self, yesno):
|
||||
if yesno:
|
||||
if fileExists('/tmp/*.zip'):
|
||||
os.system('rm /tmp/*.zip')
|
||||
os.system('cd /tmp; curl -O --ftp-ssl https://codeload.github.com/gutosie/NeoBoot-9/zip/master; mv /tmp/master /tmp/neoboot.zip; cd /')
|
||||
os.system('sync; cd /tmp; curl -O --ftp-ssl https://codeload.github.com/gutosie/NeoBoot-9/zip/master; mv /tmp/master /tmp/neoboot.zip; cd /')
|
||||
if not fileExists('/tmp/neoboot.zip'):
|
||||
os.system('cd /tmp;fullwget --no-check-certificate https://codeload.github.com/gutosie/NeoBoot-9/zip/master; mv /tmp/master /tmp/neoboot.zip; sleep 3;cd ')
|
||||
if not fileExists('/tmp/neoboot.zip'):
|
||||
self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 8)
|
||||
else:
|
||||
else:
|
||||
self.goUpdateNEO()
|
||||
else:
|
||||
self.goUpdateNEO()
|
||||
else:
|
||||
os.system('rm -f ' + LinkNeoBoot + '/ver.txt')
|
||||
self.session.open(MessageBox, _('The update has been canceled.'), MessageBox.TYPE_INFO, 8)
|
||||
|
||||
def goUpdateNEO(self):
|
||||
if fileExists('' + LinkNeoBoot + '/wget-log'):
|
||||
os.system('rm ' + LinkNeoBoot + '/wget-log')
|
||||
os.system('cd /tmp/; unzip -qn ./neoboot.zip; rm -f ./neoboot.zip; cp -rf ./NeoBoot-9-master/NeoBoot /usr/lib/enigma2/python/Plugins/Extensions; rm -rf /tmp/NeoBoot-9-master; rm ' + LinkNeoBoot + '/ver.txt; cd ' + LinkNeoBoot + '/; chmod 0755 ./bin/neoini*; chmod 0755 ./ex_init.py; chmod 0755 ./tmpfiles/target/*; chmod 0755 ./files/NeoBoot.sh; chmod 0755 ./files/userscript.sh; cd')
|
||||
if getCPUtype() == 'MIPS':
|
||||
os.system('cd ' + LinkNeoBoot + '/; cp -rf ./bin/neoinitmipsvu /sbin; chmod 755 /sbin/neoinitmipsvu; cp -rf ./bin/neoinitmips /sbin; chmod 755 /sbin/neoinitmips; cd')
|
||||
os.system('cd ' + LinkNeoBoot + '/; rm ./bin/install; rm ./files/mountpoint.sh; rm ./files/neo.sh')
|
||||
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('Completed update NeoBoot. You need to restart the E2 !!!\nRestart now ?'), MessageBox.TYPE_YESNO)
|
||||
restartbox.setTitle(_('Restart GUI now ?'))
|
||||
else:
|
||||
os.system('rm -f ' + LinkNeoBoot + '/ver.txt')
|
||||
self.session.open(MessageBox, _('The update has been canceled.'), MessageBox.TYPE_INFO, 8)
|
||||
|
||||
def restartGUI(self, answer):
|
||||
if answer is True:
|
||||
@@ -1210,6 +1245,7 @@ class NeoBootImageChoose(Screen):
|
||||
'h9combo',
|
||||
'h10',
|
||||
'osmio4k',
|
||||
'osmio4kplus',
|
||||
'bcm7252s',
|
||||
'gbquad4k',
|
||||
'ax60',
|
||||
@@ -1251,7 +1287,13 @@ class NeoBootImageChoose(Screen):
|
||||
'ustym4kpro'
|
||||
'h3'
|
||||
'formuler4turbo'
|
||||
'formuler3']:
|
||||
'formuler3',
|
||||
'tmtwin4k',
|
||||
'anadol4k',
|
||||
'protek4k',
|
||||
'maxytecmulti',
|
||||
'force3uhd',
|
||||
'viper4k ']:
|
||||
self.extractImage()
|
||||
else:
|
||||
self.messagebox = self.session.open(MessageBox, _('The tuner is not supported by NeoBoot.\nContact the author.\nNo proper STB for installation !!!!'), MessageBox.TYPE_INFO, 8)
|
||||
@@ -1381,7 +1423,7 @@ def checkInternet():
|
||||
|
||||
def checkimage():
|
||||
mycheck = False
|
||||
if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/tmpfiles') or not fileExists('' + LinkNeoBoot + '/usedskin.pyo') or not fileExists('' + LinkNeoBoot + '/etc/neo'):
|
||||
if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/bin/utilsbh') or not fileExists('' + LinkNeoBoot + '/stbinfo'):
|
||||
mycheck = False
|
||||
else:
|
||||
mycheck = True
|
||||
|
||||
@@ -1,60 +1,51 @@
|
||||
#!/bin/sh
|
||||
#Wspierane tunery satelitarne:
|
||||
#Machine BCM - getCPUSoC():
|
||||
|
||||
cat /proc/stb/info/chipset:
|
||||
cat /proc/stb/info/chipset
|
||||
cat /etc/hostname
|
||||
cat /proc/cpuinfo
|
||||
cat /proc/version
|
||||
cat /etc/issue
|
||||
cat /proc/mtd
|
||||
mtd_debug info /dev/mtd0
|
||||
cat /proc/cmdline
|
||||
cat /proc/partitions
|
||||
cat /var/lib/opkg/info/kernel-image*.postinst
|
||||
|
||||
Wspierane tunery satelitarne:
|
||||
|
||||
Ultimo4k : 7444s
|
||||
Solo4k : 7376
|
||||
Zero 4K : 72604
|
||||
Duo4k : 7278 #BCM7278
|
||||
Duo4k : 7278
|
||||
Duo4kse : 7444s
|
||||
Uno4K : 7252s
|
||||
Uno4kSE : 7252s
|
||||
Ultimo : 7405(with 3D)
|
||||
Uno : 7405(with 3D)
|
||||
Ultimo : 7405
|
||||
Uno : 7405
|
||||
Duo : 7335
|
||||
Duo2 : 7424
|
||||
Zero : 7362
|
||||
Solo : 7325
|
||||
Solose : 7241
|
||||
Solose-v2 : 7241
|
||||
Solo2 : 7356
|
||||
|
||||
Solo2 : 7356
|
||||
Formuler F1 : bcm7356
|
||||
Formuler F3 : 7362
|
||||
|
||||
Formuler F3 : 7362
|
||||
Miraclebox MBmini : bcm7358
|
||||
Miraclebox Micro : bcm7362
|
||||
Miraclebox Ultra : bcm7424
|
||||
|
||||
Miraclebox Ultra : bcm7424
|
||||
Octagon Sf8008 : 3798mv200
|
||||
Octagon SF4008 : bcm7251
|
||||
|
||||
Zgemma h7S : bcm7251s
|
||||
Zgemma H9S : hi3798mv200 hostname: zgemmah9s; mtd6: 01000000 00020000 "kernel" ; mtd7: 0ea00000 00020000 "rootfs"
|
||||
|
||||
AX HD60 4K : hi3798mv200 # cat /etc/hostname : ax60
|
||||
|
||||
Zgemma H9S : hi3798mv200
|
||||
AX HD60 4K : hi3798mv200
|
||||
OSmini : BCM7362
|
||||
|
||||
atemio6000 : bcm7362
|
||||
|
||||
gbquad4k : bcm7252s # cat /proc/stb/info/model : gbquad4k # # cat /etc/hostname : gbquad4k # cat /proc/cmdline root=/dev/mmcblk0p5 rootwait rw rootflags=data=journal libata.force=1:3.0G,2:3.0G,3:3.0G coherent_poll=2M vmalloc=525m bmem=529m@491m bmem=608m@2464m
|
||||
|
||||
ustym4kpro: cat /proc/stb/info/chipset 3798mv200 root@ustym4kpro: cat /etc/hostname ustym4kpro
|
||||
|
||||
GI ET-11000 4K : bcm7251 #cat /etc/hostname et1x000 #Galaxy Innvations ET-11000
|
||||
|
||||
AX HD51 4K : bcm7251s # cat /etc/hostname : ax51 # cat /proc/stb/info/boxtype : hd51
|
||||
|
||||
gbquad4k : bcm7252s
|
||||
ustym4kpro: : 3798mv200
|
||||
GI ET-11000 4K : bcm7251
|
||||
AX HD51 4K : bcm7251s
|
||||
viper4k
|
||||
osmio4k
|
||||
ax60
|
||||
sf8008
|
||||
sf4008
|
||||
et1x000
|
||||
dm920
|
||||
ax51
|
||||
gbquad4k
|
||||
ustym4kpro
|
||||
dm900
|
||||
tmtwin4k
|
||||
anadol4k
|
||||
protek4k
|
||||
maxytecmulti
|
||||
force3uhd
|
||||
|
||||
|
||||
208
NeoBoot/tmpfiles/runpy/arm_run.py
Normal file
@@ -0,0 +1,208 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#from __init__ import _
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Screens.Console import Console
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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 os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getBoxHostName == 'sf4008': #getCPUSoC() == 'bcm7251'
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getBoxHostName == 'et1x000': #getCPUSoC() == 'bcm7251' or
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getBoxHostName == 'ax51': #getCPUSoC() == 'bcm7251s' or
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p3 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getBoxHostName() == 'zgemmah9s':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash')
|
||||
|
||||
# if os.path.exists('/proc/stb/info/boxtype'):
|
||||
# if getBoxHostName() == 'zgemmah9combo':
|
||||
# os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash')
|
||||
|
||||
if getBoxHostName == 'sf8008':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /media/InternalFlash')
|
||||
|
||||
if getBoxHostName == 'ax60':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p21 /media/InternalFlash')
|
||||
|
||||
if getBoxHostName() == 'ustym4kpro' or getTunerModel() == 'ustym4kpro':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /media/InternalFlash')
|
||||
|
||||
if os.path.exists('/proc/stb/info/model'):
|
||||
if getTunerModel() == 'dm900' or getCPUSoC() == 'BCM97252SSFF':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p2 /media/InternalFlash')
|
||||
|
||||
if getCPUSoC() == 'bcm7252s' or getBoxHostName() == 'gbquad4k':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p5 /media/InternalFlash')
|
||||
|
||||
#if getBoxHostName == 'osmio4k':
|
||||
#os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p5 /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;')
|
||||
|
||||
#################_____ARM____##########################
|
||||
|
||||
#ARM procesor: DM900; AX HD60 4K
|
||||
if getCPUtype() == 'ARMv7' and getCPUSoC() or getBoxHostName() == ['osmio4k',
|
||||
'osmio4kplus',
|
||||
'ax60',
|
||||
'sf8008',
|
||||
'bcm7251',
|
||||
'sf4008',
|
||||
'et1x000',
|
||||
'dm920',
|
||||
'ax51',
|
||||
'bcm7251s',
|
||||
'h7',
|
||||
'hi3798mv200'
|
||||
'zgemmah9s',
|
||||
'bcm7252s',
|
||||
'gbquad4k',
|
||||
'ustym4kpro',
|
||||
'3798mv200'
|
||||
'dm900',
|
||||
'tmtwin4k',
|
||||
'anadol4k',
|
||||
'protek4k',
|
||||
'maxytecmulti',
|
||||
'force3uhd',
|
||||
'viper4k'] :
|
||||
if getImageNeoBoot() == 'Flash':
|
||||
if fileExists('/.multinfo'):
|
||||
os.system('cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init; reboot -f ')
|
||||
elif not fileExists('/.multinfo'):
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
|
||||
cmd1='sleep 5; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f '
|
||||
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
|
||||
|
||||
elif getImageNeoBoot() != 'Flash':
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
|
||||
cmd1='sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; reboot -f '
|
||||
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
|
||||
|
||||
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()
|
||||
|
||||
|
||||
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()
|
||||
|
||||
def myclose2(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
159
NeoBoot/tmpfiles/runpy/duo4k_run.py
Normal file
@@ -0,0 +1,159 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#from __init__ import _
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
if fileCheck('/etc/vtiversion.info'):
|
||||
from Screens.Console import Console
|
||||
elif not fileCheck('/etc/vtiversion.info'):
|
||||
from files.neoconsole import Console
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '' + LinkNeoBoot + ''
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '' + LinkNeoBoot + '/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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;')
|
||||
|
||||
#################_____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()
|
||||
159
NeoBoot/tmpfiles/runpy/duo4kse_run.py
Normal file
@@ -0,0 +1,159 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#from __init__ import _
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
if fileCheck('/etc/vtiversion.info'):
|
||||
from Screens.Console import Console
|
||||
elif not fileCheck('/etc/vtiversion.info'):
|
||||
from files.neoconsole import Console
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '' + LinkNeoBoot + ''
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '' + LinkNeoBoot + '/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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() == 'duo4kse':
|
||||
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;')
|
||||
|
||||
#################_____ARM____##########################
|
||||
|
||||
#VUPLUS ARM - Duo4kse vu_mmcblk0p6.sh
|
||||
if getCPUSoC() == '7444s' or getBoxHostName() == 'vuduo4kse' and getBoxHostName() != 'vuultimo4k' :
|
||||
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()
|
||||
52
NeoBoot/tmpfiles/runpy/findkerneldevice.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import collections
|
||||
import struct
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
# http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_table_header_.28LBA_1.29
|
||||
GPT_HEADER_FORMAT = """
|
||||
8s signature
|
||||
4s revision
|
||||
L header_size
|
||||
L crc32
|
||||
4x _
|
||||
Q current_lba
|
||||
Q backup_lba
|
||||
Q first_usable_lba
|
||||
Q last_usable_lba
|
||||
16s disk_guid
|
||||
Q part_entry_start_lba
|
||||
L num_part_entries
|
||||
L part_entry_size
|
||||
L crc32_part_array
|
||||
"""
|
||||
|
||||
# http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_entries_.28LBA_2.E2.80.9333.29
|
||||
GPT_PARTITION_FORMAT = """
|
||||
16s type
|
||||
16s unique
|
||||
Q first_lba
|
||||
Q last_lba
|
||||
Q flags
|
||||
72s name
|
||||
"""
|
||||
|
||||
file = '/boot/STARTUP'
|
||||
myfile = open(file, 'r')
|
||||
data = myfile.read().replace('\n', '')
|
||||
myfile.close()
|
||||
|
||||
rootfsdevice = data.split("=",1)[1].split(" ",1)[0]
|
||||
kerneldevice = rootfsdevice[:-1] + str(int(rootfsdevice[-1:]) -1)
|
||||
|
||||
if os.access('/dev/kernel', os.R_OK):
|
||||
os.remove('/dev/kernel')
|
||||
os.symlink(kerneldevice, '/dev/kernel')
|
||||
else:
|
||||
os.symlink(kerneldevice, '/dev/kernel')
|
||||
|
||||
# print kerneldevice
|
||||
155
NeoBoot/tmpfiles/runpy/h7s_run.py
Normal file
@@ -0,0 +1,155 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Console import Console
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '' + LinkNeoBoot + ''
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '' + LinkNeoBoot + '/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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 os.path.exists('/proc/stb/info/boxtype'):
|
||||
if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p3 /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;')
|
||||
|
||||
|
||||
#################_____ARM____##########################
|
||||
#Zgemma h7S ARM ARM - h7s_mmcblk0p2.sh
|
||||
if getBoxHostName() == 'h7' or getCPUSoC() == 'bcm7251s':
|
||||
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 - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/target/h7s_kernel.sh '
|
||||
|
||||
elif not fileExists('/.multinfo'):
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'ln -sf "init.sysvinit" "/sbin/init"; reboot -f'
|
||||
|
||||
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 - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'ln -sfn /sbin/neoinitarm /sbin/init; reboot -f'
|
||||
|
||||
elif fileExists('%sImageBoot/%s/boot/zImage.%s' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'ln -sfn /sbin/neoinitarm /sbin/init; ' + LinkNeoBoot + '/target/h7s_kernel.sh '
|
||||
|
||||
elif fileExists('/.multinfo'):
|
||||
if not fileExists('%sImageBoot/%s/boot/zImage.%s' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'python ' + LinkNeoBoot + '/target/findkerneldevice.py; dd if=%sImagesUpload/.kernel/flash-kernel-%s.bin of=/dev/kernel; cd /media/InternalFlash;ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"; reboot -f' % getNeoLocation() % getBoxHostName()
|
||||
|
||||
elif fileExists('%sImageBoot/%s/boot/zImage.%s' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/target/h7s_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()
|
||||
153
NeoBoot/tmpfiles/runpy/mips_run.py
Normal file
@@ -0,0 +1,153 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.Console import Console
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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;')
|
||||
|
||||
#################_____MIPS____##################################
|
||||
#MIPS procesor: MiracleBox, ET8500, Formuler F1, Formuler F3, Atemio6000 - MIPS # test - ultra, osmini
|
||||
if getCPUtype() != 'ARMv7' and getCPUSoC() or getBoxHostName() == ['bcm7358',
|
||||
'ax60',
|
||||
'bcm7362',
|
||||
'bcm7356',
|
||||
'bcm7241',
|
||||
'bcm7362',
|
||||
'bcm73625'
|
||||
'mbmini',
|
||||
'h3',
|
||||
'ini-1000sv',
|
||||
'osmini'
|
||||
'formuler4turbo'] :
|
||||
if getImageNeoBoot() == 'Flash':
|
||||
self.session.open(TryQuitMainloop, 2)
|
||||
elif getImageNeoBoot() != 'Flash':
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
|
||||
cmd1='sleep 5; ln -sfn /sbin/neoinitmips /sbin/init; reboot -d -f -h -i'
|
||||
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
|
||||
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()
|
||||
|
||||
elif getCPUtype() != 'ARMv7' and getCPUSoC() or getBoxHostName() == ['bcm7424',
|
||||
'mbultra',
|
||||
'ini-8000sv' ] :
|
||||
if getImageNeoBoot() == 'Flash':
|
||||
self.session.open(TryQuitMainloop, 2)
|
||||
elif getImageNeoBoot() != 'Flash':
|
||||
cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n')
|
||||
cmd1='sleep 5; ln -sfn /sbin/neoinitmipsvu /sbin/init; reboot -d -f -h -i'
|
||||
self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1])
|
||||
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()
|
||||
|
||||
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()
|
||||
|
||||
def myclose2(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
157
NeoBoot/tmpfiles/runpy/ustym4kpro.py
Normal file
@@ -0,0 +1,157 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Console import Console
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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 getBoxHostName() == 'ustym4kpro' or getTunerModel() == 'ustym4kpro':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /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;')
|
||||
|
||||
#################_____ARM____##########################
|
||||
|
||||
#VUPLUS ARM ustym4kpro - kernel = mmcblk0p12
|
||||
if getCPUtype() == 'ARMv7' and getBoxHostName() == 'ustym4kpro':
|
||||
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"; /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/neoinitarm /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 - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...')
|
||||
cmd1 = 'python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/findkerneldevice.py; dd if=%sImagesUpload/.kernel/flash-kernel-%s.bin of=/dev/kernel; cd /media/InternalFlash;ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"; reboot -f' % getNeoLocation() % getBoxHostName()
|
||||
|
||||
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 "neoinitarm" "/media/InternalFlash/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, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
|
||||
self.close()
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#echo "Flash " >> '+ getImageNeoBoot() + 'ImagesUpload/.kernel/used_flash_kernel;
|
||||
|
||||
from __init__ import _
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.Console import Console
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
@@ -26,12 +23,16 @@ from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
if fileCheck('/etc/vtiversion.info'):
|
||||
from Screens.Console import Console
|
||||
elif not fileCheck('/etc/vtiversion.info'):
|
||||
from files.neoconsole import Console
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
@@ -75,9 +76,9 @@ class StartImage(Screen):
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
mypath = '' + LinkNeoBoot + ''
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
mypixmap = '' + LinkNeoBoot + '/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
@@ -85,10 +86,6 @@ class StartImage(Screen):
|
||||
|
||||
def KeyOk(self):
|
||||
if getImageNeoBoot() != 'Flash':
|
||||
if not fileExists('%sImageBoot/%s/.control_ok' % ( getNeoLocation(), getImageNeoBoot())):
|
||||
cmd = _("echo -e '[NeoBoot] Uwaga!!! po poprawnym starcie wybranego oprogramowania w neoboot,\nnalezy uruchomic NEOBOOTA by potwierdzic prawidlowy start image.\n\nNacisnij OK lub exit na pilocie by kontynuowac...\n\n\n'")
|
||||
self.session.openWithCallback(self.StartImageInNeoBoot, Console, _('NeoBoot: Start image...'), [cmd])
|
||||
else:
|
||||
os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % ( getNeoLocation(), getImageNeoBoot()))
|
||||
self.StartImageInNeoBoot()
|
||||
else:
|
||||
@@ -102,13 +99,17 @@ class StartImage(Screen):
|
||||
else:
|
||||
system('touch %sImageBoot/%s/.control_boot_new_image ' % ( getNeoLocation(), getImageNeoBoot() ))
|
||||
|
||||
system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh')
|
||||
if fileExists('/.multinfo') and getCPUtype() == 'ARMv7':
|
||||
if getBoxVuModel() == 'uno4kse' or getBoxVuModel() == 'uno4k' or getBoxVuModel() == 'ultimo4k' or getBoxVuModel() == 'solo4k':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /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/mmc/etc/init.d/neobootmount.sh'):
|
||||
os.system('rm -f /media/mmc/etc/init.d/neobootmount.sh;')
|
||||
if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
|
||||
os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
|
||||
|
||||
#################_____ARM____##########################
|
||||
|
||||
@@ -121,12 +122,13 @@ class StartImage(Screen):
|
||||
'vuuno4k',
|
||||
'vuuno4kse'] :
|
||||
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() ))
|
||||
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/mmc; ln -sf "init.sysvinit" "/media/mmc/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh '
|
||||
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...')
|
||||
@@ -140,26 +142,21 @@ class StartImage(Screen):
|
||||
|
||||
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 '
|
||||
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/mmcblk0p1; cd /media/mmc; ln -sf "neoinitarm" "/media/mmc/sbin/init" ; sleep 2; reboot -dfhi '
|
||||
cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; 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/mmc; ln -sf "neoinitarmvu" "/media/mmc/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh '
|
||||
cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/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.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
|
||||
self.close()
|
||||
|
||||
def myclose2(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
153
NeoBoot/tmpfiles/runpy/vu_mtd1_run.py
Normal file
@@ -0,0 +1,153 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.Console import Console
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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;')
|
||||
|
||||
#################_____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(_('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; /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, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
|
||||
self.close()
|
||||
|
||||
def myclose2(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
142
NeoBoot/tmpfiles/runpy/vu_mtd2_run.py
Normal file
@@ -0,0 +1,142 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.Console import Console
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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;')
|
||||
|
||||
#################_____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(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel 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' % ( getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
|
||||
cmd = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh'
|
||||
|
||||
self.session.open(Console, _('NeoBoot MIPS....'), [cmd])
|
||||
self.close()
|
||||
|
||||
def myclose2(self, message):
|
||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||
self.close()
|
||||
156
NeoBoot/tmpfiles/runpy/zero4k_run.py
Normal file
@@ -0,0 +1,156 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from Plugins.Extensions.NeoBoot.__init__ import _
|
||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
|
||||
from enigma import getDesktop
|
||||
from enigma import eTimer
|
||||
from Screens.Screen import Screen
|
||||
from Screens.MessageBox import MessageBox
|
||||
from Screens.ChoiceBox import ChoiceBox
|
||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
|
||||
from Screens.Standby import TryQuitMainloop
|
||||
from Components.About import about
|
||||
from Components.Sources.List import List
|
||||
from Components.Button import Button
|
||||
from Components.ActionMap import ActionMap, NumberActionMap
|
||||
from Components.GUIComponent import *
|
||||
from Components.MenuList import MenuList
|
||||
from Components.Input import Input
|
||||
from Components.Label import Label
|
||||
from Components.ProgressBar import ProgressBar
|
||||
from Components.ScrollLabel import ScrollLabel
|
||||
from Components.Pixmap import Pixmap, MultiPixmap
|
||||
from Components.config import *
|
||||
from Components.ConfigList import ConfigListScreen
|
||||
from Tools.LoadPixmap import LoadPixmap
|
||||
from Tools.Directories import fileCheck, fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS
|
||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
||||
from os.path import dirname, isdir, isdir as os_isdir
|
||||
import os
|
||||
import time
|
||||
if fileCheck('/etc/vtiversion.info'):
|
||||
from Screens.Console import Console
|
||||
elif not fileCheck('/etc/vtiversion.info'):
|
||||
from files.neoconsole import Console
|
||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
|
||||
|
||||
class StartImage(Screen):
|
||||
screenwidth = getDesktop(0).size().width()
|
||||
if screenwidth and screenwidth == 1920:
|
||||
skin = """<screen position="center, center" size="1241, 850" title="NeoBoot">
|
||||
\n\t\t\t<ePixmap position="491, 673" zPosition="-2" size="365, 160" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrixhd.png" />
|
||||
<widget source="list" render="Listbox" position="20, 171" size="1194, 290" scrollbarMode="showOnDemand">\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (90, 1), size = (920, 66), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (8, 4), size = (66, 66), png = 1),
|
||||
\n \t\t\t],
|
||||
\n \t\t\t"fonts": [gFont("Regular", 40)],\n \t\t\t"itemHeight": 66\n \t\t}
|
||||
\n \t\t</convert>\n\t\t</widget>
|
||||
\n <widget name="label1" position="21, 29" zPosition="1" size="1184, 116" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t <widget name="label2" position="22, 480" zPosition="-2" size="1205, 168" font="Regular;35" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="red" />
|
||||
\n\t\t </screen>"""
|
||||
else:
|
||||
skin = """<screen position="center, center" size="835, 500" title="NeoBoot">
|
||||
\n\t\t\t <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png" />
|
||||
<widget source="list" render="Listbox" position="16, 150" size="800, 40" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/listselection800x35.png" scrollbarMode="showOnDemand">
|
||||
\n\t\t\t\t<convert type="TemplatedMultiContent">
|
||||
\n \t\t{"template": [
|
||||
\n \t\t\tMultiContentEntryText(pos = (180, 0), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),
|
||||
\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),
|
||||
\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],
|
||||
\n \t\t\t"itemHeight": 35\n \t\t}\n \t\t</convert>
|
||||
\n\t\t</widget>\n<widget name="label1" font="Regular; 26" position="15, 70" size="803, 58" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
<widget name="label2" position="40, 232" zPosition="2" size="806, 294" font="Regular;25" halign="center" valign="center" backgroundColor="black" transparent="1" foregroundColor="#00cc99" />
|
||||
\n\t\t </screen>"""
|
||||
|
||||
__module__ = __name__
|
||||
def __init__(self, session):
|
||||
Screen.__init__(self, session)
|
||||
self.list = []
|
||||
self['list'] = List(self.list)
|
||||
self.select()
|
||||
self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk,
|
||||
'back': self.close})
|
||||
self['label1'] = Label(_('Start the chosen system now ?'))
|
||||
self['label2'] = Label(_('Select OK to run the image.'))
|
||||
|
||||
def select(self):
|
||||
self.list = []
|
||||
mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||
if not fileExists(mypath + 'icons'):
|
||||
mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/ok.png'
|
||||
png = LoadPixmap(mypixmap)
|
||||
res = (_('OK Start image...'), png, 0)
|
||||
self.list.append(res)
|
||||
self['list'].list = self.list
|
||||
|
||||
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()
|
||||
|
||||
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() == 'zero4k':
|
||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /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;')
|
||||
|
||||
#################_____ARM____##########################
|
||||
#VUPLUS ARM - Zero4k vu_mmcblk0p4.sh
|
||||
elif getBoxHostName() == 'vuzero4k' or getCPUSoC() == '72604':
|
||||
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"; /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/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"; /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, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
|
||||
self.close()
|
||||
119
NeoBoot/tmpfiles/target/h7s_kernel.sh
Normal file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
#script - gutosie
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/boxtype ]; then
|
||||
BOXTYPE=$( cat /proc/stb/info/boxtype )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/chipset ]; then
|
||||
CHIPSET=$( cat /proc/stb/info/chipset )
|
||||
fi
|
||||
|
||||
if [ -f /tmp/zImage ]; then
|
||||
rm -f /tmp/zImage
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
IMAGE=ImageBoot
|
||||
IMAGENEXTBOOT=/ImageBoot/.neonextboot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
BOXNAME=$( cat /etc/hostname)
|
||||
UPLOAD=ImagesUpload
|
||||
# $NEOBOOTMOUNT$IMAGE
|
||||
# $NEOBOOTMOUNT
|
||||
|
||||
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
|
||||
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
|
||||
else
|
||||
TARGET=Flash
|
||||
fi
|
||||
|
||||
echo "NEOBOOT is booting image from " $TARGET
|
||||
|
||||
if [ $BOXNAME = "h7" ] || [ $CHIPSET = "bcm7251s" ]; then
|
||||
if [ $TARGET = "Flash" ]; then
|
||||
if [ -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p......" || echo "Instaling kernel bin file /dev/mmcblk0p... "
|
||||
cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/kernel
|
||||
fi
|
||||
echo "Boot - Flash. "
|
||||
echo "Start image Flash z dysku hdd lub usb za 5 sekund RESTART...; \n\n..................._REBOOT_..................."
|
||||
fi
|
||||
elif [ ! -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p......" || echo "Instaling kernel bin file /dev/mmcblk0p... "
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin..." || echo "Instaling kernel bin file "
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/kernel
|
||||
fi
|
||||
echo "Start-restart Flash image..."
|
||||
echo "Reboot image Flash za 5 sekund RESTART...; \n\n...................=REBOOT=..................."
|
||||
fi
|
||||
fi
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
[ $PL ] && echo " Zainstalowano kernel image " $TARGET " " || echo " Installed kernel image - "$TARGET" "
|
||||
cat /dev/kernel | grep "kernel"
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
reboot -d -f
|
||||
else
|
||||
if [ $TARGET != "Flash" ]; then
|
||||
if [ -e /.multinfo ] ; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -f $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel do /dev/mmcblk0p..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=/tmp/zImage of=/dev/kernel
|
||||
fi
|
||||
echo "Start image z Flash..."
|
||||
echo "Kernels for image " $TARGET " changed..."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................*REBOOT*..................."
|
||||
fi
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel bin do /dev/mmcblk0p..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=/tmp/zImage of=/dev/kernel
|
||||
fi
|
||||
echo "Kernel dla potrzeb startu systemu " $TARGET " zmieniony."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................-REBOOT-..................."
|
||||
fi
|
||||
rm -f /tmp/zImage
|
||||
cat /dev/kernel | grep "kernel"
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
reboot -d -f
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" "
|
||||
echo "$TARGET " > $NEOBOOTMOUNT/ImageBoot/.neonextboot
|
||||
echo "Error - Nie wpierany model STB !!! "
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
119
NeoBoot/tmpfiles/target/ustym4kpro.sh
Normal file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
#script - gutosie
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/boxtype ]; then
|
||||
BOXTYPE=$( cat /proc/stb/info/boxtype )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/chipset ]; then
|
||||
CHIPSET=$( cat /proc/stb/info/chipset )
|
||||
fi
|
||||
|
||||
if [ -f /tmp/zImage ]; then
|
||||
rm -f /tmp/zImage
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
IMAGE=ImageBoot
|
||||
IMAGENEXTBOOT=/ImageBoot/.neonextboot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
BOXNAME=$( cat /etc/hostname)
|
||||
UPLOAD=ImagesUpload
|
||||
# $NEOBOOTMOUNT$IMAGE
|
||||
# $NEOBOOTMOUNT
|
||||
|
||||
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
|
||||
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
|
||||
else
|
||||
TARGET=Flash
|
||||
fi
|
||||
|
||||
echo "NEOBOOT is booting image from " $TARGET
|
||||
|
||||
if [ $BOXNAME = "ustym4kpro" ] ; then
|
||||
if [ $TARGET = "Flash" ]; then
|
||||
if [ -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p......" || echo "Instaling kernel bin file /dev/mmcblk0p... "
|
||||
cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/kernel
|
||||
fi
|
||||
echo "Boot - Flash. "
|
||||
echo "Start image Flash z dysku hdd lub usb za 5 sekund RESTART...; \n\n..................._REBOOT_..................."
|
||||
fi
|
||||
elif [ ! -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p......" || echo "Instaling kernel bin file /dev/mmcblk0p... "
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin..." || echo "Instaling kernel bin file "
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/kernel
|
||||
fi
|
||||
echo "Start-restart Flash image..."
|
||||
echo "Reboot image Flash za 5 sekund RESTART...; \n\n...................=REBOOT=..................."
|
||||
fi
|
||||
fi
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
[ $PL ] && echo " Zainstalowano kernel image " $TARGET " " || echo " Installed kernel image - "$TARGET" "
|
||||
cat /dev/kernel | grep "kernel"
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
reboot -d -f
|
||||
else
|
||||
if [ $TARGET != "Flash" ]; then
|
||||
if [ -e /.multinfo ] ; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -f $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel do /dev/mmcblk0p..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=/tmp/zImage of=/dev/kernel
|
||||
fi
|
||||
echo "Start image z Flash..."
|
||||
echo "Kernels for image " $TARGET " changed..."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................*REBOOT*..................."
|
||||
fi
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel bin do /dev/mmcblk0p..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
python /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/target/findkerneldevice.py
|
||||
dd if=/tmp/zImage of=/dev/kernel
|
||||
fi
|
||||
echo "Kernel dla potrzeb startu systemu " $TARGET " zmieniony."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................-REBOOT-..................."
|
||||
fi
|
||||
rm -f /tmp/zImage
|
||||
cat /dev/kernel | grep "kernel"
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
reboot -d -f
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" "
|
||||
echo "$TARGET " > $NEOBOOTMOUNT/ImageBoot/.neonextboot
|
||||
echo "Error - Nie wpierany model STB !!! "
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
120
NeoBoot/tmpfiles/target/vuDuo4Kmmcblk0p6.sh
Normal file
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh
|
||||
#script - gutosie
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/vumodel ]; then
|
||||
VUMODEL=$( cat /proc/stb/info/vumodel )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/boxtype ]; then
|
||||
BOXTYPE=$( cat /proc/stb/info/boxtype )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/chipset ]; then
|
||||
CHIPSET=$( cat /proc/stb/info/chipset )
|
||||
fi
|
||||
|
||||
if [ -f /tmp/zImage ]; then
|
||||
rm -f /tmp/zImage
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
IMAGE=ImageBoot
|
||||
IMAGENEXTBOOT=/ImageBoot/.neonextboot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
BOXNAME=$( cat /etc/hostname)
|
||||
UPLOAD=ImagesUpload
|
||||
|
||||
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
|
||||
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
|
||||
else
|
||||
TARGET=Flash
|
||||
fi
|
||||
|
||||
echo "NEOBOOT is booting image from " $TARGET
|
||||
|
||||
if [ $VUMODEL = "duo4k" ] ; then
|
||||
if [ $TARGET = "Flash" ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p6......" || echo "Instaling kernel bin file /dev/mmcblk0p6... "
|
||||
if [ -e /.multinfo ]; then
|
||||
cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Boot - Flash. "
|
||||
echo "Start image Flash z dysku hdd lub usb za 5 sekund RESTART...; \n\n..................._REBOOT_..................."
|
||||
fi
|
||||
elif [ ! -e /.multinfo ]; then
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin..." || echo "Instaling kernel bin file "
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Start-restart Flash image..."
|
||||
echo "Reboot image Flash za 5 sekund RESTART...; \n\n...................=REBOOT=..................."
|
||||
fi
|
||||
fi
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
[ $PL ] && echo " Zainstalowano kernel image " $TARGET " " || echo " Installed kernel image - "$TARGET" "
|
||||
cat /dev/mmcblk0p6 | grep "kernel"
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "$VUMODEL" "
|
||||
echo "...............shutdown now...............";
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
else
|
||||
if [ $TARGET != "Flash" ]; then
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
if [ -e /.multinfo ] ; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
else
|
||||
sleep 2
|
||||
cp -f $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel do /dev/mmcblk0p6..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Start image z Flash..."
|
||||
echo "Kernels for image " $TARGET " changed..."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................*REBOOT*..................."
|
||||
fi
|
||||
else
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel bin do /dev/mmcblk0p6..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Kernel dla potrzeb startu systemu " $TARGET " VU+ zmieniony."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................-REBOOT-..................."
|
||||
fi
|
||||
rm -f /tmp/zImage
|
||||
cat /dev/mmcblk0p6 | grep "kernel"
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "$VUMODEL" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
echo "...............shutdown now..............."
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" MODEL: "$VUMODEL" "
|
||||
echo "$TARGET " > $NEOBOOTMOUNT/ImageBoot/.neonextboot
|
||||
echo "Error - Nie wpierany model STB !!! "
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
120
NeoBoot/tmpfiles/target/vuDuo4Ksemmcblk0p6.sh
Normal file
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh
|
||||
#script - gutosie
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/vumodel ]; then
|
||||
VUMODEL=$( cat /proc/stb/info/vumodel )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/boxtype ]; then
|
||||
BOXTYPE=$( cat /proc/stb/info/boxtype )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/chipset ]; then
|
||||
CHIPSET=$( cat /proc/stb/info/chipset )
|
||||
fi
|
||||
|
||||
if [ -f /tmp/zImage ]; then
|
||||
rm -f /tmp/zImage
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
IMAGE=ImageBoot
|
||||
IMAGENEXTBOOT=/ImageBoot/.neonextboot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
BOXNAME=$( cat /etc/hostname)
|
||||
UPLOAD=ImagesUpload
|
||||
|
||||
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
|
||||
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
|
||||
else
|
||||
TARGET=Flash
|
||||
fi
|
||||
|
||||
echo "NEOBOOT is booting image from " $TARGET
|
||||
|
||||
if [ $VUMODEL = "duo4kse" ] ; then
|
||||
if [ $TARGET = "Flash" ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p6......" || echo "Instaling kernel bin file /dev/mmcblk0p6... "
|
||||
if [ -e /.multinfo ]; then
|
||||
cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Boot - Flash. "
|
||||
echo "Start image Flash z dysku hdd lub usb za 5 sekund RESTART...; \n\n..................._REBOOT_..................."
|
||||
fi
|
||||
elif [ ! -e /.multinfo ]; then
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin..." || echo "Instaling kernel bin file "
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Start-restart Flash image..."
|
||||
echo "Reboot image Flash za 5 sekund RESTART...; \n\n...................=REBOOT=..................."
|
||||
fi
|
||||
fi
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
[ $PL ] && echo " Zainstalowano kernel image " $TARGET " " || echo " Installed kernel image - "$TARGET" "
|
||||
cat /dev/mmcblk0p6 | grep "kernel"
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "$VUMODEL" "
|
||||
echo "...............shutdown now...............";
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
else
|
||||
if [ $TARGET != "Flash" ]; then
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
if [ -e /.multinfo ] ; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
else
|
||||
sleep 2
|
||||
cp -f $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel do /dev/mmcblk0p6..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Start image z Flash..."
|
||||
echo "Kernels for image " $TARGET " changed..."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................*REBOOT*..................."
|
||||
fi
|
||||
else
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel bin do /dev/mmcblk0p6..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p6
|
||||
fi
|
||||
echo "Kernel dla potrzeb startu systemu " $TARGET " VU+ zmieniony."
|
||||
echo "Start innego image z Flash za 5 sekund RESTART...... \n\n...................-REBOOT-..................."
|
||||
fi
|
||||
rm -f /tmp/zImage
|
||||
cat /dev/mmcblk0p6 | grep "kernel"
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "STB: " $CHIPSET " "$BOXNAME" "$VUMODEL" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
sleep 5
|
||||
echo "...............shutdown now..............."
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" MODEL: "$VUMODEL" "
|
||||
echo "$TARGET " > $NEOBOOTMOUNT/ImageBoot/.neonextboot
|
||||
echo "Error - Nie wpierany model STB !!! "
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
124
NeoBoot/tmpfiles/target/vuZero4Kmmcblk0p4.sh
Normal file
@@ -0,0 +1,124 @@
|
||||
#!/bin/sh
|
||||
#script - gutosie
|
||||
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
|
||||
PL=1
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/vumodel ]; then
|
||||
VUMODEL=$( cat /proc/stb/info/vumodel )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/boxtype ]; then
|
||||
BOXTYPE=$( cat /proc/stb/info/boxtype )
|
||||
fi
|
||||
|
||||
if [ -f /proc/stb/info/chipset ]; then
|
||||
CHIPSET=$( cat /proc/stb/info/chipset )
|
||||
fi
|
||||
|
||||
if [ -f /tmp/zImage ]; then
|
||||
rm -f /tmp/zImage
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
IMAGE=ImageBoot
|
||||
IMAGENEXTBOOT=/ImageBoot/.neonextboot
|
||||
NEOBOOTMOUNT=$( cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location)
|
||||
BOXNAME=$( cat /etc/hostname)
|
||||
UPLOAD=ImagesUpload
|
||||
|
||||
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
|
||||
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
|
||||
else
|
||||
TARGET=Flash
|
||||
fi
|
||||
|
||||
echo "NEOBOOT is booting image from " $TARGET
|
||||
|
||||
if [ $VUMODEL = "zero4k" ] ; then
|
||||
if [ $TARGET = "Flash" ]; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
elif [ -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p4......" || echo "Instaling kernel bin file /dev/mmcblk0p4... "
|
||||
cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin of=/dev/mmcblk0p4
|
||||
fi
|
||||
echo "VUZERO4K - Boot - Flash. "
|
||||
echo "Start image Flash z dysku hdd lub usb za 5 sekund _RESTART_..."
|
||||
fi
|
||||
elif [ ! -e /.multinfo ]; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin /dev/mmcblk0p4......" || echo "Instaling kernel bin file /dev/mmcblk0p4... "
|
||||
if [ -e $NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin ] ; then
|
||||
[ $PL ] && echo "Instalacja pliku kernel bin..." || echo "Instaling kernel bin file "
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXNAME.bin conv=noerror conv=sync of=/dev/mmcblk0p4
|
||||
fi
|
||||
echo "Start-restart Flash image..."
|
||||
echo "Reboot image Flash za 5 sekund =RESTART=...; "
|
||||
fi
|
||||
fi
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
[ $PL ] && echo " Zainstalowano kernel image " $TARGET " " || echo " Installed kernel image - "$TARGET" "
|
||||
cat /dev/mmcblk0p4 | grep "kernel"
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" MODEL: "$VUMODEL" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
echo "...............shutdown now..............."
|
||||
sleep 5
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
else
|
||||
if [ $TARGET != "Flash" ]; then
|
||||
if [ -e /.multinfo ] ; then
|
||||
INFOBOOT=$( cat /.multinfo )
|
||||
if [ $TARGET = $INFOBOOT ] ; then
|
||||
echo "NEOBOOT is booting image " $TARGET
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel do /dev/mmcblk0p4..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p4
|
||||
fi
|
||||
echo "Start image z Flash..."
|
||||
echo "Kernels for image " $TARGET " changed..."
|
||||
echo "Start innego image z Flash za 5 sekund *RESTART*..."
|
||||
fi
|
||||
else
|
||||
[ $PL ] && echo "Przenoszenie pliku kernel do /tmp..." || echo "Moving the kernel file to..."
|
||||
sleep 2
|
||||
cp -fR $NEOBOOTMOUNT$IMAGE/$TARGET/boot/zImage.$BOXNAME /tmp/zImage
|
||||
echo "Instalacja kernel bin do /dev/mmcblk0p4..."
|
||||
sleep 2
|
||||
if [ -d /proc/stb ] ; then
|
||||
dd if=/tmp/zImage of=/dev/mmcblk0p4
|
||||
fi
|
||||
echo "Kernel dla potrzeb startu systemu " $TARGET " VU+ zmieniony."
|
||||
echo "Start innego image z Flash za 5 sekund -RESTART-..."
|
||||
fi
|
||||
rm -f /tmp/zImage
|
||||
cat /dev/mmcblk0p4 | grep "kernel"
|
||||
update-alternatives --remove vmlinux vmlinux-`uname -r` || true
|
||||
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" MODEL: "$VUMODEL" "
|
||||
sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
echo "...............Shutdown Now..............."
|
||||
sleep 5
|
||||
echo -n "Rebooting... "
|
||||
reboot -d -f
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||
echo "CHIPSET: " $CHIPSET " BOXNAME: "$BOXNAME" MODEL: "$VUMODEL" "
|
||||
echo "$TARGET " > $NEOBOOTMOUNT/ImageBoot/.neonextboot
|
||||
echo "Error - Nie wpierany model STB !!! "
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||