• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Yet another "dead" guruplug  (Read 5704 times)
psycholand
Newbie
*

Karma: 0
Posts: 6


View Profile
« on: October 19, 2010, 06:04:46 PM »

When I received my two Guruplug Server Plus devices a few weeks ago, I had grand plans for them.  Apache2, PHP, MySQL, PDC using Samba, Firewall, and possibly even setting up a small PBX server.  All these plans went up in smoke when my Guruplug stopped booting.

I wanted to install Debian vanilla to the SD card and have the Guruplug boot from that.  After many tries (and many failures) I decided to put everything back the way it was and try again from the beginning.  I was in the process of reverting everything back to the defaults, putting rootfs.ubi.img back on it as stated in the tutorial from http://www.myownhomeserver.ch/en/reset  After I issued the final commands:

tftp 0x6400000 uboot.bin
nand erase 0x0 0x100000
nand write.e 0x6400000 0x0 0x100000

The device stopped booting.  When I monitor the bootup process (or lack there of) through Putty, this is what I see:


I tried to reflash the bootloader through ESIA, but got this:



After ESIA failed to work I went on to the sheevaplug-installer-v1.0
At first I was getting this error:

Info : JTAG tap: feroceon.cpu tap/device found: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu              got: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu  expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Error: trying to validate configured JTAG chain anyway...
Error: unexpected Feroceon EICE version signature
Error: unexpected Feroceon EICE version signature
Error: timed out while waiting for target halted
Runtime error, file "openocd\config\board\sheevaplug.cfg", line 21:
     ****       openocd FAILED
 ****   Is the mini USB cable connected?
 ****   Try powering down, then replugging the Sheevaplug


I was able to fix this error by downloading cygwin, libftdi-0.16, and openocd-0.4.0 and compiling a new openocd.exe

Once the new openocd.exe was copied to the uboot\openocd directory I then receive this:

Info : clock speed 2000 kHz
Info : JTAG tap: feroceon.cpu tap/device found: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Warn : JTAG tap: feroceon.cpu       UNEXPECTED: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu  expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Warn : Unexpected idcode after end of chain: 32 0x00000007
Warn : Unexpected idcode after end of chain: 64 0x0000007f
Warn : Unexpected idcode after end of chain: 96 0x0000007f
Warn : Unexpected idcode after end of chain: 128 0x0000007f
Warn : Unexpected idcode after end of chain: 160 0x0000007f
Warn : Unexpected idcode after end of chain: 192 0x0000007f
Warn : Unexpected idcode after end of chain: 224 0x0000007f
Warn : Unexpected idcode after end of chain: 256 0x0000007f
Warn : Unexpected idcode after end of chain: 288 0x0000007f
Warn : Unexpected idcode after end of chain: 320 0x0000007f
Warn : Unexpected idcode after end of chain: 352 0x0000007f
Warn : Unexpected idcode after end of chain: 384 0x0000007f
Warn : Unexpected idcode after end of chain: 416 0x0000007f
Warn : Unexpected idcode after end of chain: 448 0x0000007f
Warn : Unexpected idcode after end of chain: 480 0x0000007f
Warn : Unexpected idcode after end of chain: 512 0x0000007f
Warn : Unexpected idcode after end of chain: 544 0x0000007f
Warn : Unexpected idcode after end of chain: 576 0x0000007f
Warn : Unexpected idcode after end of chain: 608 0x0000007f
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Info : JTAG tap: feroceon.cpu tap/device found: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Warn : JTAG tap: feroceon.cpu       UNEXPECTED: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu  expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Warn : Unexpected idcode after end of chain: 32 0x00000007
Warn : Unexpected idcode after end of chain: 64 0x0000007f
Warn : Unexpected idcode after end of chain: 96 0x0000007f
Warn : Unexpected idcode after end of chain: 128 0x0000007f
Warn : Unexpected idcode after end of chain: 160 0x0000007f
Warn : Unexpected idcode after end of chain: 192 0x0000007f
Warn : Unexpected idcode after end of chain: 224 0x0000007f
Warn : Unexpected idcode after end of chain: 256 0x0000007f
Warn : Unexpected idcode after end of chain: 288 0x0000007f
Warn : Unexpected idcode after end of chain: 320 0x0000007f
Warn : Unexpected idcode after end of chain: 352 0x0000007f
Warn : Unexpected idcode after end of chain: 384 0x0000007f
Warn : Unexpected idcode after end of chain: 416 0x0000007f
Warn : Unexpected idcode after end of chain: 448 0x0000007f
Warn : Unexpected idcode after end of chain: 480 0x0000007f
Warn : Unexpected idcode after end of chain: 512 0x0000007f
Warn : Unexpected idcode after end of chain: 544 0x0000007f
Warn : Unexpected idcode after end of chain: 576 0x0000007f
Warn : Unexpected idcode after end of chain: 608 0x0000007f
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Warn : target was in unknown state when halt was requested
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
Command handler execution failed
 ****   openocd FAILED
 ****   Is the mini USB cable connected?
 ****   Try powering down, then replugging the Sheevaplug

 
This is where I am currently stuck.  I've changed USB cables, switched USB ports, used Windows XP (main system) and a Linux VM (Debian), and tried the "unplug it, plug it back in, and then run runme.exe nand"

I've also edited my interface sheevaplug.cfg, uboot-dflt.txt, and uboot-nand-custom.txt to reflect my settings including the MAC address (MAC1) of the device.

While searching through the forum I found a lot of info on how to fix it, but nothing has helped yet.  Is there anything else I haven't tried?  Any help would be greatly appreciated.
Logged

psycholand
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #1 on: November 07, 2010, 08:18:35 PM »

Nobody can help with this?

Since my last post I've tried even more ways to try and resurrect my Guruplugs.

* I've used guruplug-installer.
* I've tried downloading different versions of openocd.
* I've tried compiling different versions of openocd.
* I've tried openocd in Windows and Linux (Debian).
* I've used openocd to connect to the Guruplug and telnet into openocd on port 4444.

When I telnet in I can issue the init command with no problems, but when I try sheevaplug_init I get:

Code:
> sheevaplug_init
unexpected Feroceon EICE version signature
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'wait_halt' called at file "config\board\sheevaplug.cfg", line 21
in procedure 'sheevaplug_init'
>

I was able to get it to:
Code:
target halted in ARM state due to debug-request, current mode: Supervisor
at least a few times, but at the time I had no idea what to do then aside from:
Code:
load_image uboot.bin 0x800000
resume 0x800200
which did a whole lot of nothing.

I've read posts in this forum and in others of how so many people have been able to fix a plug with uboot issues.  Are mine too far gone?  Should I just accept the fact that I have 2 $130 paper weights?

It's so frustrating feeling that I'm so close and yet so far away.
Logged

psycholand
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #2 on: November 07, 2010, 08:34:25 PM »

After my post a few minutes ago, I decided to give it one more try before bed.  This is what I got:

Code:
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'halt' called at file "command.c", line 650
called at file "command.c", line 361
invalid mode value encountered 3
cpsr contains invalid mode value - communication failure
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x3fffbff8
MMU: disabled, D-Cache: disabled, I-Cache: enabled
invalid mode value encountered 3
cpsr contains invalid mode value - communication failure
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x3fff80e0
MMU: disabled, D-Cache: disabled, I-Cache: disabled
invalid mode value encountered 3
cpsr contains invalid mode value - communication failure
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x7fff0358
MMU: disabled, D-Cache: disabled, I-Cache: enabled
invalid mode value encountered 3
cpsr contains invalid mode value - communication failure
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff004c
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> halt
> sheevaplug_reset_cpu
r1 (/32): 0x00000000
r2 (/32): 0x00000000
r3 (/32): 0x00000000
r4 (/32): 0x00000000
r5 (/32): 0x00000000
r6 (/32): 0x00000000
r7 (/32): 0x00000000
r8 (/32): 0x00000000
r9 (/32): 0x00000000
r10 (/32): 0x00000000
r11 (/32): 0x00000000
r12 (/32): 0x00000000
sp_usr (/32): 0x00000000
lr_usr (/32): 0x00000000
pc (/32): 0x00000000
cpsr (/32): 0x00000013
r8_fiq (/32): 0x00000000
r9_fiq (/32): 0x00000000
r10_fiq (/32): 0x00000000
r11_fiq (/32): 0x00000000
r12_fiq (/32): 0x00000000
sp_fiq (/32): 0x00000000
lr_fiq (/32): 0x00000000
spsr_fiq (/32): 0x00000000
sp_svc (/32): 0x00000000
lr_svc (/32): 0x00000000
spsr_svc (/32): 0x00000000
sp_abt (/32): 0x00000000
lr_abt (/32): 0x00000000
spsr_abt (/32): 0x00000000
sp_irq (/32): 0x00000000
lr_irq (/32): 0x00000000
spsr_irq (/32): 0x00000000
sp_und (/32): 0x00000000
lr_und (/32): 0x00000000
spsr_und (/32): 0x00000000
> sheevaplug_reflash_uboot
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
erased blocks 0 to 5 on NAND flash device #0 'NAND 512MiB 3,3V 8-bit'
DCC write failed, expected end address 0x10000814 got 0x10000014
Unable to write data to NAND device
failed writing file uboot.bin to NAND flash 0 at offset 0x00000000
> sheevaplug_reflash_uboot_env
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
erased blocks 5 to 7 on NAND flash device #0 'NAND 512MiB 3,3V 8-bit'
DCC write failed, expected end address 0x10000054 got 0x1000004c
Unable to write OOB data to NAND device
failed writing file uboot-env.bin to NAND flash 0 at offset 0x000a0000
> load_image uboot.bin 0x800000
target not halted
Command handler execution failed
in procedure 'load_image' called at file "command.c", line 650
called at file "command.c", line 361
> halt
target state: halted
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x400000f3 pc: 0xffff0a42
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> load_image uboot.bin 0x800000
DCC write failed, expected end address 0x0082be4c got 0x800000
Command handler execution failed
in procedure 'load_image' called at file "command.c", line 650
called at file "command.c", line 361
> sheevaplug_init
ftdi_write_data: usb bulk write failed
couldn't write MPSSE commands to FT2232
TRST/SRST error -104
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'sheevaplug_init' called at file "command.c", line 650
in procedure 'wait_halt' called at file "board\sheevaplug.cfg", line 27
called at file "command.c", line 361
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'halt' called at file "command.c", line 650
called at file "command.c", line 361
>


This is the contents of sheevaplug_reset_cpu

Code:
proc sheevaplug_reset_cpu { } {

# System and User mode registers
#   r0: 00000000       r1: 00000000       r2: 00000000       r3: 00000000
#   r4: 00000000       r5: 00000000       r6: 00000000       r7: 00000000
#   r8: 00000000       r9: 00000000      r10: 00000000      r11: 00000000
# r12: 00000000   sp_usr: 7dddee86   lr_usr: dffebe46       pc: ffff0a42
# cpsr: 400000f3

reg r1 0
reg r2 0
reg r3 0
reg r4 0
reg r5 0
reg r6 0
reg r7 0
reg r8 0
reg r9 0
reg r10 0
reg r11 0
reg r12 0
reg sp_usr 0
reg lr_usr 0
reg pc 0
# Set the CPU in Supervisor mode
reg cpsr 0x13

# FIQ mode shadow registers
#   r8_fiq: fbcfff64   r9_fiq: d7dfafd6  r10_fiq: 1fff6d2e  r11_fiq: 1db65df4
# r12_fiq: ff5a6de4   sp_fiq: 745fe7d5   lr_fiq: 89f7ae3e spsr_fiq: 00000000

reg r8_fiq 0
reg r9_fiq 0
reg r10_fiq 0
reg r11_fiq 0
reg r12_fiq 0
reg sp_fiq 0
reg lr_fiq 0
reg spsr_fiq 0

# Supervisor mode shadow registers
#   sp_svc: fffeff84   lr_svc: ffff0a43 spsr_svc: 00000000

reg sp_svc 0
reg lr_svc 0
reg spsr_svc 0

# Abort mode shadow registers
#   sp_abt: 51fe66f7   lr_abt: d7abaef7 spsr_abt: 00000000

reg sp_abt 0
reg lr_abt 0
reg spsr_abt 0

# IRQ mode shadow registers
#   sp_irq: 7fdb4ed5   lr_irq: 6d41122e spsr_irq: 00000000

reg sp_irq 0
reg lr_irq 0
reg spsr_irq 0

# Undefined instruction mode shadow registers
#   sp_und: 75ffef7e   lr_und: d75b6cd1 spsr_und: 00000000

reg sp_und 0
reg lr_und 0
reg spsr_und 0

}
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #3 on: November 08, 2010, 09:36:06 AM »

Hi, I am interesting in research on this topic.

First to declare I am no expert in openocd or plug's firmware.

In the past I have tried play around the u-boot code to a degree of success and I come up an idea to create a bootable installation CD but ran in to the problems with openocd interactive with plug. In my test I have similar problem as you have encounter so I did a little research on openocd. it is my understanding the very first step to get things work you need to sync between hardware and openocd internal state. that is when you see the message "Error: JTAG tap: feroceon.cpu  expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)" it is saying it can not identify the JTAG builded with cpu. without this the openocd can not be sure how to setup hardware pin signal to actually put cpu in halt state. So unless you can acquire this any further command is pointless.

In my test the most easy way to get the JTAG sync state is at power on stage. So you can try first pull the power cord off then get openocd ready at commnad line, plug in power cord then press enter and command line to start openocd. if this failed then try to run openocd a few more times without unplug power cord to see if you can get luck to a sync.

Once synced you can begin the flush u-boot to NAND, I would advise don't do this too often since NAND life is limited doing too many flush will reduce your plug overall life line.

I wish to find a way to consistently attach openocd to plug in sync state have yet found any solutions, so if you find something interesting please let me know I will be really appreciate your input. 

I am curious where did you get the sheevaplug_reset_cpu() procedure can you let me know?

Good luck Smiley
Logged

Good Luck Smiley

psycholand
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #4 on: November 08, 2010, 11:25:21 AM »

I modified the proc dockstar_reset_cpu that I found here http://www.plugapps.com/forum/viewtopic.php?f=18&t=195&start=20
Logged

psycholand
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #5 on: November 08, 2010, 08:23:09 PM »

Assuming that I can get my JTAG to be recognized and that I can get the NAND into the halted state, what commands/files be needed to reflash the plug?  I've found so many different ways on a lot of different web sites that I'm not 100% sure what exactly needs to be done.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #6 on: November 09, 2010, 08:42:08 AM »

Nothing special, just get the sheeva-installer openocd configuration files.

From your output I think you already have them. So as long as you did not modify the contents of the configuration files. You can use command in this sequence "init" "sheevaplug_reflash_uboot_env" "sheevaplug_reflash_uboot" "exit"

Good luck Smiley
Logged

Good Luck Smiley

ssoler
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #7 on: July 21, 2011, 12:48:34 AM »

Hello, I have also a bricked guruplug server. I've tried many times (more as 100) to reflash with flipflip u-boot.kwb. I tried also the load of uboot.elf. But I never got any good results. I can achieve 3 different outputs:


OUTPUT 1 (script run too late):
Code:
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer# ./runme.sh ../guruplug-u-boot-flipflip-20101111/u-boot.kwb
 ****     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
Info : JTAG tap: feroceon.cpu tap/device found: 0xfc0000e3 (Manufacturer: 0x071, Part: 0xc000, Version: 0xf)
Error: JTAG tap: feroceon.cpu             got: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Error: trying to validate configured JTAG chain anyway...
Error: unknown EmbeddedICE version (comms ctrl: 0x00000008)
Error: unexpected Feroceon EICE version signature
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: unexpected Feroceon EICE version signature
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
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer#

OUTPUT 2 (script run too early):
Code:
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer# ./runme.sh ../guruplug-u-boot-flipflip-20101111/u-boot.kwb
 ****     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
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
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer#

OUTPUT 3 (script sync):
Code:
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer# ./runme.sh ../guruplug-u-boot-flipflip-20101111/u-boot.kwb
 ****     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
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (Manufacturer: 0x1e9, Part: 0x0a02, Version: 0x2)
Info : JTAG Tap/device matched
Error: unknown EmbeddedICE version (comms ctrl: 0x00000018)
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: 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
root@ssoler-MS-1057:/home/ssoler/Downloads/guruplug-installer#


Every time the script runs when the plug is on the device resets due to the JTAG-reset command, you can see it in the ETH connector leds. I don't understand where can be my problem. Had someone the same outputs? Know anyone how to fix it?

HELP PLS
« Last Edit: July 21, 2011, 12:50:15 AM by ssoler » Logged

Pages: [1]
Print
Jump to: