• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: [HELP] Guruplug bricked after kernel upgrade  (Read 10903 times)
pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« on: January 10, 2011, 12:59:10 AM »

Hi,

 I tried to upgrade my shiny and nice guruplug with the new kernel 2.6.35.10, following this topic http://plugcomputer.org/plugforum/index.php?topic=4158.0.

 This seemed to be a bad decission, because now my guruplug is bricked!!!. First my fault was to copy the upgrading script to a temporary directory under /tmp, so when the upgrade script finished and I restarted the plug, the boot was stuck here :

Code:
U-Boot 2009.11-rc1-00602-g28a9c08-dirty (Feb 09 2010 - 18:15:21)
Marvell-Plug2L

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MB
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0
*** ERROR: `ipaddr' not set
ping failed; host 192.168.2.1 is not alive
No link on egiga1
*** ERROR: `ipaddr' not set
ping failed; host 192.168.2.1 is not alive
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
1 Storage Device(s) found

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.35.10
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2820480 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.


 After reading lots of topics, I decided to do some changes to get my plug back to life again, but in one of this tests while modifying the setenv variables (bootcmd to be more accurate), the plug rebooted for the last time and then I loose communication. I'm using the JTAG and since this, I'm not able to enter in the 'Marvell' prompt.
 I dowloaded ESIA in order to try reflashing the nand, but I get this error:

Code:
Open On-Chip Debugger 0.2.0 (2009-07-27-16:41) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
2000 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
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...
Error: unexpected Feroceon EICE version signature
Error: timed out while waiting for target halted
Runtime error, file "C:\Program Files\ESIA\uboot\openocd\config/board\sheevaplug.cfg", line 21:

 Please, help me!. I would like to have my guruplug working again. It's (or it was) the core of my home surveillance system!!!!

 Is my guruplug completely dead or it's possible to unbrick it even with no JTAG communication?.

Thanks in advance,

PacoLM
« Last Edit: January 10, 2011, 01:00:59 AM by pacolm » Logged

richard
Newbie
*

Karma: 0
Posts: 12


View Profile
« Reply #1 on: January 10, 2011, 08:52:56 AM »

Hi PacoLM

I've been in the exact same position as you thinking that my plug was dead.
However if you have a JTAG module you should be ok , you just need to use the GuruPlug installer
http://www.plugcomputer.org/index.php/us/resources/downloads?func=fileinfo&id=65

to copy an uboot image on the plug which you can get from here:
http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=15

This guide is excellent for getting the plug back to the factory settings:
http://www.plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug

Personally I've installed a newer u-boot on my plug as the factory default will not boot a mainline Linux kernel.

Regards

Rich
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #2 on: January 10, 2011, 08:58:33 AM »

Hi Rich,

 Thanks for the quick reply, I downloaded all the files and read the guide, but I'm stuck in the beginning....I do not have communication using the JTAG. You mentioned that you had the same problem. What did you do to enable communication using JTAG?.

 Regards,

 PacoLM

EDIT: OK, once at home, I will try to run the script runme.sh in my ubuntu computer.
« Last Edit: January 10, 2011, 09:01:35 AM by pacolm » Logged

radael
Jr. Member
**

Karma: 1
Posts: 57


View Profile
« Reply #3 on: January 10, 2011, 12:08:13 PM »

Agreeing with Richard's comments.  The runme.sh should, at the least, restore the serial connection and bootloader access.
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #4 on: January 10, 2011, 01:14:34 PM »

Hi,

 When running the runme.sh script this is the output of the terminal:

Code:
****     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

And this is the output of the dmesg after disconnecting and connecting the Jtag:

Code:
[90414.955169] ftdi_sio 1-1.1:1.1: device disconnected
[90419.264104] usb 1-1.1: new full speed USB device using ehci_hcd and address 10
[90419.383123] usb 1-1.1: Ignoring serial port reserved for JTAG
[90419.386704] ftdi_sio 1-1.1:1.1: FTDI USB Serial Device converter detected
[90419.386770] usb 1-1.1: Detected FT2232C
[90419.386777] usb 1-1.1: Number of endpoints 2
[90419.386784] usb 1-1.1: Endpoint 1 MaxPacketSize 64
[90419.386789] usb 1-1.1: Endpoint 2 MaxPacketSize 64
[90419.386795] usb 1-1.1: Setting MaxPacketSize 64
[90419.390829] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0

 I'll try to reset the computer and repeat the process, just in case the serial port is being used by another process, but I doubt it, because I'm getting the same error that I got when running the ESIA application under WXP.

 Regards,

