Alternative Kernel 1.2.1 Flasher


Robster

Dodgy hardware mod maker
Joined
Jul 8, 2003
Messages
439
Location
New Zealand
Website
www.cobbleware.com
Hey all,

I have made a new flasher, which will update the kernel to 1.2.1 for those whose SD cards are not recognised by the boot-time updater.

When I made the last updater, there were several reports of the flash process failing and GP2X's not booting after the update. In response to that, I've made some important changes:
1) Put in a CRC check, to make sure that the image loaded from SD card is correct
2) Changed the order of things, so that blocks are repeatedly written if they do not verify correctly
3) Required that the entire image read back correctly, twice, before indicating success.

I have seen that a block can seem to be programmed correctly, but then fail when the unit is rebooted. That is the reason for requiring the image to read back correctly twice.

So, this version will be vastly more reliable than previous versions. However, as always, you use this updater at your own risk, and you must realise that it may fail and that this will mean your GP2X will not boot. I would prefer that some people with serial cables test it first, so that if it fails, they can recover using DJWillis' unbricking guide.

If you use this, please give feedback here about how it went.

So, with all that out of the way, the updater itself:

1) Grab this file and this file.
2) Put the files on your SD card, in the root directory.
3) Run the gpe file from the "Game" menu.
4) Wait until the program says that the update was successful.

After this, you can either press "Y" to reboot, or turn your GP2X off for 10 seconds, and then turn it on again. Pressing Y to reboot may fail, I haven't figured out why yet, but if it does you can power cycle the GP2X anyway.

When booting, the green GP2X logo screen will say "Firmware Ver - 1.2.1" in small writing at the centre of the screen if the update was successful.

After updating the kernel, you need to update the applications. Get the GPH 1.2.1 update from GP2X.de. Extract the files, and copy patch20060107.gpu and gp2xpatch-1.2.1.tar.gz but not gp2xkernel.img to your SD card. Run the .gpu file from the "Utility" menu. When it has finished, you are done with the update and you can remove all the update files from your SD card.

Hopefully craigix and EvilDragon will be able to test this on a number of units, to give some confidence about how well it works.

I'll be doing a 1.3.0 version when that is released by GPH. In the meantime, if you don't have a serial cable, I'd probably recommend that you don't use this updater yet. But if you do, remember to tell us what happened! :D
 
It seems like this method should be safer all around compared to the offcial way.
 
well, i just tried it, and BOOOM! it doesn't work. good thing i've got a serial connection or i'd be pissed right now, so here is the output from my GP2X when its started:


Code:
U-Boot 1.0.0 (Nov  9 2005 - 05:46:00)

U-Boot code: 03F00000 -> 03F6A680  BSS: -> 03FA30AC
DRAM Configuration:
Bank #0: 00100000 63 MB
Flash:  0 kB
NAND:Probing at 0x9c000000
Flash chip found:
         Manufacturer ID: 0xEC, Chip ID: 0x76 (Samsung K9F1208 64Mb)
1 flash chips found. Total nand_chip size: 64 MB
Get Environment from NAND offset 0x70000 ... 
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
DPC->DPC_CNTL:0x5

SD found : SD Frequency is 24MHz
mmc_init_once 0
(without MBR)

### main_loop: bootcmd="nand read 0x1000000 0x80000 0x180000; bootm"
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x80000, size 0x180000 ...  1572864 bytes read: OK
## Booting image at 01000000 ...
   Image Name:   MMSP2 Linux Kernel
   Created:      2006-01-07   7:46:08 UTC
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    837579 Bytes = 817.9 kB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
GP2X#

drops me to the u-boot prompt .. whats this about Bad Data CRC?
 
Very nice, thank you :)
Update worked without any problems.

Maybe GPH should use this way as the "official" updateway as it is much more reliable than their "on-boot update" strategy.
 
I tryed your updater and now i have a problem. My GP2x doesn't boot
past the U boot screen. I don't have the serial cable. How do I fix this
problem? much thanks for any help. :eek:
 
I tryed your updater and now i have a problem. My GP2x doesn't boot
past the U boot screen. I don't have the serial cable. How do I fix this
problem? much thanks for any help. :eek:

if you can find an SD card that will allow you to update the "official" way then you should be able to bring your gp2x back from the brink. Just don't try to update the bootloader sence thats your last chance to fix it.
 
Last edited by a moderator:
Hmm, craig and me both tested the last version on A LOT of units (about 60)
It only didn't work with one unit for craig and one unit for me...
The interesting thing: Both times, we swapped the SD-Card before flashing...
Doesn't make any sense for me, but maybe something goes wrong if you swap the card...?
 
So what you mean is it might be a good idea to boot the GP2X with the SD card in it which has the update files on and leave that card in until you get it booting with the new firmware?
 
okay, i got my GP2X back in operating state .. what i think happened was i put an invalid kernel.img on the SD card in the first place, the 1.2.1 firmware updater didn't know this, and just went ahead and did the burn .. and i ended up with a corrupted kernel image.

rob, as discussed in private email, i suggest that you make the firmware updater read .md5 files, and from now on just have it check the known-valid public .md5 sum against the kernel.img file itself, before doing the burn. its possible that the SD card swap/sync issue results in an incomplete/corrupted file being saved to the SD card .. if you have a known-valid public .md5 to check against, then this will prevent this circumstance occurring ..

anyway, just wanted to say that i've used your firmware updater in the past, and it does indeed rock, but it would definitely help to beef up the hash/sum stage of it to prevent people using corrupted kernel.img's in the first place .. and if there is any way i can convince you to open the source to it, then i would gladly assist in the effort of making this updater as robust and solid as it could possibly be ..
 
I believe the firmware updater uses HH, so opening up the source would involve releasing (parts of) HH before its officially ready for release. I'm not sure they would want to do this.

But on the other hand, a release of HH would be much appreciated by many. :)
 
Updater refused to work using my 256mb kingston card (just sat at a bluescreen and didnt do anything) but worked perfectly (as did the last updater) on my 2gb no-name thing. Very odd.
 
Yeah, an md5sum would be greatly appreciated.

I think I'll hold off on trying it until the check (I do trust you; I just don't want to take any chances because I don't have any means of unbricking.)
 
yeah cheers i've ordered a sandisk 128mb sd off ebay to sort it, should work...hopefully :)
 
Back
Top