Dockstar Debricking - JTAG with BusPirate

I recently bricked my Seagate Dockstar, so I had to use JTAG to restore it...
At the time, I didn't have any JTAG adapter. I tried with a parport Wiggler, but without the correct chip (I only had 74HC244, instead of 74LS244) it didn't work. So I bought a BusPirate (from Sparkfun). And so, here's the story of the Dockstar...


By following these steps, you agree that I can't be held for responsible if your Dockstar happened to be really broken or if you break it during the process I describe. I'm just writing my experience in case it could help someone (or me later) but I'm not responsible if things go wrong. Don't screw up, read all the process first, don't try hazardous things, if you have questions, ask first...

Here we go !

There are some preliminary steps as the BusPirate received from Sparkfun didn't have OpenOCD JTAG capabilities. There shouldn't be any error or timeout during the JTAG steps. Check everything if you have any.

  • Upgrade the BusPirate Bootloader to v4 and Firmware to v4.1
    python2.7 ./ -s /dev/ttyUSB0 -i -v
    python2.7 ./ -s /dev/ttyUSB0 -i -v -a ./BPv3-v2blupdaterVa3-v4.1.hex 
    cu -l /dev/ttyUSB0 -s 115200
    ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=/home/redox/v4firmware/BPv3-Firmware-v4.1.hex
  • Upgrade the BusPirate Bootloader to v4.3 and Firmware to v5.8 with the pirate_loader tool.
  • Now, the Buspirate is ready to be an OpenOCD adapter
  • Compile OpenOCD from GIT, with option --enable-bus-pirate
  • Configure OpenOCD buspirate.cfg. Here's mine:
    interface buspirate
    buspirate_port /dev/ttyUSB0
    buspirate_speed fast
    buspirate_vreg 0
    buspirate_mode open-drain
    buspirate_pullup 0
    reset_config srst_only
  • Do some changes in dockstar.cfg
    Here's mine (adapted from Kragorn's original file): dockstar.cfg
  • Connect the BusPirate and the Serial Adapter to the Dockstar's JTAG header
    Dockstar -- Bus Pirate (Wire colors from Sparkfun cable)
    01 - NC
    02 - Aux (Green)
    03 - TDI (Orange)
    04 - TMS (Red)
    05 - TCK (Yellow)
    06 - TDO (Brown)
    07 - NC
    08 - TXD of the Serial Adapter
    09 - RXD of the Serial Adapter
    10 - GND (Black)?
  • Plug the Dockstar power supply
  • Plug the BusPirate and the Serial Adapter
  • Start OpenOCD server
    openocd -f ./dockstar.cfg
  • Open an other Term and connect by telnet to the server
    telnet localhost 4444
  • Open an other Term and open the serial connection
    cu -s 115200 -l /dev/ttyUSB1
  • Download a valid uBoot mtd0 image, renamed in uboot.kwb (easier to type later). I used this one (from Jeff Doozan): Link
  • In the telnet term:
    • Type "init" then press Enter
    • Type "halt" then hold the Dockstar's reset button, then press Enter, then release the button
    • The Dockstar should be halted
    • Type "dockstar_init" then press Enter
    • Type "load_image uboot.kwb 0x800000" then press Enter and wait ~ 90sec
    • Type "resume 0x800200" then press Enter, the Dockstar should be booting now...
  • In the serial terminal:
    • Hit a key to stop the boot process
    • Type "nand write.e 0x800000 0x0 0x80000" then press Enter to restore uBoot in Nand
    • When it's done, type" reset", press Enter, you should see your dockstar booting correctly
  • You should now be able to recover/reinstall your Dockstar by Tftp as already well explained on the Internet



Par murpf le jeudi 07 février 2013 à 14:29

hey, i used a seeedstudio cable, but i can't get it to halt in ARM state. Everytime its just in thumb mode where it can't access nand. Is there a better way to get into ARM mode (tried the reset-halt approach at least a hundred times...)


Par RedoX le dimanche 02 octobre 2011 à 09:54

J'avoue ne pas avoir assez de connaissances dans ce domaine pour avoir remarqué ça, et ca fonctionnait tel quel ^^

Merci pour cette modification. C'est corrigé :)

Par exxos le jeudi 29 septembre 2011 à 00:00

Il y a une petit erreur dans le fichier de dockstar.cfg

$_TARGETNAME configure \
-work-area-phys 0x100000 \
-work-area-size 65536 \
-work-area-backup 0


Par Charles le mardi 14 juin 2011 à 11:46

Thank you very much for this howto, I just resurrected my Dockstar \o/

I just encountered one problem: I was plugging the serial adapter first, before the buspirate, so the buspirate got the device ID /dev/ttyUSB1, I modified the buspirate.cfg to reflect this change, but I continualy got errors when trying to hald the dockstar.
Plugging the buspirate first (and in another USB port, don't know if this matters) so that he was recognised under /dev/ttyUSB0 solved the problems.
Looks strange (software bug ? or brain bug ?), but it worked...

Par RedoX le samedi 04 juin 2011 à 22:32

Glad it's useful.


Par jasonldf le lundi 23 mai 2011 à 02:24

Thanks, these steps reserrected my dockstar. I had to vary the color code as I was using SeeedStudio Bus Pirate cable and I did a nand erase as my problem was a corrupted uboot environment but the steps worked for me as well

Par RedoX le dimanche 10 avril 2011 à 11:49

I think you have this problem because your buspirate.cfg is not correct (should be in /usr/share/openocd/scripts/interface).Check your parameters.

I have the same problem if I remove the line buspirate_port in my config file.

Else, without being connected to the dockstar, you should have this kind of result:

[redox@RedoX JTAG]$ openocd -f ./dockstar.cfg
Open On-Chip Debugger 0.5.0-dev-00746-g177fe9d (2011-02-11-20:57)
Licensed under GNU GPL v2
For bug reports, read
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
500 kHz
adapter_nsrst_delay: 500
Warn : use 'feroceon.cpu' as target identifier, not '0'
Error: Error reading data
Error: Buspirate error. Is is binary//OpenOCD support enabled?

Par md le dimanche 10 avril 2011 à 10:21

thank you for this excellent tutorial, I have hit a bump though, when I try to run the last "openocd -f ./dockstar.cfg" it appears to run but stops with

Warn : use 'feroceon.cpu' as target identifier, not '0'
Error: You need to specify port !
in procedure 'init'

does this mean my buspirate.cfg is wrong? I'm not sure what it's catching on

Fil Rss des commentaires de cet article

Ecrire un commentaire

 Se rappeler de moi sur ce site

Entrez le code de l'image :