Update xtrend_dev_mtd1.sh

This commit is contained in:
gutosie
2021-12-29 16:03:53 +02:00
committed by GitHub
parent 9db117aee5
commit ec25d7ea5b

View File

@@ -35,6 +35,10 @@ else
NandWrite=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/nandwrite NandWrite=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/nandwrite
fi fi
#dd if=/media/hdd/ImagesUpload/.kernel/kernel.bin of=/dev/mtdblock1
#/usr/sbin/nandwrite -p /dev/mtd1 /media/hdd/ImagesUpload/.kernel/kernel.bin
#/usr/sbin/nandwrite -p /dev/mtd1 /media/hdd/ImagesUpload/.kernel/et5x00.vmlinux.gz
if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then if [ -f $NEOBOOTMOUNT$IMAGENEXTBOOT ]; then
TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT` TARGET=`cat $NEOBOOTMOUNT$IMAGENEXTBOOT`
else else
@@ -42,7 +46,6 @@ else
fi fi
if [ $BOXHOSTNAME = "et5x00" ] ; then if [ $BOXHOSTNAME = "et5x00" ] ; then
if [ ! -e /proc/stb/info/vumodel ] || [ -f /proc/stb/info/boxtype ] ; then
if [ $TARGET = "Flash" ]; then if [ $TARGET = "Flash" ]; then
if [ -e /.multinfo ]; then if [ -e /.multinfo ]; then
if [ ! -e /proc/stb/info/vumodel ] || [ -f /proc/stb/info/boxtype ]; then if [ ! -e /proc/stb/info/vumodel ] || [ -f /proc/stb/info/boxtype ]; then
@@ -52,9 +55,13 @@ if [ $BOXHOSTNAME = "et5x00" ] ; then
flash_eraseall /dev/mtd1 > /dev/null 2>&1 flash_eraseall /dev/mtd1 > /dev/null 2>&1
[ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1" [ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1"
sleep 2 sleep 2
if [ -e /usr/dd ]; then
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/flash-kernel-$BOXHOSTNAME.bin of=/dev/mtdblock1 > /dev/null 2>&1
else
$NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$UPLOAD/.kernel/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1 $NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$UPLOAD/.kernel/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1
fi fi
fi fi
fi
update-alternatives --remove vmlinux vmlinux-`uname -r` || true update-alternatives --remove vmlinux vmlinux-`uname -r` || true
echo "NEOBOOT is booting image " $TARGET echo "NEOBOOT is booting image " $TARGET
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
@@ -68,10 +75,14 @@ if [ $BOXHOSTNAME = "et5x00" ] ; then
flash_eraseall /dev/mtd1 > /dev/null 2>&1 flash_eraseall /dev/mtd1 > /dev/null 2>&1
[ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1" [ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1"
sleep 2 sleep 2
if [ -e /usr/dd ]; then
dd if=$NEOBOOTMOUNT$UPLOAD/.kernel/$BOXHOSTNAME.vmlinux.gz of=/dev/mtdblock1 > /dev/null 2>&1
else
$NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$UPLOAD/.kernel/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1 $NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$UPLOAD/.kernel/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1
fi fi
fi fi
fi fi
fi
update-alternatives --remove vmlinux vmlinux-`uname -r` || true update-alternatives --remove vmlinux vmlinux-`uname -r` || true
echo "NEOBOOT is booting image " $TARGET echo "NEOBOOT is booting image " $TARGET
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
@@ -92,7 +103,12 @@ if [ $BOXHOSTNAME = "et5x00" ] ; then
flash_eraseall /dev/mtd1 > /dev/null 2>&1 flash_eraseall /dev/mtd1 > /dev/null 2>&1
[ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1" [ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1"
sleep 2 sleep 2
if [ -e /usr/dd ]; then
dd if=$NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz of=/dev/mtdblock1 > /dev/null 2>&1
else
$NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1 $NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1
fi
update-alternatives --remove vmlinux vmlinux-`uname -r` || true update-alternatives --remove vmlinux vmlinux-`uname -r` || true
echo "NEOBOOT is booting image" $TARGET echo "NEOBOOT is booting image" $TARGET
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel
@@ -103,7 +119,12 @@ if [ $BOXHOSTNAME = "et5x00" ] ; then
flash_eraseall /dev/mtd1 > /dev/null 2>&1 flash_eraseall /dev/mtd1 > /dev/null 2>&1
[ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1" [ $PL ] && echo "Wgrywanie kernel do /dev/mtd1..." || echo "Writing kernel to from /dev/mtd1"
sleep 2 sleep 2
if [ -e /usr/dd ]; then
dd if=$NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz of=/dev/mtdblock1 > /dev/null 2>&1
else
$NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1 $NandWrite -p /dev/mtd1 $NEOBOOTMOUNT$IMAGE/$TARGET/boot/$BOXHOSTNAME.vmlinux.gz > /dev/null 2>&1
fi
update-alternatives --remove vmlinux vmlinux-`uname -r` || true update-alternatives --remove vmlinux vmlinux-`uname -r` || true
echo "NEOBOOT is booting image " $TARGET echo "NEOBOOT is booting image " $TARGET
echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel echo "Used Kernel: " $TARGET > $NEOBOOTMOUNT$UPLOAD/.kernel/used_flash_kernel