DockStar JTAG

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: DockStar JTAG

Postby ygator » Wed Aug 18, 2010 10:11 pm

I found this http://jtag-bsdl.org/download.php, but there are no files for Marvell yet.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: DockStar JTAG

Postby Kragorn » Mon Aug 23, 2010 8:46 pm

I guess I won't be able to recover the dockstar,
I've received the adapter and plugged the cables. When the dockstar isn't powered, I got TDO seems to be stuck to 1 which seems to be normal. But when I power it up I got TDO seems to be stuck at 0.

Maybe I've done something wrong and I need to do something to put it into JTAG mode ?
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby bzboi » Mon Aug 23, 2010 8:57 pm

The link in your previous post doesn't look complete. Can you repost the link?
NEVERMIND, I figured out it was supposed to be http://www.tiaowiki.com/w/Universal_JTAG_User_Manual_(Parallel)

Based solely on the text of your previous post, I think your JTAG programmer does not have TRST#. I think you have to populate R166 with a 0402 4.7kohm pull-up resistor if you don't have a TRST# line.

In UrJTAG, I am able to get the following response using a Xilinx Parallel Cable III and R166/RP1 populated.
http://www.pastie.org/1110834
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby Kragorn » Tue Aug 24, 2010 6:06 am

Thank you for you response, I think there is a TRST in unbuffered mode in pin D5 and in buffered mode in Y5. Is n_TRST the same ? But in the dockstar JTAG pinouts it seems to have only a SRST ?

