Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: Fully automated rooting script

Post by mAiden »

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.
Member of the Toon Software Collective
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

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.
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

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
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Fully automated rooting script

Post by TerrorSource »

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?
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

I've installed Python 2.7.
martenjacobs
Member
Member
Posts: 53
Joined: Fri Mar 09, 2018 4:13 pm

Re: Fully automated rooting script

Post by martenjacobs »

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?
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

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?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

Why not run the openocd commands yourself using the manual rooting guide?
Member of the Toon Software Collective
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

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?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Fully automated rooting script

Post by marcelr »

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.
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

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: 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 )
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

I also don't understand your problem. All steps are in detail explained in this post: viewtopic.php?f=87&t=11230&start=210#p83745
Member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Fully automated rooting script

Post by marcelr »

@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>
Markie13
Starting Member
Starting Member
Posts: 19
Joined: Sat May 05, 2018 9:16 pm

Re: Fully automated rooting script

Post by Markie13 »

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.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Fully automated rooting script

Post by marcelr »

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?
Post Reply

Return to “Toon Rooting”