Bricked Gp2x, Need Sd Card Sensor Pinout


nubie

Recovering Jerk-A-Holic
Joined
Oct 19, 2005
Messages
2,749
Location
USA California
Website
Visit site
I have a Bricked GP2X, I have a Jtag and Serial cable for it. I made a big forum post about it before here, but nobody would say anything Orkie lost interest :).

I can get the Jtag to load the program and execute it, but no luck, it just displays colored lines for a couple milliseconds.

I am thinking it could be the SD card slot, It doesn't hold in the SD anymore and I am wondering if the sensor switches in it are damaged.

Specifically what are the functions of the extra pins on the SD socket so that I can attempt to verify that they work, and if they don't work possibly bypass them (I am ok with a jumper that makes it believe the SD is always in for example, or always unlocked, if the GP unbricks I can worry about that stuff later.)

Anybody? I do have a mini soldering iron, wrapping wire, Digital Multi-Meter (well I had better, considering I built this Jtag/Serial cable.)

I am able to load and run the unbrick software over Jtag, just nothing happens (and yes I waited).
 
Are you watching the serial output at the same time as using JTAG? You should get a percentage if it is working. Last time I unbricked a GP2X, it took me about 200 attempts to get it to work - so have fun! :D
 
The Previous topic is here so you can see what I have tried:

http://www.gp32x.de/board/index.php?showtopic=41006

nubie said:
Ok, so I went back to OCD commander and I got this output after running uboot.elf from JTAG:

QUOTE
U-Boot 1.0.0 (Mar 13 2006 - 12:54:22)

U-Boot code: 03F00000 -> 03F6A6A0 BSS: -> 03FA30CC
DRAM Configuration:
Bank #0: 00100000 63 MB
Flash: 0 kB
NAND:probing at 0x9c000000
Freezes on probing the NAND, does anyone know how to check that out? Even a datasheet would be helpful.


Edit: LOL I just posted that blind, didn't even see your post :) Answered it pretty well though didn't I :D
 
Last edited by a moderator:
Wow, I had even posted the same thing in that thread :p. Just don't expect to get anything whatsoever on the screen until it is fully reflashed. Sometimes it does come up with something but normally it doesn't.

Do you know how to load raw binaries? I will upload the JTAG version of my NAND blanker. It might help.

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,42,2674 <- There it is. I honestly don't think your SD slot is faulty (or if it is, that log can't show it) because you aren't even getting to the point where the SD is probed.
 
Orkie said:
Wow, I had even posted the same thing in that thread :p. Just don't expect to get anything whatsoever on the screen until it is fully reflashed. Sometimes it does come up with something but normally it doesn't.
I am only watching the serial output, how long should it freeze at probing NAND, have you got a sample output? I couldn't find one on any of the guides (and it would be pretty darn useful).
Also, do you know what happens directly after the NAND is probed? A success message? Or no message and an attempt to read from the SD?

QUOTE
Do you know how to load raw binaries? I will upload the JTAG version of my NAND blanker. It might help.


I am not sure, if you can tell me how I can try it. Is it the same as loading the uboot?


I am trying to pin down where the fualt is, a NAND blanker could help me know whether it is the SD or the NAND at fault.

Important questions I have:

1. If the NAND has bad sectors will the Uboot be able to mark them and function?

2. If the SD slot is completely bad can I load the firmware image into RAM and use a modified Uboot to flash it from RAM?






Orkie said:
Wow, I had even posted the same thing in that thread :p. Just don't expect to get anything whatsoever on the screen until it is fully reflashed. Sometimes it does come up with something but normally it doesn't.

Do you know how to load raw binaries? I will upload the JTAG version of my NAND blanker. It might help.

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,42,2674 <- There it is. I honestly don't think your SD slot is faulty (or if it is, that log can't show it) because you aren't even getting to the point where the SD is probed.




"Load and execute this binary at 0x00080000 in RAM." OK Can do

QUOTE
It will force a complete blank of the NAND (even the bad block markers).
I assume it can't get me in more trouble, at least not irreversibly more trouble?

QUOTE
There is no way of telling if it has worked or even loaded sadly, so you just have to check PC and see where it has ended up.
So no Serial output from this prog?

QUOTE
Leave about 10-20 seconds for it to work before halting and checking the register values.
I am not sure I know how to check the register values.


Oh yeah, thanks btw, I was almost ready to sell this thing for parts :)

I would much rather turn it into a sweet media player.
 
Last edited by a moderator:
The NAND is very unlikely to have bad sectors that will cause any problems (in normal use they are just marked and they are ignored in the future), but if the first sector truly is bad then the NAND is unusable.

If the SD slot is dead, you will need to fit a replacement. There is very little you can do without SD. JTAG is *slow*. You have seen how long it takes to load even the tiny u-boot image into RAM, let alone an entire firmware image, hence why nobody has ever bothered doing it.

http://wiki.gp2x.org/wiki/USB_Host#Full_Boot_Log <- that has a log of it

EDIT:
It won't cause any more problems, no. I know many people have done it loads of times. There is code for serial output, but I could never get it to work to be honest :p. I haven't used JTAG for ages so I can't remember how to check the registers, you'll need to look in the docs (the CPU has to be halted first).
 
I am using OCD Commander 2.5.6 and I use the "download" command to select the file blankit.bin and it says "error reading file" in a dialog box.

I used 7-Zip to decompress it to 3 different folders and even tried renaming it to a .elf No luck.

I may be trying to load it incorrectly.

The uboot.elf loads fine and the serial terminal shows the same as before, hang on detection of the NAND.
 
Renaming it to elf won't work, because it very simply isn't an elf. I have never used OCD Commander, but is there not a way to load a file into an arbitrary location in RAM? I would be surprised if it didn't support that (and it is a pretty crap JTAG tool if it doesn't). That file is a raw binary, it has no header and will run if you can just get it into RAM and restart the CPU at the address I specified.
 
Orkie said:
Renaming it to elf won't work, because it very simply isn't an elf. I have never used OCD Commander, but is there not a way to load a file into an arbitrary location in RAM? I would be surprised if it didn't support that (and it is a pretty crap JTAG tool if it doesn't). That file is a raw binary, it has no header and will run if you can just get it into RAM and restart the CPU at the address I specified.
Thanks for the reply, I kind of figured on all of that, now I need a different program, or the instructions for this program.

I did check the file and notice that it wasn't an elf (Duh on me, it was named bin.)

I will look again to see if I can load into ram.
 
Last edited by a moderator:
OK this just sucks, there is a version of OpenOCD for windows, but the binaries for Parallel port support are not available (AKA wiggler, AKA 4 resistors and a DB-25 I soldered together)

I do not want to start compiling stuff just to jtag a bricked GP2X :(

Edit:
Ok, so I need to set up a freaking cygwin compiler system to unbrick this, maybe. I guess I gotta do what I gotta do. (I wonder why Yagarto won't distribute Wiggler compiled versions? Are they getting payed by the makers of USB Jtag products? That pisses me off.)
 
Quick question, what do you need to do to hack a .bin into an elf that OCD Commander will take?

I suppose it isn't that easy, but someone was able to accomplish it for the 1.0.1 uboot code.

If worse comes to worse I wonder if I can desolder the NAND.

(If the NAND is really shot I wonder if I can load and execute Artaylor's alternate uboot and put the firmware/kernel onto the SD card? I realize this would take Jtag every boot, but for a desktop system I am OK with the workaround for a bit.)

I hope the Wiz is more like the Pandora and can boot without NAND off of an SD card, this corruptible NAND business is crap.
 
It is possible to give it an ELF header, but I haven't done anything like that for a long time so you'll have to wait a day or two until I can work out how to do it again. If the NAND is dead, how do you propose to install any kind of bootloader? :p
 
Orkie said:
It is possible to give it an ELF header, but I haven't done anything like that for a long time so you'll have to wait a day or two until I can work out how to do it again. If the NAND is dead, how do you propose to install any kind of bootloader? :p
I would just give it a big ol battery backup and put it inside an old DVD player that I leave connected all the time. I would only need Jtag to boot it ;)

Hacky I know, but it could work for a bit, plus it kinda makes the system a console doesn't it :).

I am having a worse problem now, I am trying to get cygwin installed from some sparkfun instructions that yagato points me to, but the cygwin installer crashes my DSL box.

Also it has cached a single point for the download and won't release it. I kinda have to share the internet connection or I get bugged to all hell, so I don't know when I will be able to get cygwin installed.

It is just a Speedstream 4100, shouldn't be doing this. Although it could be my old linksys, but as I say, don't know when I can steal it to myself.

If you got an Elf version that would be very nice, thanks a lot.

What help is the tool exactly? Have other people used it in this situation to make the NAND accessible to uboot when it isn't responding?

I really wish it wasn't so freaking hard to use the Jtag wiggler (not much use having free hardware with no binaries).
 
Last edited by a moderator:
OK, so it looks like the parallel port driver is not included with the current trunk on Berlios.de

Edit, found WinARM has precompiled and functional Wiggler support. Yay! :D
 
Possible progress, I have found a pre-compiled version of OCD with wiggler support from here:

http://www.siwawi.arubi.uni-kl.de/avr_proj...rojects/#winarm

It is in a 44MB (7z self extracting) or 97MB :blink: regular zip.

Assuming you unzip the package to C:\ the files will be in C:\WinARM\utils\OpenOCD

I haven't yet tried to use them, I will get back to you on if it works.
 
OK, here is what I have accomplished so far:
  • edited the config file for OpenOCD and set it up for a wiggler and 920t
  • started OpenOCD and got connection to the GP2X
  • ran puttytel running and connected over localhost at 4444
  • performed a load_binary blankit.bin 0x00080000 and then a resume 0x0008000 (If that is not the proper instruction, please let me know the right one.)
  • I then tried the uboot ELF again and watched the serial output, it hung on the NAND again. Argh.
If I pull the power to the NAND would it just not detect the NAND and possibly continue booting? (IE display the boot splash instead of multi-colored lines.)

If I was to load Artaylor's alternate uboot into ram and try to load a kernel off of the SD card, what would be the best way to go about that?
 
Back
Top