Toon firmware - update script
Moderators: marcelr, TheHogNL, Toonz
Re: Toon firmware - update script
@TheHogNL
Maybe not an enforcing check but e.g.
if [ "$lastKnownHash" -eq "$dlScripHash" ]; then
continue upgrade without warning
else
echo "Warning: The script you downloaded has changed from the verified script. Please only continue after confirming the changes are ok."
only continue if user gives ok
fi
Maybe not an enforcing check but e.g.
if [ "$lastKnownHash" -eq "$dlScripHash" ]; then
continue upgrade without warning
else
echo "Warning: The script you downloaded has changed from the verified script. Please only continue after confirming the changes are ok."
only continue if user gives ok
fi
Re: Toon firmware - update script
Good idea. I'll do that in the next update.
Member of the Toon Software Collective
Re: Toon firmware - update script
Just wanted to thank you for the script.
Upgraded from 4.8.25 to 4.10.6 and then to 4.13.7!
Upgraded from 4.8.25 to 4.10.6 and then to 4.13.7!
Re: Toon firmware - update script
After a succesfull update to 4.10.6 now my Toon hangs after a reboot to update to 4.13.7 .... I can acces the Toon with ssh, how can i solve this problem?
Homey, rooted Toon 1 and HomeAssistent.
Re: Toon firmware - update script
By hangs you mean the screen keeps on his orange 'TOON' display?
If yes, it's the QT-GUI that is not starting due to an error.
Try starting the GT-GUI with logging enabled. Change this in /etc/inittab and reboot.
normal:
qtqt:245:respawn:/usr/bin/startqt >/dev/null 2>&1
change to:
qtqt:245:respawn:/usr/bin/startqt >/var/log/qt 2>&1
You could read the /var/log/qt then after rebooting (for example "tail -f /var/log/qt") and hopefully find the error why qt-gui isn't starting
If yes, it's the QT-GUI that is not starting due to an error.
Try starting the GT-GUI with logging enabled. Change this in /etc/inittab and reboot.
normal:
qtqt:245:respawn:/usr/bin/startqt >/dev/null 2>&1
change to:
qtqt:245:respawn:/usr/bin/startqt >/var/log/qt 2>&1
You could read the /var/log/qt then after rebooting (for example "tail -f /var/log/qt") and hopefully find the error why qt-gui isn't starting
Member of the Toon Software Collective
Re: Toon firmware - update script
I changed the the file and reboot several times, at this time i have no longer have acces by ssh...TheHogNL wrote:By hangs you mean the screen keeps on his orange 'TOON' display?
If yes, it's the QT-GUI that is not starting due to an error.
Try starting the GT-GUI with logging enabled. Change this in /etc/inittab and reboot.
normal:
qtqt:245:respawn:/usr/bin/startqt >/dev/null 2>&1
change to:
qtqt:245:respawn:/usr/bin/startqt >/var/log/qt 2>&1
You could read the /var/log/qt then after rebooting (for example "tail -f /var/log/qt") and hopefully find the error why qt-gui isn't starting
Homey, rooted Toon 1 and HomeAssistent.
Re: Toon firmware - update script
Weird. Just rebooting should not break your ssh access. Did the Toon change IP? Try to follow the 'how to root' manual again to gain console access and check what is going on.hansgrave wrote:I changed the the file and reboot several times, at this time i have no longer have acces by ssh...
Member of the Toon Software Collective
Re: Toon firmware - update script
Used the script to go from 4.9 to 4.13.
I thought it would make the upgrade in 1 time, but it seemed the script installed 4.10 first.
Had to open the openvpn connection to eneco servers first. But didn't have to uninstall Toonstore. That's great.
Afterwards I had to disable the vpn connection again, cause it kept resetting the 'enddate' from -1 to something else.
Thanks for the work on this script! And opening another session with the logging file helped alot to see what was happening!
I thought it would make the upgrade in 1 time, but it seemed the script installed 4.10 first.
Had to open the openvpn connection to eneco servers first. But didn't have to uninstall Toonstore. That's great.
Afterwards I had to disable the vpn connection again, cause it kept resetting the 'enddate' from -1 to something else.
Thanks for the work on this script! And opening another session with the logging file helped alot to see what was happening!
Re: Toon firmware - update script
"had to open the vpn first" ? The script does this for you and will also protect your Toon so your enddate will not be overwritten.
I think you used the Eneco upgrade-qb2.sh script manually and not thise update-rooted.sh script?
I think you used the Eneco upgrade-qb2.sh script manually and not thise update-rooted.sh script?
Member of the Toon Software Collective
Re: Toon firmware - update script
I used v1.8 and it paused (I think) because it was waiting for the VPN to connect. Maybe I was just impatient.. I went in the inittab file and uncommented the VPN part.TheHogNL wrote:"had to open the vpn first" ? The script does this for you and will also protect your Toon so your enddate will not be overwritten.
I think you used the Eneco upgrade-qb2.sh script manually and not thise update-rooted.sh script?
I think the script continued on its own while I was doing this oops. I'll remember that for next time
BTW is it possible to update without the VPN connection? Someone in the domoticz forum asked me if that was possible. He has a rooted toon done by quby, but has no VPN data anymore. So he can't seem to update his toon with this script.
Re: Toon firmware - update script
The 'wait' moment was opening the vpn for you indeed. Just uncommenting the inittab does nothing without a reboot. But now I understand why your enddate changed because after the reboot you still had the openvpn uncommented resulting in the servicecenter from eneco to connect again and change the value.
Next time be more patient indeed. Maybe I need to change the text to be even more stupid proof
Updating the Toon from another source could be possible as it is just a bunch of files which are downloaded and then installed. However I am not planning to build that into the script as that might open the route to unsollicated software/mallware and I'm not sure copying the files to another server is legally allowed.
Next time be more patient indeed. Maybe I need to change the text to be even more stupid proof
Updating the Toon from another source could be possible as it is just a bunch of files which are downloaded and then installed. However I am not planning to build that into the script as that might open the route to unsollicated software/mallware and I'm not sure copying the files to another server is legally allowed.
Member of the Toon Software Collective
Re: Toon firmware - update script
Tried your script today, but it can't download the update script, this is the outcome of the log:
Root is working properly, tried it several times also after a reboot.
Any suggestions howto debug this?
EDIT: Fixed it, found that my mnt dir was empty.
So I changed location in your script
Probably a dirty change but it works
Code: Select all
=================================================================================================================================-=================================
Welcome to the rooted Toon upgrade script. This script will try to upgrade your Toon using your original connection with Eneco. It will start the VPN if necessary.
Please be advised that running this script is to your own risk!
Version: 1.8 - ThehogNL - 8-3-2018
===================================================================================================================================================================
You are currently running version 3.2.18
Which version do you want to upgrade to? You can look at the list of currently known Toon versions at https://notepad.pw/raw/6fmm2o8ev
4.10.6
Alright, I will try to upgrade to 4.10.6
Waiting for tunnel to be alive and configured...
Waiting for tunnel to be alive and configured...
Tunnel is alive and configured. Now trying to download upgrade script...
/mnt/data/update/upgrade-qb2.sh: No such file or directory
Could not download the upgrade script from the source. Exiting...
Any suggestions howto debug this?
EDIT: Fixed it, found that my mnt dir was empty.
So I changed location in your script
Code: Select all
PKGCACHE='/HCBv2/tmp/opkg-cache'
if [ ! -d "$PKGCACHE" ]
then
PKGCACHE='/HCBv2/tmp/opkg-cache'
fi
Re: Toon firmware - update script
Yes I already changed that in another release which I'm building. Your Toon was already supporting the new directory /mnt/data/update but the old dir was still there. Causing the Eneco Upgrade to fail because it expects in in the new dir.
So the script uses the old dir. The new logic is that it uses the new dir if that dir is supported by the toon.
So the proper fix is:
So the script uses the old dir. The new logic is that it uses the new dir if that dir is supported by the toon.
So the proper fix is:
Code: Select all
PKGCACHE='/mnt/data/update'
if ! strings /HCBv2/sbin/hcb_config | grep -q -e "^${PKGCACHE}\$"
then
#this toon still uses the old PKGCACHE
PKGCACHE='/HCBv2/tmp/opkg-cache'
fi
Member of the Toon Software Collective
Re: Toon firmware - update script
Thinking about this makes me me wonder if I need to create the directory if it doesn't exists. However, according to the upgrade script the /mnt/data/update dir should be automatically created upon booting of the toon
Member of the Toon Software Collective
Re: Toon firmware - update script
Just used your script for my own Toon (2nd hand now hanging on the wall ).
This has the latest firmware and old u-boot, works perfect as well!
Only manually installed latest busybox, using your payload files to transfer them.
So your script works fine for me!
This has the latest firmware and old u-boot, works perfect as well!
Only manually installed latest busybox, using your payload files to transfer them.
So your script works fine for me!