GP2X Odd Sd Behaviour


MadDog

Member
Joined
Mar 4, 2006
Messages
262
Age
54
Location
UK
Website
www.maddoggames.com
If I run an exec via the command shell of the SD card, then take the SD card out. I can still run the program! :huh:

Also, if I then update that program in the SD reader of my PC, put it back in the gp2x and try to run it, it runs the old version and not the version I've just replaced it with. :angry:

This is making it very annoying, the only way I can see getting round this is rebooting my gp2x every time I update the sd card!

Having to eject and insert the SD card every time I change my exec is annoying, but this takes the biscuit.
 
MadDog posted on Apr 27 2006 at 09:18 AM said:
If I run an exec via the command shell of the SD card, then take the SD card out. I can still run the program! :huh:

Also, if I then update that program in the SD reader of my PC, put it back in the gp2x and try to run it, it runs the old version and not the version I've just replaced it with. :angry:

This is making it very annoying, the only way I can see getting round this is rebooting my gp2x every time I update the sd card!

Having to eject and insert the SD card every time I change my exec is annoying, but this takes the biscuit.
My experience is that with version 1.4 of the firmware if all "references" to the SD card are released (for example, you run your program and then exit back to the menu), you can pop the card out, write a new version onto it, and pop the card back in and you'll get the new version.

When you say "the command shell" -- you mean the built-in gp2xmenu program?

Once the bumps get worked out, the networking capabilities in the 2.0 firmware should make our lives a lot easier.
 
Last edited by a moderator:
If I run an exec via the command shell of the SD card, then take the SD card out. I can still run the program! huh.gif

Also, if I then update that program in the SD reader of my PC, put it back in the gp2x and try to run it, it runs the old version and not the version I've just replaced it with. mad.gif

This is perfectly normal bahavior. Linux caches the SD card in memory for performance reasons.

Now, the cache is invalidated when the card is unmounted, and this is normally done when the card is removed. However, if there are any files open on the card then the unmount will fail, and you will get exactly the behavior you describe.

What you need to do is never remove the card until all files are closed. If you are running the program from the GP2X menu, only ever remove the card when you are at that menu.

If you are running via a console (eg. serial or usb), ensure to move the current directory away from the SD card before removing the card (eg. "cd /").

FW2.0 claims to make the need for removing the card unnecessary, but I wouldn't get your hopes up just yet until you have tried and tested it.
 
Someone that's feeling non-unixy-people-friendly ought to just make a little script to run from the nand that will try to unmount the SD card, and check if it worked. If it worked, it could 'beep' (or display it's now safe to eject your SD card), and if it didn't work it could 'bop', or flash the screen red etc.

Although most people needing to eject the card frequently will be developers themselves, that ought to be running with a terminal session for debug output anyway, so should be able to use the 'umount command'..

P.
 
The USB networking stuff works nicely. On the Linux side you need to:
i) Build usbnet (device drivers -> usb support -> usb network adaptors -> multi purpose usb networking framework -> Simple USB network links)
ii) Enable in the Setting-System->Advanced section on the GP2X (firmware 2.0.0)
iii) modprobe usbnet
iv) Put this into /etc/network/interfaces (debian anyway)
Code:
		iface usb0 inet static
		address 192.168.0.3
		netmask 255.255.255.0
		network 192.168.0.0
		broadcast 192.168.0.255
v) ifup usb0
vi) ping 192.168.0.2 or telnet 192.168.0.2 or ftp 192.168.0.2. Username root, no password!
 
Back
Top