Errors on auto rooting script with Raspberry PI 1 b+

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
belmanski
Starting Member
Starting Member
Posts: 5
Joined: Fri Nov 08, 2019 12:38 pm

Errors on auto rooting script with Raspberry PI 1 b+

Post by belmanski »

After reading the manual several times, and following all the instructions I still get errors with Raspberry 1 B+:

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-hardware rp1 --jtag-available --output-level DEBUG
INFO:__main__:Starting up...
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
DEBUG:__main__:{"uboot_only": false, "has_jtag": true, "check_uboot": true, "boot_only": false, "reboot_after": true, "cleanup_payload": true, "port": "/dev/serial0", "jtag_hardware": "rp1", "ssh_pubkey_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqxvv0hGvwtBZPO9Hv+9WCGvbHieAzKyXyl5msklS0DQANFonNwXaMHSazxpOuI8oK/DL9zgaVVa084RXUvG7yrgIJxbKJMLulkaoO/JMJ4ewctP5A+Uz40AvEmizLnJiU9CEQCOHgpXmw6mhcHfoNG0a+5dCZ+g+aFqsFOGDOm7fM12GvG5xBk2UpQj6sqscyZLIPch0kLsom7EZt+rsiCOLZGbGKHjYnLDB4HKj6OZM4spiKSSTR7WqlkdDXnxVaSZIRKkkTf1/GKHkqQ}
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
ERROR:rooter:
Traceback (most recent call last):
File "./rooter.py", line 211, in start_bootloader
client = telnetlib.Telnet('localhost', 4444)
File "/usr/lib/python2.7/telnetlib.py", line 211, in __init__
self.open(host, port, timeout)
File "/usr/lib/python2.7/telnetlib.py", line 227, in open
self.sock = socket.create_connection((host, port), timeout)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 111] Connection refused
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 187, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 183, in main
rooter.Rooter(**params).run()
File "./rooter.py", line 76, in run
self.start_bootloader("assets/u-boot.bin")
File "./rooter.py", line 231, in start_bootloader
proc.terminate()
File "/usr/lib/python2.7/subprocess.py", line 1274, in terminate
self.send_signal(signal.SIGTERM)
File "/usr/lib/python2.7/subprocess.py", line 1269, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] No such process
pi@raspberrypi:~/ToonRooter $

Any help appreciated, thanks/
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by TheHogNL »

It is trying to connect to openocd but it does not work

File "./rooter.py", line 211, in start_bootloader
client = telnetlib.Telnet('localhost', 4444)
File "/usr/lib/python2.7/telnetlib.py", line 211, in __init__
self.open(host, port, timeout)


Did you install openocd properpy (https://github.com/ToonSoftwareCollecti ... ll-openocd) ?
Member of the Toon Software Collective
belmanski
Starting Member
Starting Member
Posts: 5
Joined: Fri Nov 08, 2019 12:38 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by belmanski »

Thank you for helping, Working perfect now :)
Oneten1983
Starting Member
Starting Member
Posts: 9
Joined: Sun Jan 12, 2020 10:14 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by Oneten1983 »

Hi, What did you do to make it working?

I have a RPI 2, 11 wires from RPI GPIO to 14 header Toon.

Toon -> RPI
2 -> 24
3 -> 25
4 -> 23
5 -> 20
6 -> 22
7 -> 18
8 -> 19
10 -> 21
11 -> 8
13 -> 10
14 -> 9

Other Connections RPI:
a screen, a mouse and a keyboard
Lan cable
power supply

Toon connections:
11 wires to RPI see wiringlist above
Cv-Ketel module with power connection

1) First a Made a fresh install of Raspian

2) with configuration tool i checked:
The serial login shell is disabled
the serial interface is enabled

3) opened the command line in RPI Raspbian and typed: (from readme file of martenjacobs)

git clone --recursive git://git.code.sf.net/p/openocd/code openocd
cd openocd
sudo apt install make libtool libtool-bin pkg-config autoconf automake texinfo libusb-1.0 libusb-dev
{
./bootstrap &&\
./configure --enable-sysfsgpio\
--enable-bcm2835gpio \
--prefix=/usr\
&&\
make -j4
} 2>&1 | tee openocd_build.log
sudo make install

(after each line i hit the ENTER key)

opened a new command line window
4) in command line RPI i typed in:
sudo apt install python-serial python-cryptography
git clone https://github.com/martenjacobs/ToonRooter.git
cd ToonRooter
sudo python . --jtag-available

(after each line i hit the ENTER key)

pi@raspberrypi:~ $ cd ToonRooter
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-hardware
INFO:__main__:Starting up...
INFO:__main__:Detected JTAG hardware 'RPI2
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
INFO:rooter:waiting for Toon to restart

(Then i pressed the reset button on the Toon)

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
ERROR:rooter:
Traceback (most recent call last):
File "./rooter.py", line 211, in start_bootloader
client = telnetlib.Telnet('localhost', 4444)
File "/usr/lib/python2.7/telnetlib.py", line 211, in __init__
self.open(host, port, timeout)
File "/usr/lib/python2.7/telnetlib.py", line 227, in open
self.sock = socket.create_connection((host, port), timeout)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 111] Connection refused
CRITICAL:_main_:[errno 3] No such process
pi@raspberrypi:~/ToonRooter $


Is something wrong with the wiring?
Do i need a usb serial converter? connected to a (exampe win10) operating system with openocd for windows installed?
i thought this was only needed for remote controle of the RPI? (command line )
Is Openocd not correctly installed?

What can i do to make it work?

A lot of questions but It's really confusing after many hours with the same error.
Any help would be appreciated, Thanks in advise.
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by TheHogNL »

Oneten1983 wrote: Is Openocd not correctly installed?

What can i do to make it work?
yes openocd not working. Try reinstall again and check if that install runs ok.
Member of the Toon Software Collective
Oneten1983
Starting Member
Starting Member
Posts: 9
Joined: Sun Jan 12, 2020 10:14 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by Oneten1983 »

Hi Many thanks for your reply

