New IT forum
24 April 2014, 06:03:55 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: MiraBox now in stock.
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Unbricking - Sheevaplug / Dreamplug / Guruplug / OpenRD  (Read 11476 times)
NewITMalcolm
Administrator
Sr. Member
*****
Posts: 394


« on: 14 December 2011, 09:56:25 pm »

These instructions should get you from a Bricked Sheeva/Dream/Guru/OpenRD to getting uboot running in Ram ready to restore your system from USB/TFTP.

I am assuming you are using a Linux PC to run Openocd.

Firstly install the packages required.
Code:
sudo apt-get install openocd telnet screen

Connect & Power up your device with the mini usb cable and jtag(Dreamplug & Guruplug).

Open a terminal session and connect to the plug console.
Code:
screen /dev/ttyUSB0 115200

Open a 2nd terminal session.

Select one of these for your device.
Code:
Marvell u-boot
wget http://www.downloadsnewit.co.uk/u-boot/recovery/sheevaplug/u-boot.elf
wget http://www.downloadsnewit.co.uk/u-boot/recovery/dreamplug/u-boot.elf

DENX u-boot
wget http://www.downloadsnewit.co.uk/u-boot/recovery/sheevaplug/denx/u-boot.elf
wget http://www.downloadsnewit.co.uk/u-boot/recovery/dreamplug/denx/u-boot.elf
wget http://www.downloadsnewit.co.uk/u-boot/recovery/guruplug/denx/u-boot.elf
wget http://www.downloadsnewit.co.uk/u-boot/recovery/openrd/denx/u-boot.elf

For Sheevaplug/ Dreamplug / Guruplug
Code:
sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg -s /usr/share/openocd/scripts

For OpenRD
Code:
sudo openocd -f /usr/share/openocd/scripts/board/openrd.cfg -s /usr/share/openocd/scripts

You should see output similar to this.
Quote
Open On-Chip Debugger 0.4.0 (2010-10-08-15:52)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.berlios.de/doc/doxygen/bugs.html
2000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
Warn : use 'feroceon.cpu' as target identifier, not '0'
Info : clock speed 2000 kHz
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit

If you are using a jtag and getting errors at this point replug or even swap jtag cables and retry.

Next open a 3rd terminal session.

Code:
telnet localhost 4444

Output should look like this.
Quote
$ telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>

For the Sheevaplug / Dreamplug / Guruplug
Code:
reset;sheevaplug_init;load_image u-boot.elf;resume 0x00600000

For the OpenRD
Code:
reset;openrd_init;load_image u-boot.elf;resume 0x00600000

Now you should see Uboot starting to run in the 1st terminal session and you are ready to start restoring your plug.
« Last Edit: 15 December 2011, 01:59:14 pm by NewIT_James » Logged

NewITJames
PacoLM
Full Member
***
Posts: 108


« Reply #1 on: 14 December 2011, 10:09:48 pm »

Just fantastic, good job! I would like to see the same level of support for each device I own...
Logged
Splatter
Newbie
*
Posts: 1


« Reply #2 on: 10 October 2012, 02:08:22 am »

Sorry to revive a post over a year old but I just made an account to post this.

First off thanks for this, I was able to get my plug back working temporarily using this guide it was great.

Only problem is is doesn't persist after a reboot. Blue light goes back off and the sheevaplug goes back to brick.  Is there another command I need to give the onchip debugger after the "reset;sheevaplug_init;load_image u-boot.elf;resume 0x00600000" command to make this persist?

I was using a Debian livecd so I only hade a command line & didn't use the screen command. Just hit the OpenOcd line with a & sign and then used telnet to reset the box to the new elf file.

Thanks!!
Logged
zurctrebla
Newbie
*
Posts: 1


« Reply #3 on: 29 November 2012, 04:54:52 pm »

Sorry to revive a post over a year old but I just made an account to post this.

I make all, but I don`t see nothing in 1st terminal, where is a error?

I was using a Ubuntu install on my notebook.

after the last step, how make?

Thanks!!

ps: sorry my poor English
Logged
jmeeks4u
Newbie
*
Posts: 6


« Reply #4 on: 21 February 2013, 04:00:14 pm »

Hello I'm new to the plug computing, but have I had a crash course over the last two weeks! Literally. My dreamplug is bricked. I've seem to have successfully dd images to my micro sd card,. but it won't boot. I can get all the way through the above mentioned process, but where do we go from there? I've tried to fatload, without success.
Logged
axel
Newbie
*
Posts: 5


« Reply #5 on: 31 May 2013, 08:10:32 pm »

Hi,

Sorry to revive a post over a year old but I just made an account to post this.
I make all, but I don`t see nothing in 1st terminal, where is a error?

I'm stuck here as well. I tried the process and nothing on the serial port.

The output of openocd is:
Code:
JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
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
149712 bytes written at address 0x00600000
downloaded 149712 bytes in 1.081951s (135.129 KiB/s)
Logged
EmJayArr
Newbie
*
Posts: 3


« Reply #6 on: 07 June 2013, 07:27:08 pm »

Sorry to revive a post over a year old but I just made an account to post this.

First off thanks for this, I was able to get my plug back working temporarily using this guide it was great.

Only problem is is doesn't persist after a reboot. Blue light goes back off and the sheevaplug goes back to brick.  Is there another command I need to give the onchip debugger after the "reset;sheevaplug_init;load_image u-boot.elf;resume 0x00600000" command to make this persist?

I was using a Debian livecd so I only hade a command line & didn't use the screen command. Just hit the OpenOcd line with a & sign and then used telnet to reset the box to the new elf file.

Thanks!!

The elf file is basically a "live" u-boot that you temporarily push to your device. I hope you've fixed it by now, but here's what I did on my Dreamplug after the last step (inserting the command into telnet) for anyone else wondering:

In terminal #1, stop the boot of the pushed u-boot.elf by pressing any key to get to the Marvell>> prompt.
Put a u-boot image named u-boot.kwb (such as the one from http://code.google.com/p/dreamplug/downloads/detail?name=dream_burn_spi.tar.bz2 in the testenv folder) on a thumb drive & plug in to Dreamplug. (Actually, you should probably do this first, before all of the first steps in the OP.)

At the Marvell>> prompt:
Code:
usb start
fatload usb 1:1 0x6400000 u-boot.kwb (you can use 'usb storage' to find the correct usb device & partition, 1:1 was correct for me)
sf probe 0
sf erase 0x0 0x100000
sf write 0x6400000 0 0xd0000
reset

Technically, 0xd0000 on the 'sf write' line should be the file size of u-boot.kwb in hex, eg: sf write 0x6400000 0x0 0x2FDEC, but it doesn't seem to matter. You'll also have to reset your u-boot environment variables using setenv (particularly ethaddr and eth1addr, at least, in my case).
You also should be able to push u-boot.kwb using JTAG or TFTP, but I hadn't been able to get that to work.

References (other than this thread):
http://www.newit.co.uk/forum/index.php/topic,2647.0.html
http://wiki.debian.org/FreedomBox/DreamPlug/Firmware
« Last Edit: 07 June 2013, 07:30:51 pm by EmJayArr » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!