• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Guruplug installer issues  (Read 3538 times)
crunch
Newbie
*

Karma: 0
Posts: 28


View Profile
« on: March 15, 2011, 05:10:03 PM »

No offense, but I find it highly unlikely that the guruplug installer package hosted here http://www.plugcomputer.org/index.php/us/resources/downloads?func=fileinfo&id=65 will work for anyone. The package includes several non-functioning binaries (fw_setenv and openocd), whose failed output is unhelpfully redirected to /dev/null. I see here on the forums many people who have bricked plugs and are scratching their heads about "openocd FAILED" errors which are fairly cryptic.

 I've downloaded the latest versions of openocd and uboot-utils. I baked my own /etc/fw_env.config file. I downloaded "pingtoo's patched uboot binary".  I edited runme.sh. I built openocd from scratch. I'm still not able to flash my guruplug server.  openocd can't find my JTAG adapter. I tried modprobe "ftdi_sio vendor=0x9e88 product=0x9e8f" which didn't seem to help. I'm able to connect to the /dev/ttyUSB0 device with a serial console, so I suspect the problem lies somewhere with openocd. If the rest of the installer package is any indicator, I'm assuming that some config file is WRONG for the Guruplug (legacy config from Sheevaplug?). I can keep beating my head on this, but is there anyone who has actually sucessfully flashed uboot onto a guruplug that could point me in a good direction? Thanks.
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #1 on: March 15, 2011, 06:12:47 PM »

Hi,

I am sorry for the problem you seem to have but I can assure you that the link you mention did help me unbricking my guruplug

so it works. All I did was downloading, untarring and executing (as root) and it worked, You don't to play with building opencd (it is included I believe)

You will also find on this forum LOADS of people who have successfully flashed uboot (and RFS and Kernel) as well. I am on for sure Smiley

Which system are you using?

Do you see some activities on your JTAG while you try to connect? Are you sure it is properly connected?

Can you paste the errors?

The Guruplug is not perfect but that part at least is working so there is no reason you can't get it to work unless something broke of course!

Logged

crunch
Newbie
*

Karma: 0
Posts: 28


View Profile
« Reply #2 on: March 15, 2011, 11:28:43 PM »

Glad to hear that it works for some, and thanks for taking pity on me. Basically I've tried the script around 500 times over the past few days, with various settings changed each time (I believe the scientific term for this is "poking it with a stick"). Since I read that timing is very important (probably to catch a startup tftp hook or something), I ran the script after 0.1 to 10 seconds at each 1 second interval. Always the same error:

Code:
root@debian:/home/rich/guruplug-installer# ./runme.sh uboot.bin
 ****     Preparing environment variables file ...
 **** Burning uboot and environment variables ... This will take few minutes ...
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
2000 kHz
dcc downloads are enabled
Error: JTAG communication failure, check connection, JTAG interface, target power etc.
Error: trying to validate configured JTAG chain anyway...
Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x00. tap=feroceon.cpu pos=0 expected 0x1 got 0
Warn : Could not validate JTAG chain, continuing anyway...
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x00 check_value: 0x01 check_mask: 0x0F
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Error: unexpected Feroceon EICE version signature
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1010). Workaround: increase "set remotetimeout" in GDB
Error: timed out while waiting for target halted
Runtime error, file "./openocd/./board/guruplug.cfg", line 24:
   
 **** openocd FAILED
 **** Is the mini USB cable connected?
 **** Try powering down, then replugging the Sheevaplug

I've used my JTAG connection previously without problems under Windows and Linux, in this case I am mostly using Linux because openocd seems more buggy on Windows. I am using the guruplug JTAG board from globalscale, with the 4pin plug from UART to the plug 4-pin connection (could it be that openocd requires a different connection than serial console?). UART is selected rather than RS232. When I run runme.sh I notice a few things: there are no activity lights on the JTAG interface, although there are lights when I connect to the device using screen. Since the device is bricked completely (bad advice from some uboot dork), I really can't get any significant output from the plug. The top bright green light is steadily illuminated. Since some people reported that JTAG required "modprobe ftdi_sio vendor=0x9e88 product=0x9e8f", I've used those options about half of the time. I see no difference after issuing this command.

I can tell you that there is no way that this code will work, it's not valid to the bash interpreter:
Code:
# Update environment variable file image
grep -v "#" ./openocd/uboot-dflt.txt | while read ; do ./openocd/fw_setenv $REPLY ; done >& /dev/null
grep -v "#" ./openocd/uboot-custom.txt | while read ; do ./openocd/fw_setenv $REPLY ; done >& /dev/null

