F200: Using Ext2 Sd Card?


timothee

Member
Joined
Dec 6, 2007
Messages
171
Age
46
Location
Singapore
Website
Visit site
Hi

I'm trying to use a ext2 sd card with my F200 (I could really use some symlinks) but I'm hitting some setup problem, could someone help me out please?

My F200 is running firmware 4.0. The F200 always tries to mount the card as vfat which fails. Even when I change /etc/fstab to ext2, it doesn't honour my setting. The setting is honoured, if, after startup, I mount manually:
mount /mnt/sd

I'm trying to do that automatically and that is where I'm hitting problems:

I can't find where to add a autorun.gpu in the nand to autostart. Instead I found /root/start.sh . In there, I've added:
CODE

mount -t ext2 /mnt/sd
cd /mnt/sd/Apps/gmenu2x
exec ./gmenu2x



The problems with this approach:
1) time wasted when firmware tries and fails to mount sd as vfat
2) both the f200 default ui AND gmenu2x are running simultaneously (I can see the screen flickering between gmenu2x and default ui when I use the left/right keys).

I can probably live with the start up time hit, but is there a way to kill the default f200 ui fro the start.sh script?

Alternatively, is there simply a better way to achieve what I want?

Side related question: on the F200, what is the way to add gmenu2x to the nand and autostart? I can't mount the nand as the loopback device:
CODE

[root@gp2x root]$mount /mnt/nand
MSDOS FS: IO charset utf8
FAT: unable to read boot sector
FAT: freeing iocharset=utf8
mount: Mounting /dev/loop/7 on /mnt/nand failed: Invalid argument



I tried adding autorun.gpu to / but that didn't work. I realised the games from the nand are stored in /usr/games and I saw the folder /usr/gp2x. I tried adding a autorun.gpu in /usr/gp2x but that didn't work either.

Any help would be much appreciated.

Thanks,
Tim.

[Edit]
I manage to kill the default menu by injecting the following super ugly script in my start.sh:
CODE
kill `ps ax | grep gp2xmenu | sed ' s/ *([0-9]\+).*/\1/g'`

I wish the simpler 'ps -C gp2xmenu -o pid=' could have worked; and I couldn't get cut or sed addresses to work :(.

So now the only annoyance is the startup time, I have the following unecessary processes:
- attempt to mount /mnt/sd as vfat (which fails)
- launch default gp2xmenu
- mount /mnt/sd as ext2
- kill gp2xmenu
- start gmenu2x

Is there a way to streamline that?
 
Last edited by a moderator:
Hmm, so no one else is using a ext2 filesystem on their SD card for the F200, in a nice way?

My system currently runs fine, except for the minor problem I mentionned above, I noticed additionally:
* launching a program from gmenu2x, I can see a mouse cursor on the top-left corner for a split second
* launching different programs now sometimes show me the last screen from a previous program first (some surfaces not being cleared?)
* rage2x is no longer working, it tells me gngeo is missing while the file is definitely there :(

These "inconveniences" are so far minor, in comparison of the ability to have symlinks for the games/emus that DO work.

But still I wish I knew how to cleanly auto-mount the ext2 card on the f200, and where to have a proper autorun on the nand...

Any idea?
 
timothee said:
Hmm, so no one else is using a ext2 filesystem on their SD card for the F200, in a nice way?

My system currently runs fine, except for the minor problem I mentionned above, I noticed additionally:
* launching a program from gmenu2x, I can see a mouse cursor on the top-left corner for a split second
* launching different programs now sometimes show me the last screen from a previous program first (some surfaces not being cleared?)
* rage2x is no longer working, it tells me gngeo is missing while the file is definitely there :(

These "inconveniences" are so far minor, in comparison of the ability to have symlinks for the games/emus that DO work.

But still I wish I knew how to cleanly auto-mount the ext2 card on the f200, and where to have a proper autorun on the nand...

Any idea?
I'd just wait until Open2X comes out with seamless support for both FAT32 and EXT2/3. It is on the way very soon.
 
Last edited by a moderator:
timothee said:
I manage to kill the default menu by injecting the following super ugly script in my start.sh:
CODE
kill `ps ax | grep gp2xmenu | sed ' s/ *([0-9]\+).*/\1/g'`

I wish the simpler 'ps -C gp2xmenu -o pid=' could have worked; and I couldn't get cut or sed addresses to work :(.

You can kill the default menu using this command:
CODE
killall gp2xmenu
 
Last edited by a moderator:
M-HT said:
You can kill the default menu using this command:
CODE
killall gp2xmenu
Thanks much for the tip. You know, I have been using linux for quite some time (no power user obviously) but I have never learned about killall before, now I feel damn stupid with my one liner.

QUOTE
I'd just wait until Open2X comes out with seamless support for both FAT32 and EXT2/3. It is on the way very soon.

Well, I'd like to have something working right now; but I will surely take a look at open2x when it is released.

Btw, I managed to NOT start gp2xmenu at all on startup and that got rid of the failed attempt to mount as vfat too :). gp2xmenu was started from /etc/rc.d/rc.sysinit . I edited the file to call my start.sh under /root/ directly instead. Works great so far :). Now my /etc/rc.d/rc.sysinit looks like this:
CODE

#!/bin/sh

mount /tmp
mkdir -p /tmp/log /tmp/lock/subsys /tmp/run /tmp/spool /tmp/mnt/nand /tmp/mnt/sd

devfsd /dev
mknod /dev/GPIO c 253 0
hostname gp2x

export PATH="/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
export LD_LIBRARY_PATH="./:/lib:/usr/local/lib:/usr/lib"

/root/start.sh



I just hope I'm not breaking anything I shouldn't :p
 
Last edited by a moderator:
Back
Top