(Grrr... we're still having power fluctuations around here. The power went off while I was typing up a long message, and the whole thing disappeared...)
OK, I got my ol' PDN up and running. First off, I was wrong about the 32k byte and 64 byte offsets: they are relevant if you're hacking around with the kernel (which I've done a bit of, and will do more of), but they're unimportant if you're just flashing.
Some background:
The 256MB of RAM is at 0x50000000 - 0x5FFFFFFF in the CPU memory map.
The OneNAND isn't in the CPU memory map as far as I know, so you can't just look at its contents using U-Boot's md command. For example, if you do:
md 200000 100
you won't see the start of the kernel. But if you read the OneNAND into RAM you can look at it:
onenand read 51000000 200000 100
md 51000000 100
you will see the start of the kernel.
One thing that confused me is that U-Boot rounds up length parameters for OneNAND commands to the next higher 256kB boundary (0x40000). I presume that's because OneNAND operations are always 256kB (for erase and write anyway, not sure about reads).
To restore a busted PDN that has a working U-Boot, you first need some firmware to download. I really like this:
kewlguy's flashloop fixer because it's small and reliable. Transferring files by kermit over the serial link is very slow! Download the file and unzip it somewhere.
Then get into U-Boot on the PDN. I'm not sure whether the OneNAND needs to be unlocked, but I do it just to be sure it works:
onenand lock off 200000 240000
onenand erase 200000 240000
loadb 51000000
<in TeraTerm, select File->Transfer->Kermit->Send, and select the "kernel" file from the zip you downloaded above>
onenand write 51000000 200000 240000
onenand lock off b00000 80000
onenand erase b00000 80000
loadb 51000000
<in TeraTerm, select File->Transfer->Kermit->Send, and select the "recovery.img" file from the zip you downloaded above>
onenand write 51000000 b00000 80000
onenand lock off 1500000 40000
onenand erase 1500000 40000
loadb 51000000
<in TeraTerm, select File->Transfer->Kermit->Send, and select the "ramdisk.img" file from the zip you downloaded above>
onenand write 51000000 1500000 40000
Then you can give U-Boot the "poweroff" command, which might make the PDN power down, although the serial adapter may keep it on so it just reboots. I sometimes pull the battery connector (carefully!). In any case, you want to put a real update zip on your SD card and do the volume up + power button reset, so the PDN updater will do the update.
I just did all this and it worked for me. Please let me know how it goes for you!
This post has been edited by RobBrownNZ: 22 March 2011 - 05:33 AM