First off the lines should not redirect to /dev/null, because then you don't notice that there are errors every time these commands run, causing uboot-env.bin to be BLANK. If you change the lines to (note extra "REPLY", no "$")
Code:
grep -v "#" ./openocd/uboot-dflt.txt | while read REPLY ; do ./openocd/fw_setenv $REPLY ; done
                                                  ^^^^
it will at least be valid bash. In my testing it also helps to add spaces to the line ends of uboot-custom.txt and uboot-dflt.txt, so that the uboot-env.bin has spaces between name/value pairs on each line. I don't see how it could work all run together in a giant blob with no spaces. My guess is that people who have had success with this script did not blow away their environment variables all the way, since it generates no config. However, fixing this bug gives me no help with my problem, because it appears I have a lower-level driver problem or my plug is super-bricked. Thanks for reading.
Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #3 on: March 16, 2011, 03:34:58 AM »

i see you are running the following command

Code:
root@debian:/home/rich/guruplug-installer# ./runme.sh uboot.bin
[code]

What happens if you run
[code]
root@debian:/home/rich/guruplug-installer# ./runme.sh openocd/
[code]

[/code][/code][/code]
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #4 on: March 16, 2011, 11:47:59 AM »

also you said that you have connected the 4 pin cables to the plug

On my JTAG there are 2 different connectors....i never really inquired what each one is doing but both are connected on mine

Logged

sfzhi
Jr. Member
**

Karma: 1
Posts: 83


View Profile
« Reply #5 on: March 16, 2011, 12:06:27 PM »

I am using the guruplug JTAG board from globalscale, with the 4pin plug from UART to the plug 4-pin connection (could it be that openocd requires a different connection than serial console?).
Of course, openocd requires JTAG connection, which your error messages pretty clearly indicate. What makes you think that you could use serial console instead? Those are two totally different things, they have nothing in common besides the fact that they happen to have been put by GlobalScale inside the same small black box.
Logged

Lack of knowledge is not such a big problem, unwillingness to learn is.

crunch
Newbie
*

Karma: 0
Posts: 28


View Profile
« Reply #6 on: March 16, 2011, 10:29:03 PM »

Quote
Of course, openocd requires JTAG connection, which your error messages pretty clearly indicate. What makes you think that you could use serial console instead?

I'm glad to hear there is another connector. My JTAG unit came with one cable, which I've used for all of my communication with the device ("via JTAG" setup from countless wikis out there.) Also, one of the tests to determine if openocd will work is to connect to the plug via "JTAG device through a serial console".  So I think it's easy to see that there could be confusion. If you truly are knowledgeable about this software, why don't you drop me a quick summary of the openocd commandset and how the installer really works.

I'll find the connector somewhere and report back. I appreciate the help.
Logged

sfzhi
Jr. Member
**

Karma: 1
Posts: 83


View Profile
« Reply #7 on: March 17, 2011, 05:55:09 AM »

I apologize if I have offended you. I didn't mean to.
I know something about JTAG, a little bit about openocd, and nothing at all about GuruPlug Installer.

I have never used GuruPlug Installer, but I did use the openocd binary and GuruPlug configuration file that come with it. And everything just worked.
However, I only used openocd to flash u-boot, because the rest can be done with u-boot using serial console, which is in my experience more reliable.
That may seem too much trouble compared to a "one click" installer, but at least that way you have more control over what is happening.
So if you need help with "lower level" issues I'll do what I can, but I'm afraid I won't be able to tell you anything about how the installer works.

Looking at the log you posted earlier I would say there is a good chance that everything will work once you have the physical JTAG connection in place.
Logged

Lack of knowledge is not such a big problem, unwillingness to learn is.

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #8 on: March 17, 2011, 08:32:19 AM »

Crunch,

here is how my JTAG looks like

http://www.globalscaletechnologies.com/p-28-guruplug-jtag.aspx

if you don't have the second cable I am sure it can be bought from an electronic shop or of the web.  which reminds me I should buy some because sooner or
later they will break!
Logged

crunch
Newbie
*

Karma: 0
Posts: 28


View Profile
« Reply #9 on: March 17, 2011, 01:33:25 PM »

That's where I purchased my adaptor. I'm going to scour the packaging to make sure I didn't overlook that 8-pin cable. Thanks again for everyone's help. If I can nail this debricking process, I'll do a writeup for the community.
Logged

Pages: [1]
Print
Jump to: