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:
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:
# 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 "$")
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.