$this->bbcode_second_pass_code('', '
TCK TMS TDI RST ?
9 7 5 3 1
10 8 6 4 2
TDO SRST RX TX GND
')
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby bzboi » Tue Aug 24, 2010 12:47 pm

DockStar_JTAG.png
DockStar_JTAG.png (31.34 KiB) Viewed 10804 times

Your pin numbering is a little different, so I'm going to stick with the pin numbering from the pinout that Admin posted. PIN 2 is TRST. The chip has a weak pull-down on that pin, so if you don't have that lead connected and no external pull-up resistor, the JTAG interface will be held in reset. This is actually a protection mechanism to prevent unintended JTAG writes during operation. You should connect the unbuffered TRST output from your JTAG programmer to PIN 2.
JTAGpins.JPG
JTAGpins.JPG (47.43 KiB) Viewed 10799 times
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby Kragorn » Tue Aug 24, 2010 1:46 pm

Thank you for your response.

I've connected all the cables, including SRST and TRST to my JTAG adapter. It's configured in buffered mode (wiggler clone). I've successfully identified the CPU using urJTAG and OpenOCD. I used OpenOCD as it contains some scripts for the Sheevaplug. But I can't write to the flash, same error as previously reported : target not halted. However after some trials it says it sucessfully write to the flash, but it doesn't work (I took the uboot.original.mtd0 from Jeff).

I tried to load various uboot.bin images to the memory using load_image and then resume (or resume 0x600000) but again nothings.

Does anyone have successfully recovered a bricked dockstar ?

EDIT : No !!! It booted after several trials. I built the uboot using Jeff's newer uboot instruction on mtd0 and typed load_image u-boot.bin and the resume 0x0. And I got the folling in the console
$this->bbcode_second_pass_code('', '
U-Boot 2010.06-02130-g86cf2ae-dirty (Aug 24 2010 - 13:16:07)
Marvell-Sheevaplug

SoC: Kirkwood 88F6281_A0
DRAM: 128 MiB
NAND: 256 MiB
*** Warning - bad CRC or NAND, using default environment

In: serial
Out: serial
Err: serial
Net: egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0
(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... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1432436 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
4702627 bytes read
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-2.6.32-5
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1432372 Bytes = 1.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
Image Name: initramfs
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 4702563 Bytes = 4.5 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...
[ 0.907362] console [ttyS0] enabled
[ 0.911438] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 25
6MiB 3,3V 8-bit)
[ 0.920047] Scanning device for bad blocks
[ 0.955009] Bad eraseblock 831 at 0x0000067e0000
[ 0.962357] Bad eraseblock 904 at 0x000007100000
[ 0.977898] Bad eraseblock 1198 at 0x0000095c0000
[ 1.014087] Creating 3 MTD partitions on "orion_nand":
[ 1.019261] 0x000000000000-0x000000100000 : "u-boot"
[ 1.024816] 0x000000100000-0x000000500000 : "uImage"
[ 1.030301] 0x000000500000-0x000010000000 : "root"
...
Checking root file system...fsck from util-linux-ng 2.17.2
/dev/sda1 was not cleanly unmounted, check forced.
[ 17.9<0>[ 17.965364] InWarning... fsck.ext2 for device /dev/sda1 exited wit
h signal 11.
fsck died with exit status 8
failed (code 8).
An automatic file system check (fsck) of the root filesystem failed. A manual fs
ck must be performed, then the system restarted. The fsck should be performed in
maintenance mode with the root filesystem mounted in read-only mode. ...')

But as you can see, I got a little problem with the filesystem... and now I try to do the same things again but it doesn't work anymore ! I had hope when I saw all the lines in the console.. Now I'm wondering why it doesn't work anymore...
Last edited by Kragorn on Tue Aug 24, 2010 3:45 pm, edited 1 time in total.
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby ygator » Tue Aug 24, 2010 3:43 pm

$this->bbcode_second_pass_quote('Kragorn', 'H')owever after some trials it says it sucessfully write to the flash, but it doesn't work (I took the uboot.original.mtd0 from Jeff).


If there is a command to read the flash maybe you can use it just to see if it really did write to the flash.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: DockStar JTAG

Postby Kragorn » Wed Aug 25, 2010 7:53 am

I've still some troubles to unbrick my dockstar.

What I've done is build a new uboot using http://jeff.doozan.com/debian/uboot/build_uboot.htm (build replacement uboot). Then I got several u-boot* files.

Once I got those u-boot* files, I loaded them using the OpenOCD command "load_image u-boot" which loaded that elf file at 0x00600000. I then used resume 0x00600000. But nothings happenned.

Another try was to use "load_image u-boot.bin" which loaded it at 0x0 and then resume 0x0 but again it doesn't work. Maybe it's just the resume command which should take another value.

I've no ideas on what I can do. Plus now I've a little problem is that I can't probe the nand anymore it always says :
$this->bbcode_second_pass_code('', ' nand probe 0
unknown NAND flash device found, manufacturer id: 0x00 device id: 0x00
probing failed for NAND flash device')
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby Kragorn » Wed Aug 25, 2010 1:43 pm

Finally, I made it to work. It's pretty simple in fact.

I'll give you detailed steps so you can revive your Dockstar :
I've used the following on my Windows XP machine.

Get OpenOCD binaries at http://www.freddiechopin.info/index.php/en/download/category/4-openocd
Get uboot-original-mtd0.kwb at http://jeff.doozan.com/debian/uboot/uboot-original-mtd0.kwb or build you own using instructions at http://jeff.doozan.com/debian/uboot/.

Put the uboot file in Programs Files/OpenOCD/0.4.0/
Put dockstar.cfg in Programs Files/OpenOCD/0.4.0/board/ (see attachment)

Open a console and type openocd -f board/dockstar.cfg
Open another console and telnet to localhost 4444 and type :

init
sheevaplug_init
dockstar_reset_cpu
load_image uboot-original-mtd0.kwb 0x800000
resume 0x800200

and voilà you should see the green light.

NB : The attachment contains the configuration file for the dockstar using a wiggler cable. If you're using another cable, please change at the begining of the file the line which begin with "interface" according to your need.

Edit : I've juste one small problem, could someone dump the mtd0 using "nanddump -nf usb/mtd0 /dev/mtd0" please ? As I've "*** Warning - bad CRC or NAND, using default environment" when I restored the backup taken with dd.
Attachments
dockstar.zip
(1.9 KiB) Downloaded 3001 times
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby ygator » Thu Aug 26, 2010 12:00 am

Great Job Kragorn.

Can you go into details on what Jtag cable you used?
Where to buy it from?
Did it come with everything you need to hook to the dockstar?
How it hooks to the dockstar? Does it come with a 2x5 1mm spaced header?
etc...

What ended up being the problem when it did not work on your previous post?
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 8 guests