PacoLM
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #5 on: January 10, 2011, 01:24:47 PM »

No progress after rebooting the computer...snifff!

Any clue?.

PacoLM
Logged

richard
Newbie
*

Karma: 0
Posts: 12


View Profile
« Reply #6 on: January 10, 2011, 03:43:31 PM »

Hi

Have you checked the jtag cables?

Executing runme.sh just worked for me.

Rich
Logged

radael
Jr. Member
**

Karma: 1
Posts: 57


View Profile
« Reply #7 on: January 10, 2011, 06:05:59 PM »

Doesn't look like it give a complete solution, but there's another thread on EICE failure:

http://plugcomputer.org/plugforum/index.php?topic=2110.0

and, another one where the problem seems to have been resolved:

http://plugcomputer.org/plugforum/index.php?topic=3901.0 . . . "What a frustrating little device."

This seems to be a problem with the Guruplug, any information you could provide on the sequence of events which lead to results might be helpful to others.  (Maybe even give a clue that someone might use to get the "final fix.")
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #8 on: January 10, 2011, 10:55:19 PM »

Hi radael,

 You're the man!. After several tries, I was able to get the jtag communicating with the guruplug and the process finished as expected, but the console didn't opened. I repeated the same process but this time using this files instead -> http://www.plugcomputer.org/plugwiki/index.php/File:Guruplug-installer.tar.gz.

 Now the guruplug console starts, but complains about the kernel image:

Code:
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)
Marvell-GuruPlug

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MB
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0
No link on egiga0
No link on egiga1
ping failed; host 192.168.2.1 is not alive
No link on egiga1
No link on egiga0
ping failed; host 192.168.2.1 is not alive
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
1 Storage Device(s) found

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

This is the printenv listing:

Code:
bootdelay=3
baudrate=115200
x_bootcmd_usb=usb start
ethaddr=00:50:43:67:64:06
eth1addr=00:50:43:67:64:07
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootargs=console=ttyS0,115200
x_bootcmd_ethernet1=set ethact egiga1
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd=$(x_bootcmd_ethernet); $(x_bootcmd_ethernet1); $(x_bootcmd_ethernet); $(x_bootcmd_usb); $(x_bootcmd_kernel); setenv bootargs $(x_bootargs) $(x_bootargs_root) ;bootm 0x6400000;
bootcmd=run x_bootcmd
stdin=serial
stdout=serial
stderr=serial
ethact=egiga1
bootargs=console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs

Environment size: 665/131068 bytes

Note to self:  remember to rewrite the nand with the proper mac address of my plug....

 What's the next step? -> http://www.plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug ?

Thanks a lot to all the people who bricked its plug and helped other users to get his plug back to life!

PacoLM


 
Logged

radael
Jr. Member
**

Karma: 1
Posts: 57


View Profile
« Reply #9 on: January 11, 2011, 02:40:42 AM »

Hey PacoLM,

You're too kind, I don't deserve any credit.  (Big sigh of relief over here, too.)

Okay, so it looks like that original script, with the "nandwrite" managed to trash your kernel.  I still don't know what happened to the U-Boot variables, but we got bootloader, so that makes things much easier.

We have not see the output of the script, but it seems as if it went to completion.  In that mode, the last thing the script does is "try" to reflash the kernel. . .  So, that means the modules for the new kernel were probably installed into your /lib directory.

I agree, the best bet seems to follow part of the instructions at http://www.plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug , but I would suggest only one part at at time.

1. I would first only "Burn the Kernel image"  and then try to reboot the system.
    (If you can't bring up a TFTP server, the same thing can be done from USB or SD Card.)

1.a. If the boot fails because of the file system, then follow the step "Burn the Rootfs image"

1.b. If the boot fails because of the kernel, then maybe the U-Boot must be updated ( http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=15 )

Once the factory kernel is booting again, then we can reconsider options for a kernel upgrade.

--------

There is something in your U-Boot variables and also on that page http://www.plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug  that is a curiosity.  It is this line:

x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000

This line seems to tell U-Boot to load the kernel from Flash into RAM address 0x6400000.  That is 100 MB from the base of the RAM.
This looks like someone used 0x6400000 as a location for a tftpboot command, and then mistakenly copied it into x_bootcmd_kernel and x_bootcmd.

The first few lines U-Boot prints after a reboot should say something about addresses  0x800000 - 0x0 being saved for U-Boot.  This means that the first 8 MB of memory is reserved for the bootloader, and nothing should be loaded into any address lower than 0x800000.  So, normally, the kernel is loaded into the next available address, 0x800000.

At least one person with a Guruplug is loading the kernel into this address: http://plugcomputer.org/plugforum/index.php?topic=1722.msg11467#msg11467 .

It is theoretically possible that the memory manager can handle empty RAM both below and above the kernel.  But, it would not be surprising if that 92 MB between the boot loader and the kernel was unavailable.

When you get into your system again, shortly after the boot, why don't you try the command   free  from the root login.

If the system memory seems unexpectedly low, it should be easy to fix and just as easy to back out if needed.

(If you change the one 0x6400000, then the second one must also be changed.)
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #10 on: January 11, 2011, 03:32:24 PM »

Hi,

 Here again, and I believe I found the guilty of all my pain....a cable of the JTAG. Seems that there's a bad contact that sometimes interrupt the communication. Even that, I was able to flash the uboot, but I'm stuck in the tftp process!.

 I have set :

 setenv serverip 192.168.1.33 // ip of my computer
 setenv ipaddr 192.168.1.43 // ip of guruplug

After this I could ping from the computer to the guruplug, when pinging from guruplug to the computer I get this :
Using egiga0 device                                                             
host 192.168.1.33 is alive

So looks like the connection it's ok.

 Could someone explain me how to  send the file. I have read some posts/googled and I think I have to open a tftp session in my computer and send the file (put 'filename') and in the other way, run the command 'tftp 0x6400000 <filename' and wait till the process has finished, but this is the output of the guruplug console:

Code:
Marvell>> tftp 0x6400000 uImage-guruplug                                       
Using egiga0 device                                                             
TFTP from server 192.168.1.33; our IP address is 192.168.1.43                   
Filename 'uImage-guruplug'.                                                     
Load address: 0x6400000                                                         
Loading: T T T T T T T T T T                                                   
Retry count exceeded; starting again                                           
No link on egiga1                                                               
Using egiga0 device                                                             
TFTP from server 192.168.1.33; our IP address is 192.168.1.43                   
Filename 'uImage-guruplug'.                                                     
Load address: 0x6400000                                                         
Loading: T T T T T T T T T T

And I could wait for hours, but nothing happens, in fact, the 'T' is like a timeout, isn't it.

 Sorry, but I'm a newbie on this, and I need a little more help....

Thanks in advance,

PacoLM

Logged

rickyleeb
Newbie
*

Karma: 0
Posts: 35


View Profile
« Reply #11 on: January 11, 2011, 05:24:10 PM »

I would advise you to follow this guide through I find it very useful:

http://bzed.de/posts/2010/05/installing_debian_on_the_guruplug_server_plus/
Logged

radael
Jr. Member
**

Karma: 1
Posts: 57


View Profile
« Reply #12 on: January 11, 2011, 09:17:48 PM »

Check the U-Boot help, to check on the command syntax.  I've always used tftpboot.  It doesn't actually boot, the command only loads the image (some file) from the server into RAM as if it were going to boot.

setenv ipaddr  ?.?.?.?
setenv serverip ?.?.?.?

tftpboot 0x6400000 uImage

( Here, the 0x6400000 could be any address >= 0x800000 )

After that, you may want to check the image header

imi  0x6400000

Finally, you would need to write the image to Flash

nand errase 0x100000 0x400000
nand write.e  0x6400000  0x100000  0x400000



« Last Edit: January 11, 2011, 09:22:31 PM by radael » Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #13 on: January 12, 2011, 05:59:49 AM »

I would advise you to follow this guide through I find it very useful:

http://bzed.de/posts/2010/05/installing_debian_on_the_guruplug_server_plus/

I used this article with 100% succes.

ONLY...... when you want to install the 35.10 kernel it hopelessly crashes while trying to find /lib/modules

I also tried ESIA but that just wrecked my plug for now with a big dark console doing nothing.......... well........ nothing actually
Logged

pacolm
Full Member
***

Karma: 1
Posts: 102


View Profile
« Reply #14 on: January 12, 2011, 11:43:35 PM »

Hi,

 After two days struggling with this, reading the posts, ubooting, kerneling, resetting.... still no success but I'm on the way. This morning before coming to work, the guruplug passed the uboot process uncompressed the kernel and know I'm getting another error. I will add it to the post this afternoon.
 Good news is a little advance, bad news is none of the processes listed in the post worked. I will send also the details. Arriving to this point has been frustrating for me!.

 Thanks!,

PacoLM
Logged

Pages: [1] 2
Print
Jump to: