Firmware Flashing : Possible Fix


Tetedeiench posted on Dec 7 2005 at 08:28 PM said:
So well... where should i copy Sterm for it to run on the nand, do you know that ?

/home? :D :D
 
Last edited by a moderator:
nik166 posted on Dec 7 2005 at 08:33 PM said:
Tetedeiench posted on Dec 7 2005 at 08:28 PM said:
So well... where should i copy Sterm for it to run on the nand, do you know that ?

/home? :D :D

Not /root... trying /mnt/nand ( it's not mounted anyway... so maybe)
 
Last edited by a moderator:
Funny, it's /mnt/nand, even if nand it's not mounted ( i guess that's just an abstract thing).

Could umount the SD, trying to format it with the gp2x : would be funny as hell if the gp2x isn't compatible with itself :D
 
When running fdisk, i get a warning that the number of cylinders for this partition exceeds 1024... going on
 
Wow, even if the SD card was recognized by the gp2x, alot of partitions were showing up... messed up. problem of the gp2x core or the SDcard ?

Anyway, could create the partition... however, it is not possible to format it using the gp2x, so... using my debian. mmmmh, maybe :D
 
Weird : the mkfs has weird messages on. i don't seem to be able to tell which device i should use with fdisk.
I tried /dev/mmcsd/disc0/part1 : it's a no go.
/dev/mmcsd/disc0/disc : no go too ( it only sees one cylinder o_O ) it seems. will still try to partition it.

What i can say so far : this console sure is weird in terms of sd recognition o_O
 
All this flood for nothing : all i could harvest is this partition, using the gp2x itself :

Disk /dev/sdc: 128 MB, 128450560 bytes
1 heads, 62 sectors/track, 4046 cylinders
Units = cylinders of 62 * 512 = 31744 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 4047 125439+ b W95 FAT32
Partition 1 does not end on cylinder boundary.

but i had a much different number of cylinders on the gp2x... only 1.

And of course, it's a no go as far as firmware updating goes...

Well at least, it was fun :)

We can say the gp2x is not compatible with itself :D
 
One info that may be useful : the gp2x set the number of cylinders to 4046, without giving me any notice...

Perhaps this number is important, as older versions had problems with cards with more than 1024 cylinders...

gotta try a 512 cylinders partition
 
You shouldn't be trying to access a partition on the SD if it's superfloppy (partitionless) formatted - just use the device itself. I don't think the gp2x has a mkdosfs utility, so I'm not sure you'll be able to format it in the gp2x. GPH should really add this in an update if it's not already there.
EDIT: it's possible the gp2x kernel is transparently dealing with partitions, and making the partition appear as the actual device - if that's the case, it's an ugly ugly way to do it, and it would mean it would be difficult/impossible to repartition an SD card on the 2x, but hopefully they're not doing that.

For catting the firmware to the NAND, I mean something like "cat firmwarefile.bin > /dev/mtdwhatever", although dd would work as well. Actually dd may be more efficient if you specify a block size corresponding to the erase size from /proc/mtd. Flash chips like these erase the chip a block at a time (setting the block to all 1's), and then program individual bytes (changing the required 1's to 0's). 'cat' could potentially choose to use a strange block size and make the flash chip erase a block more than once to write all the data.

If anyone makes a script to update firmware, they should add in some safeguards, like making sure the file is the right size, checking /proc/mtd to make sure the mtd numbers are as expected, etc. md5summing the firmware file and comparing it to a known value wouldn't be a terrible idea either, assuming the gp2x has this utility.

What sucks is there's no text output ability inside the kernel unless you've got a serial cable, so flashing would kinda be a "run the script and if it doesn't finish in a few minutes, hope it isn't bricked" affair. I'm not even sure you could reboot the unit from the script if you flash the root FS - linux needs to load the reboot command to do that, and buffers won't be correct wrt the filesystem anymore. Although, I noticed there's a terminal emulator sdl app out there now - that could be good for flashing firmware...
 
i never did say i would use cat to flash the firmware... someone else did :D

i just tryied to copy it on the SD mount point, or tried to format the SD card in the gp2x using S-term, that's it.
 
Back
Top