Attention Gpe Users


buntz

Still Fresh
Joined
Jun 9, 2006
Messages
50
for anyone who has GPE running on an ext2 sd card; how did you format your card?

I've tried multiple combinations of partitions, on Windows and Linux. When I try to copy over the GPE root directory, the copy fails, and it corrupts the data on the ext2 partition. Do I need a card reader? Can I have more than one partition on a single SD card? Any insight would be appriciated.
 
the SD card needs to be FAT32

not according to the Wiki entry for gp2x-gpe. You can use FAT32 but the image file need to be converted to EXT2 before execution, so everytime you load something, first its converted to EXT2 then run. So If you format the SD card for EXT2, you no longer need the conversion, and thus it speeds things up. It has been done before, but no on goes into detail how exactly, or more importantly, where, they formated their card.
 
hmm i didnt know that flash could be in EXT2 or any other format then FAT/16/32. This is due to the built in handlers used I had thought... but hell what do I know make since if you read it on the GP2X wiki...
 
Lupin posted on Sep 25 2006 at 12:41 PM said:
hmm i didnt know that flash could be in EXT2 or any other format then FAT/16/32. This is due to the built in handlers used I had thought... but hell what do I know make since if you read it on the GP2X wiki...

Obviously the Wiki isnt law, but I have had success In mounting EXT2 formated SD Cards on the GP2X and viewing the data on them. But for some reason when I copy those damn files for GPE, it doesnt like that.

[edit] look at http://www.gp32x.de/board/index.php?showtopic=30953
 
Last edited by a moderator:
I dont think thats the problem becasue I'm using a cable from a sony camera.
 
So is there anyone out there running GPE on a SD card formated as EXT2?
 
I used mkfs.ext2 on the block device for the SD card when it was insirted into a card reader on my Linux desktop machine. I then mounted the GPE image (which is ext2) as a loopback device and copied the contents onto the card. Next you have to create a script to run from the menu to mount the card on the GP2X (store this on the NAND) as the menu only supports FAT by default.
Once you've done that, copy chroot.static onto the card along with the launch script (modified so that it doesn't try to mount the ext2 image when you run GPE).

You are right, it will give a *huge* speed boost since it doesn't have to read the ext2 filesystem through FAT. They are very vague instructions, but I can help you if you get stuck on a particular bit(s).
 
OK I cant get it to work on ext2. This is what I have. What did I do wrong? I am also using gmenu2x using the same sd card and have modified the startup script to set the time by the network using rdate.

root@gp2x sd]$ps
PID Uid VmSize Stat Command

1 root 1336 S init boot
2 root S [keventd]
3 root S [ksoftirqd_CPU0]
4 root S [kswapd]
5 root S [bdflush]
6 root S [kupdated]
7 root S [mtdblockd]
13 root 1404 S devfsd /dev
49 root 1620 S inetd
56 root 3716 S /sbin/thttpd -r
86 root 3828 S smbd
87 root 1940 S in.telnetd
88 root 2080 S -sh
111 root 1652 R ps

[root@gp2x sd]$cat gp2x-gpe.gpu
#!/bin/sh
# Setup env
GPEDIR=/mnt/sd/apps/gpe
GPEIMAGE=gpe-image-gp2x.rootfs.ext2


# Check root directory exists, if not create it
if [ -d root ]
then
echo "directory already exists, not creating"
else
mkdir root
fi


# Change back to GPE directory and mount image, proc and devfs
cd $GPEDIR/..
#/bin/mount -t ext2 -o loop,noatime,sync $GPEIMAGE $GPEDIR
#/bin/mount -t ext2 /dev/mmcsd/disc0/part2 $GPEDIR
/bin/mount none $GPEDIR/dev -t devfs
/bin/mount none $GPEDIR/proc -t proc
/bin/mount none $GPEDIR/tmp -t tmpfs

# Sleep to allow server to start
sleep 2

# Launch chroot
echo "entering chroot"
/mnt/sd/apps/gpe/bin/chroot.static /mnt/sd/apps/gpe /bin/startgpe

# Shutting down
killall Xfbdev
killall dbus-launch
killall dbus-daemon

killall esd
sleep 10
/bin/umount $GPEDIR/dev
/bin/umount $GPEDIR/proc
/bin/umount $GPEDIR/tmp
/bin/umount $GPEDIR
cd /usr/gp2x
./gp2xmenu &

[root@gp2x sd]$./gp2x-gpe.gpu
directory already exists, not creating
entering chroot
mount: Mounting rootfs on / failed: Invalid argument
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/gp2x:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
Failed to open TSLib device, tried /dev/touchscreen/0 .
Try setting TSLIB_TSDEVICE to valid /dev entry?
Could not init font path element /usr/lib/X11/fonts/misc, removing from list!
Could not init font path element /usr/lib/X11/fonts/100dpi, removing from list!
Could not init font path element /usr/lib/X11/fonts/75dpi, removing from list!
WARNING: No default configuration found for your 75 DPI screen!
Using 100 DPI
Your 75 DPI screen is already configured.
D-BUS per-session daemon address is: unix:path=/tmp/dbus-cqnRGzGCu1,guid=800100000964e450925f9a6d0f2b0c00
Failed to open connection to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
 
Orkie posted on Sep 25 2006 at 05:33 PM said:
I used mkfs.ext2 on the block device for the SD card when it was insirted into a card reader on my Linux desktop machine.
Ok, so you used a card reader. I'll have to get my hands on one and try that. I read somewhere that while it is in the GP2X the SD Card looks like a harddrive to the computer, and since is solid state memory and not an actually drive with platters, it gets screwed up when you format it as such.

Thanks, I'll let you know how it goes.
 
Last edited by a moderator:
I used mkfs.ext2 on the block device for the SD card

What is a block device? Also I noticed that mkfs has an argument for the number of blocks. Is that related, and does the number of blocks matter?

One more thing, how do I create that script to mount the ext2 filesystem. should i just use a text editor and call it 'mount.gpu'?
 
A block device is how Linux accesses storage devices (e.g. /dev/hda, /dev/sdc1). You should be able to just call a mkfs.ext2 /whatever/blockdevice to format it.

The mount.gpu script needs to be something like this:
Code:
#!/bin/bash
mount -t ext2 /whatever/blockdevice /mnt/sd
 
Alright I got the block device thing. I use them all the time and just didnt know what they were called.

I understand what should be in the script, a terminal command to mount that block device, but how do i actually create it? Should I use the gp2x sdk, or can I just enter those commands into a text editor and save the file as mount.gpu?
 
Just in a text editor. Make sure you are using UNIX line endings in your editor if you are writing it in Windows though.
 
OK, Orkie

I got the script made and the card formated, but I have two problems:

1) I cannot get the ubuntu machine I'm using at work to copy all of the files over to the SD card. I think I has something to do with the OEM install I did and not being about to access the root account. I'm going to try on my fedora machine at home later today.

2) After I run the script to mount the SD card, my screen goes blank. I telneted into the gp2x and it enters runtime level 3, which is the same as when I hit ctrl-c in the telnet console while the GP2X is sitting in its menu to get to the command prompt. How do I get it to continue to display the menu so I can easily run the gp2x-gpe.gpu file to launch gpe?

Thanks for your help so far.

[edit] First problem solved. Did everything form the command prompt verbatim from the gpe-wiki. Still would like the mount script to display the menu though...
 
Try adding this to the end of the mount script:
Code:
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
 
Back
Top