i removed the early installed openocd directory
pi@raspberrypi:~ $ rm -Rf openocd
pi@raspberrypi:~ $ git clone --recursive git://git.code.sf.net/p/openocd/code openocd
Cloning into 'openocd'...
remote: Enumerating objects: 62129, done.
remote: Counting objects: 100% (62129/62129), done.
remote: Compressing objects: 100% (26074/26074), done.
remote: Total 62129 (delta 51041), reused 43563 (delta 35892)
Receiving objects: 100% (62129/62129), 14.07 MiB | 3.01 MiB/s, done.
Resolving deltas: 100% (51041/51041), done.
Checking out files: 100% (1668/1668), done.
Submodule 'jimtcl' (http://repo.or.cz/r/jimtcl.git) registered for path 'jimtcl'
Submodule 'src/jtag/drivers/libjaylink' (http://repo.or.cz/r/libjaylink.git) registered for path 'src/jtag/drivers/libjaylink'
Submodule 'tools/git2cl' (http://repo.or.cz/r/git2cl.git) registered for path 'tools/git2cl'
Cloning into '/home/pi/openocd/jimtcl'...
warning: redirecting to https://repo.or.cz/r/jimtcl.git/
remote: Counting objects: 7712, done.
remote: Total 7712 (delta 0), reused 0 (delta 0) /s
Receiving objects: 100% (7712/7712), 6.05 MiB | 2.00 MiB/s, done.
Resolving deltas: 100% (5607/5607), done.
Cloning into '/home/pi/openocd/tools/git2cl'...
warning: redirecting to https://repo.or.cz/r/git2cl.git/
remote: Counting objects: 64, done.
remote: Total 64 (delta 0), reused 0 (delta 0)
Cloning into '/home/pi/openocd/src/jtag/drivers/libjaylink'...
warning: redirecting to https://repo.or.cz/r/libjaylink.git/
remote: Counting objects: 1004, done.
remote: Total 1004 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1004/1004), 236.74 KiB | 881.00 KiB/s, done.
Resolving deltas: 100% (767/767), done.
Submodule path 'jimtcl': checked out 'a9bf5975fd0f89974d689a2d9ebd0873c8d64787'
Submodule path 'src/jtag/drivers/libjaylink': checked out 'f73ad5e667ae8b26a52b847c603fdadaabf302a6'
Submodule path 'tools/git2cl': checked out '8373c9f74993e218a08819cbcdbab3f3564bbeba'

then copy & paste the following code: (with PuTTY over ethernet)
cd openocd
sudo apt install make libtool libtool-bin pkg-config autoconf automake texinfo libusb-1.0 libusb-dev
{
./bootstrap &&\
./configure --enable-sysfsgpio\
--enable-bcm2835gpio \
--prefix=/usr\
&&\
make -j4
} 2>&1 | tee openocd_build.log
sudo make install

a large log file is produced too long to fully capture but the end looks like this:
rm_disassembler.o src/.libs/libopenocd.lax/libtarget.a/arm_dpm.o src/.libs/libop enocd.lax/libtarget.a/arm_jtag.o src/.libs/libopenocd.lax/libtarget.a/arm_semiho sting.o src/.libs/libopenocd.lax/libtarget.a/arm_simulator.o src/.libs/libopenoc d.lax/libtarget.a/armv4_5.o src/.libs/libopenocd.lax/libtarget.a/armv4_5_cache.o src/.libs/libopenocd.lax/libtarget.a/armv4_5_mmu.o src/.libs/libopenocd.lax/lib target.a/armv7a.o src/.libs/libopenocd.lax/libtarget.a/armv7a_cache.o src/.libs/ libopenocd.lax/libtarget.a/armv7a_cache_l2x.o src/.libs/libopenocd.lax/libtarget .a/armv7a_mmu.o src/.libs/libopenocd.lax/libtarget.a/armv7m.o src/.libs/libopeno cd.lax/libtarget.a/armv7m_trace.o src/.libs/libopenocd.lax/libtarget.a/armv8.o s rc/.libs/libopenocd.lax/libtarget.a/armv8_cache.o src/.libs/libopenocd.lax/libta rget.a/armv8_dpm.o src/.libs/libopenocd.lax/libtarget.a/armv8_opcodes.o src/.lib s/libopenocd.lax/libtarget.a/avr32_ap7k.o src/.libs/libopenocd.lax/libtarget.a/a vr32_jtag.o src/.libs/libopenocd.lax/libtarget.a/avr32_mem.o src/.libs/libopenoc d.lax/libtarget.a/avr32_regs.o src/.libs/libopenocd.lax/libtarget.a/avrt.o src/. libs/libopenocd.lax/libtarget.a/batch.o src/.libs/libopenocd.lax/libtarget.a/bre akpoints.o src/.libs/libopenocd.lax/libtarget.a/cortex_a.o src/.libs/libopenocd. lax/libtarget.a/cortex_m.o src/.libs/libopenocd.lax/libtarget.a/dsp563xx.o src/. libs/libopenocd.lax/libtarget.a/dsp563xx_once.o src/.libs/libopenocd.lax/libtarg et.a/dsp5680xx.o src/.libs/libopenocd.lax/libtarget.a/embeddedice.o src/.libs/li bopenocd.lax/libtarget.a/esirisc.o src/.libs/libopenocd.lax/libtarget.a/esirisc_ jtag.o src/.libs/libopenocd.lax/libtarget.a/esirisc_trace.o src/.libs/libopenocd .lax/libtarget.a/etb.o src/.libs/libopenocd.lax/libtarget.a/etm.o src/.libs/libo penocd.lax/libtarget.a/etm_dummy.o src/.libs/libopenocd.lax/libtarget.a/fa526.o src/.libs/libopenocd.lax/libtarget.a/feroceon.o src/.libs/libopenocd.lax/libtarg et.a/hla_target.o src/.libs/libopenocd.lax/libtarget.a/image.o src/.libs/libopen ocd.lax/libtarget.a/jsp_server.o src/.libs/libopenocd.lax/libtarget.a/lakemont.o src/.libs/libopenocd.lax/libtarget.a/ls1_sap.o src/.libs/libopenocd.lax/libtarg et.a/lt1-mips32_pracc.o src/.libs/libopenocd.lax/libtarget.a/lt2-trace.o src/.li bs/libopenocd.lax/libtarget.a/lt3-mips_ejtag.o src/.libs/libopenocd.lax/libtarge t.a/mem_ap.o src/.libs/libopenocd.lax/libtarget.a/mips32.o src/.libs/libopenocd. lax/libtarget.a/mips32_dmaacc.o src/.libs/libopenocd.lax/libtarget.a/mips32_prac c.o src/.libs/libopenocd.lax/libtarget.a/mips64.o src/.libs/libopenocd.lax/libta rget.a/mips64_pracc.o src/.libs/libopenocd.lax/libtarget.a/mips_ejtag.o src/.lib s/libopenocd.lax/libtarget.a/mips_m4k.o src/.libs/libopenocd.lax/libtarget.a/mip s_mips64.o src/.libs/libopenocd.lax/libtarget.a/nds32.o src/.libs/libopenocd.lax /libtarget.a/nds32_aice.o src/.libs/libopenocd.lax/libtarget.a/nds32_cmd.o src/. libs/libopenocd.lax/libtarget.a/nds32_disassembler.o src/.libs/libopenocd.lax/li btarget.a/nds32_reg.o src/.libs/libopenocd.lax/libtarget.a/nds32_tlb.o src/.libs /libopenocd.lax/libtarget.a/nds32_v2.o src/.libs/libopenocd.lax/libtarget.a/nds3 2_v3.o src/.libs/libopenocd.lax/libtarget.a/nds32_v3_common.o src/.libs/libopeno cd.lax/libtarget.a/nds32_v3m.o src/.libs/libopenocd.lax/libtarget.a/or1k.o src/. libs/libopenocd.lax/libtarget.a/or1k_du_adv.o src/.libs/libopenocd.lax/libtarget .a/or1k_tap_mohor.o src/.libs/libopenocd.lax/libtarget.a/or1k_tap_vjtag.o src/.l ibs/libopenocd.lax/libtarget.a/or1k_tap_xilinx_bscan.o src/.libs/libopenocd.lax/ libtarget.a/program.o src/.libs/libopenocd.lax/libtarget.a/quark_d20xx.o src/.li bs/libopenocd.lax/libtarget.a/quark_x10xx.o src/.libs/libopenocd.lax/libtarget.a /register.o src/.libs/libopenocd.lax/libtarget.a/riscv-011.o src/.libs/libopenoc d.lax/libtarget.a/riscv-013.o src/.libs/libopenocd.lax/libtarget.a/riscv.o src/. libs/libopenocd.lax/libtarget.a/riscv_semihosting.o src/.libs/libopenocd.lax/lib target.a/semihosting_common.o src/.libs/libopenocd.lax/libtarget.a/smp.o src/.li bs/libopenocd.lax/libtarget.a/stm8.o src/.libs/libopenocd.lax/libtarget.a/target .o src/.libs/libopenocd.lax/libtarget.a/target_request.o src/.libs/libopenocd.la x/libtarget.a/testee.o src/.libs/libopenocd.lax/libtarget.a/trace.o src/.libs/li bopenocd.lax/libtarget.a/x86_32_common.o src/.libs/libopenocd.lax/libtarget.a/xs cale.o src/.libs/libopenocd.lax/libserver.a/libserver_la-gdb_server.o src/.libs/ libopenocd.lax/libserver.a/libserver_la-server.o src/.libs/libopenocd.lax/libser ver.a/libserver_la-server_stubs.o src/.libs/libopenocd.lax/libserver.a/libserver _la-tcl_server.o src/.libs/libopenocd.lax/libserver.a/libserver_la-telnet_server .o src/.libs/libopenocd.lax/librtos.a/librtos_la-ChibiOS.o src/.libs/libopenocd. lax/librtos.a/librtos_la-FreeRTOS.o src/.libs/libopenocd.lax/librtos.a/librtos_l a-ThreadX.o src/.libs/libopenocd.lax/librtos.a/librtos_la-chromium-ec.o src/.lib s/libopenocd.lax/librtos.a/librtos_la-eCos.o src/.libs/libopenocd.lax/librtos.a/ librtos_la-embKernel.o src/.libs/libopenocd.lax/librtos.a/librtos_la-hwthread.o src/.libs/libopenocd.lax/librtos.a/librtos_la-linux.o src/.libs/libopenocd.lax/l ibrtos.a/librtos_la-mqx.o src/.libs/libopenocd.lax/librtos.a/librtos_la-nuttx.o src/.libs/libopenocd.lax/librtos.a/librtos_la-rtos.o src/.libs/libopenocd.lax/li brtos.a/librtos_la-rtos_chibios_stackings.o src/.libs/libopenocd.lax/librtos.a/l ibrtos_la-rtos_ecos_stackings.o src/.libs/libopenocd.lax/librtos.a/librtos_la-rt os_embkernel_stackings.o src/.libs/libopenocd.lax/librtos.a/librtos_la-rtos_mqx_ stackings.o src/.libs/libopenocd.lax/librtos.a/librtos_la-rtos_standard_stacking s.o src/.libs/libopenocd.lax/librtos.a/librtos_la-rtos_ucos_iii_stackings.o src/ .libs/libopenocd.lax/librtos.a/librtos_la-uCOS-III.o src/.libs/libopenocd.lax/li bhelper.a/libhelper_la-binarybuffer.o src/.libs/libopenocd.lax/libhelper.a/libhe lper_la-command.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-configuratio n.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-fileio.o src/.libs/libopen ocd.lax/libhelper.a/libhelper_la-ioutil_stubs.o src/.libs/libopenocd.lax/libhelp er.a/libhelper_la-jep106.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-jim -nvp.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-log.o src/.libs/libopen ocd.lax/libhelper.a/libhelper_la-options.o src/.libs/libopenocd.lax/libhelper.a/ libhelper_la-replacements.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-ti me_support.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-time_support_comm on.o src/.libs/libopenocd.lax/libhelper.a/libhelper_la-util.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib src/.libs/libopenocd.a
libtool: link: rm -fr src/.libs/libopenocd.lax src/.libs/libopenocd.lax
libtool: link: ( cd "src/.libs" && rm -f "libopenocd.la" && ln -s "../libopenocd .la" "libopenocd.la" )
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Wstrict-prototypes -Wform at-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-al ign -Wredundant-decls -Werror -g -O2 -o src/openocd src/main.o src/libopenocd. la ./jimtcl/libjim.a -ldl
libtool: link: gcc -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -o src/openocd src/main.o src/.libs/libopenocd.a -lusb -lusb-1.0 -lm ./ jimtcl/libjim.a -ldl
make[2]: Map '/home/pi/openocd' wordt verlaten
make[1]: Map '/home/pi/openocd' wordt verlaten
pi@raspberrypi:~/openocd $

Then i run the script:
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available --output-level DEBUG
INFO:__main__:Starting up...
INFO:__main__:Detected JTAG hardware 'rpi2'
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
DEBUG:__main__:{"uboot_only": false, "has_jtag": true, "check_uboot": true, "boot_only": false, "reboot_after": true, "cleanup_payload": true, "port": "/dev/serial0", "jtag_hardware": "rpi2", "ssh_pubkey_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKu6Wy2F7yKpYbUJfClbAiMjZDyCxkPAl2QNr8xr3ETTpkLfckuU5dKJXV0gEqIy6OunadB9NU4tXcw1IGVkSryoTkEb1Qqw91RUyle6zacnnVKAiVNsfY40cqKfdtxmBaeq1bKhJYXNowV4r63Sb1SMbTKO248lMOBmOR98JUdU/238mhiHGq5fJp3G+zPRP48NV0bogWF5Zbtt4gcbsNfaGSjk+WvakDfGfBfzJLypBlV7akMyOF4Icjjrc6cIIsglvZUnkwSO2KuYYCv6ve51/P+4PbbbNrawxTla1SkFZ0B6c+se1g3/e3NwSkbXJXgZ4pmJYvLBDa926gjVLJ"}
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
ERROR:rooter:
Traceback (most recent call last):
File "./rooter.py", line 211, in start_bootloader
client = telnetlib.Telnet('localhost', 4444)
File "/usr/lib/python2.7/telnetlib.py", line 211, in __init__
self.open(host, port, timeout)
File "/usr/lib/python2.7/telnetlib.py", line 227, in open
self.sock = socket.create_connection((host, port), timeout)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 111] Connection refused
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 187, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 183, in main
rooter.Rooter(**params).run()
File "./rooter.py", line 76, in run
self.start_bootloader("assets/u-boot.bin")
File "./rooter.py", line 231, in start_bootloader
proc.terminate()
File "/usr/lib/python2.7/subprocess.py", line 1274, in terminate
self.send_signal(signal.SIGTERM)
File "/usr/lib/python2.7/subprocess.py", line 1269, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] No such process

