Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, Toonz, TheHogNL, TerrorSource

Re: Fully automated rooting script

Postby mAiden » Sun Apr 29, 2018 1:15 pm

marcelr wrote:zero plus 2 H5


Orange Pi PC got a TTL UART, other one dont have that.
Think thats the one i need it.
I got wires for it.
Lets make a clean install of Raspbain. Maybe a can give it a try.
mAiden
Member
Member
 
Posts: 292
Joined: July 2017

Re: Fully automated rooting script

Postby Markie13 » Sun May 06, 2018 11:45 am

Guys i need help. The following problem appears.

INFO:__main__:Starting up...
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R10
INFO:rooter:Loading new bootloader
INFO:rooter:Starting openocd
INFO:rooter:Waiting for 10 seconds
INFO:rooter:Halting CPU
INFO:rooter:Loading new image to RAM
INFO:rooter:Starting up new image
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/ToonRooter/__main__.py", line 91, in <module>
boot_only = boot_only)
File "./rooter.py", line 22, in root
do_root(port, ssh_pubkey_data, has_jtag, check_uboot, cleanup_payload, reboot_after, boot_only)
File "./rooter.py", line 53, in do_root
port.reset_input_buffer()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 573, in reset_input_buffer
termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, 'Input/output error')


Even after many tries i did in recompiling ocd, checking the wires etc.
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby TheHogNL » Sun May 06, 2018 8:41 pm

I haven't used it myself yet but the most issue's I have heard about for now is just bad cabling of the wires. So check them again and again.
Also try to follow the manual rooting guide. See if that works for you.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1613
Joined: August 2017

Re: Fully automated rooting script

Postby TerrorSource » Sun May 06, 2018 9:31 pm

Markie13 wrote:Guys i need help. The following problem appears.

INFO:__main__:Starting up...
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R10
INFO:rooter:Loading new bootloader
INFO:rooter:Starting openocd
INFO:rooter:Waiting for 10 seconds
INFO:rooter:Halting CPU
INFO:rooter:Loading new image to RAM
INFO:rooter:Starting up new image
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/ToonRooter/__main__.py", line 91, in <module>
boot_only = boot_only)
File "./rooter.py", line 22, in root
do_root(port, ssh_pubkey_data, has_jtag, check_uboot, cleanup_payload, reboot_after, boot_only)
File "./rooter.py", line 53, in do_root
port.reset_input_buffer()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 573, in reset_input_buffer
termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, 'Input/output error')


Even after many tries i did in recompiling ocd, checking the wires etc.


Which version of Python is installed?
Also, is openocd installed correctly and did you check the wires?
TerrorSource
Member
Member
 
Posts: 436
Joined: May 2017

Re: Fully automated rooting script

Postby Markie13 » Mon May 07, 2018 2:30 pm

I've installed Python 2.7.
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby martenjacobs » Mon May 07, 2018 7:04 pm

Markie13 wrote:I've installed Python 2.7.


From the traceback you provided, it looks like an issue with Python or your serial UART. Are you using raspbian with the built-in RPi UART? If so, could you try a fresh install of raspbian?
martenjacobs
Member
Member
 
Posts: 52
Joined: March 2018

Re: Fully automated rooting script

Postby Markie13 » Tue May 08, 2018 2:35 pm

I'm using a RPi 3B

What did i do till now.
- Fresh installed Raspbian Stretch Lite
- Update and upgrade Raspbian
- Install python 2.7 + dev
- All the dependencies for openocd
- Installed openocd
- Re-connected kabels using new ones following tutorial

Same problem appears. Is there any way to check my connections on the GPIO via software?
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby TheHogNL » Tue May 08, 2018 5:21 pm

Why not run the openocd commands yourself using the manual rooting guide?
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1613
Joined: August 2017

Re: Fully automated rooting script

Postby Markie13 » Tue May 08, 2018 7:10 pm

I can try that again, but then i need help?

When i load the provided bootloader i'm not able to get in U-boot in my serial console. The standard "toon" password is already added and not adjustable to interrupt the boot process. If you want we can go on in your section for this?
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby marcelr » Tue May 08, 2018 7:26 pm

Markie13 wrote:The standard "toon" password is already added and not adjustable to interrupt the boot process.


??
Added to what? You have to enter the password manually (well, copy-paste it) into the serial console. You can't "add" it to anything useful.
marcelr
Global Moderator
Global Moderator
 
Posts: 1149
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby Markie13 » Tue May 08, 2018 8:12 pm

But how do i stop the boot sequence after the toon password to get in the U-Boot menu? I can push every key on my keyboard while booting but nothing happens. In your tutorial Marcel its not clear for me which console i have to use for what even when i read the dutch guideline.

When i use the guideline from rboers it stop at
Autoboot in 2 sec...

Enter the password to interrupt.

The password is: toon


en then

Type in the word toon and press <enter>.

You can now root your Toon with the same procedure as the R6 or R8 U-Boot bootloaders as described in the next section.

If you made it this far, please continue reading on: https://www.domoticaforum.eu/viewtopic. ... 235#p82533

Start at the “##### Entering (and editing) the boot loader: #####” section.


Password toon is already added. Despite pushing enter or trying to add "toon" again in my serial console and trying to enter i still not able to stop the boot process to get in the u-boot menu as mentioned in your guideline. I do miss something.

BTW my toon is from 2017 with the newest bootloader (U-Boot 2010.09-R10 )
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby TheHogNL » Tue May 08, 2018 8:16 pm

I also don't understand your problem. All steps are in detail explained in this post: https://www.domoticaforum.eu/viewtopic. ... 210#p83745
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1613
Joined: August 2017

Re: Fully automated rooting script

Postby marcelr » Tue May 08, 2018 9:35 pm

@Markie13:

1: Are you sure your serial console is fully functional? Apparently you can receive characters in your console, but can you also send them?

2: Until the boot loader is stopped, you cannot see what you type. Serial input is echoed onto the console only after the boot loader has switched to a shell (with U-boot> prompt).

3: I remember having to try _many_ times at first. My method converged into having the password + <enter> in the copy buffer of the window manager, and then <right-click> it into the serial console (X11 behaviour). Works 99 out of a 100 times. With a windows machine you would use <ctrl+c>, <ctrl+v>
marcelr
Global Moderator
Global Moderator
 
Posts: 1149
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby Markie13 » Wed May 09, 2018 9:05 am

marcelr wrote:@Markie13:

1: Are you sure your serial console is fully functional? Apparently you can receive characters in your console, but can you also send them?

2: Until the boot loader is stopped, you cannot see what you type. Serial input is echoed onto the console only after the boot loader has switched to a shell (with U-boot> prompt).

3: I remember having to try _many_ times at first. My method converged into having the password + <enter> in the copy buffer of the window manager, and then <right-click> it into the serial console (X11 behaviour). Works 99 out of a 100 times. With a windows machine you would use <ctrl+c>, <ctrl+v>


When the boot loader is stopped i'm not able to type anything. Only read i assume. I will try many times and i have order a new JTAG module.
Markie13
Starting Member
Starting Member
 
Posts: 19
Joined: May 2018

Re: Fully automated rooting script

Postby marcelr » Wed May 09, 2018 11:39 am

It's not a JTAG problem. How do you load the custom bootloader through JTAG if you can't type anything in your serial console?
marcelr
Global Moderator
Global Moderator
 
Posts: 1149
Joined: May 2012
Location: Ehv

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron