GP2X How Can I Empty All Caches?


techFreak

Member
Joined
Dec 10, 2005
Messages
487
Location
Istanbul, TR
Website
Visit site
I can not see the changes in my program unless i restart my device. I use a launcher gpe file. How can i empty the cache to prevent restarting device everytime? I appreciate if you can help me...
 
unmount the SD before removing it and mount it again after re-inserting it? if it has an entry in /etc/fstab, the commands would be like.:
umount /mnt/sd
mount /mnt/sd

*mumbles something about GPH needing to set up an auto mounter*
 
Are you keeping a directory an the card open? e.g. cd-ing to a dir on the card in your launcher and not cd-ing back to /usr/gp2x after.
I've never come across this problem myself, but I don't use a launcher - I run my programs from the cmd line when dev'ing.
 
GPH have an auto mounter, but the autodismount doesn't always work (eg. if a dir on the sd is in use when the dismount occurs). For some reason, the automounter manages to mount the image twice after that occurs, and the SD is never checked again - the only thing you can do is reboot.

All you can do is make sure you cd out of the /mnt/sd directory before removing the card. I do this by using the command line via a serial lead, so I'm never cd'd into the sd directory, I run everything from /usr/gp2x (eg. like "/mnt/sd/myapp" and never use relative paths in my apps)
 
Squidge thank you for your help.

I'm developing a soft keyboard for GP2X caharcter input. Because i think the most important limitation for Gp2X is lack of keyboard. Maybe this is not apparent at the moment but in the near future we will face it.

This is my first sw in c++ so i even don't know the basic functions. My code needs a lot of optimization. Would any of developers keen to work with me in this code? I think it will be usefull because you can enter text very fast believe me!!! :D

If anyone is interested please PM me.

Thanks in advance!
 
You might be able to fix it by running "umount /mnt/sd" in a script. Of course, you'd need to put the script on the nand, not on the sd. Has anyone made an installer that does this kind of thing? I don't know the correct path to make things show up in the launcher.
 
I hadn't really thought of it before, but it kinda sucks executing a program from the SD card, since programs usually aren't totally loaded into RAM with linux, but are more or less cached to RAM from the program file (can anyone verify if this is how it works on the gp2x?), so the end result is you can't really swap cards while running a program from the SD card. It'd be nice if GPH would give easy access to the rest of the NAND memory... would allow for more space to put programs that card swapping might be useful for. Then again, most people will probably only use one card...
 
Back
Top