Still no luck, what can i do or check?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by TheHogNL »

I think you missed the "sudo make install" part of the openocd install. Go back to the openocd directory and run that again.
To see if openocd is installed just run 'openocd'. It should start (but give an error about missing command line options).
Member of the Toon Software Collective
Oneten1983
Starting Member
Starting Member
Posts: 9
Joined: Sun Jan 12, 2020 10:14 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by Oneten1983 »

Made again a new raspian image
And followed step by step the manual and make sure the install of openocd take place.

after running the script, the following error appears:

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available --output-level DEBUG
INFO:__main__:Starting up...
INFO:__main__:Detected JTAG hardware 'rpi2'
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
DEBUG:__main__:{"uboot_only": false, "has_jtag": true, "check_uboot": true, "boot_only": false, "reboot_after": true, "cleanup_payload": true, "port": "/dev/serial0", "jtag_hardware": "rpi2", "ssh_pubkey_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMgfQvohgFTfGWQysYR/PMXl43/ZV3jdkcypGYSvOul9YE738cS4zIzhdDNHY2EfrRh0NdMBy5CkxRDLP0OhB1NM9Syg0KFJRJUSvgb8RicQBbHb6A+lEUDiMfuy+CMfPS1EmrV+8ztNZffehAYgOYmb/KxsqHV6mykLRhlXN6tILh20JGk6yumvmpZiBQnK4XoKvh0N7KrlGyO4bz06pwXKw52sKa4DZpJguFuqM2BK1NqIegTjKFinB7JGD8+W4uYDq87J6HIRTb4ve2p9KpqZKWqIK4Jg9TOtjJHUpss3eg3T8wSJwlWQ5YSo4176ye+ogYebAoGBHa37QxFTln"}
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
DEBUG:rooter:Open On-Chip Debugger
>
INFO:rooter:Halting CPU
DEBUG:rooter:soft_reset_halt
requesting target halt and executing a soft reset
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
>
DEBUG:rooter:reset halt
JTAG tap: imx27.etb tap/device found: 0x1b900f0f (mfg: 0x787 (<unknown>), part: 0xb900, ver: 0x1)
JTAG tap: imx27.cpu tap/device found: 0x07926121 (mfg: 0x090 (Chip Express), part: 0x7926, ver: 0x0)
srst pulls trst - can not reset into halted mode. Issuing halt after reset.
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0xa1f2058c
MMU: disabled, D-Cache: disabled, I-Cache: enabled
NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
>
INFO:rooter:Loading new image to RAM
DEBUG:rooter:load_image assets/u-boot.bin 0xa1f00000
166504 bytes written at address 0xa1f00000
downloaded 166504 bytes in 2.583420s (62.940 KiB/s)

>
INFO:rooter:Starting up new image
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09
INFO:rooter:Using password to log in
INFO:rooter:Logging in to U-Boot
DEBUG:rooter:
LCD: Initializing LCD frambuffer at a1400000

LCD: 800x480, pbb 4

LCD: Drawing the logo...

In: serial

Out: serial

Err: serial

Display-bmp: 800 x 480 with 16777216 colors

Net: FEC

Warning: FEC MAC addresses don't match:

Address in SROM is 00:00:20:03:00:00

Address in environment is 00:0f:11:07:da:91





Autoboot in 2 sec...

Enter the password to interrupt.

The password is: toon

U-Boot>
DEBUG:rooter:Logged in to U-Boot
INFO:rooter:Patching U-Boot
DEBUG:rooter:d 'U-Boot>
DEBUG:rooter:d 'U-Boot>
ERROR:rooter:Could not find value for addmisc environment variable
INFO:rooter:Waiting for boot up
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 187, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 183, in main
rooter.Rooter(**params).run()
File "./rooter.py", line 80, in run
self.run()
File "./rooter.py", line 67, in run
self.write_payload()
File "./rooter.py", line 151, in write_payload
log.debug(port.read_until("/ # "))
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 659, in read_until
c = self.read(1)
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
pi@raspberrypi:~/ToonRooter $

I made some progress but stuck here.
Do you have any idea why this happens?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by TheHogNL »

Oneten1983 wrote: (device disconnected or multiple access on port?)

I made some progress but stuck here.
Do you have any idea why this happens?
Did you forgot to disable the serial on console this time?
Member of the Toon Software Collective
Oneten1983
Starting Member
Starting Member
Posts: 9
Joined: Sun Jan 12, 2020 10:14 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by Oneten1983 »

I checked with software configuration tool
P6 Serial
The serial login shell is disabled, serial interface is enabled.

directly after the new raspbian install is made this settings but did not reboot the RPI after i made the changes.
Can that be an issue?

Now
I restarted the RPI and run the Script again.

It's working Now, the TOON is rooted.
INFO:rooter:Your Toon is now rooted. Please wait for it to boot up and try to log in using SSH

Thanks for all the good work.
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Errors on auto rooting script with Raspberry PI 1 b+

Post by TheHogNL »

Oneten1983 wrote:I checked with software configuration tool
P6 Serial
The serial login shell is disabled, serial interface is enabled.

directly after the new raspbian install is made this settings but did not reboot the RPI after i made the changes.
Can that be an issue?

.
So yes, that was the issue :)
Member of the Toon Software Collective
Post Reply

Return to “Toon Rooting”