Squidge
Certified Guru
To make executable gp2x programs, compile them as standard Linux ELF files, call them "filename.gpe" and place them in the root of the sd card. User programs have access to at most 23MB of RAM whilst running. When your program exits, the GP2X will drop to a shell, so you have to load /usr/gp2x/gp2xmenu yourself if you want the user to be able to do something else with the device.
To make a GP2X utility (I've no idea what these are supposed to be yet, but they are run exactly the same as above), call them "filename.gpu" and place them in the root of the sd card.
The device takes a while to bootup, and most of this time is spent uncompressing the linux kernel and mounting the root file system. Not a lot can be done about how fast the root file system is mounted, but the uncompressed size of the linux kernel seems to be smaller than the compressed size :blink: (it reads 1048576 bytes from nand, and the uncompressed size is 1027686 bytes).
The menu system, and all applications, are run from bash. Whilst this seems strange (additional bootup time and memory usage), at least it means us developers can drop to a shell to launch our stuff instead of messing around with the interface. Makes testing stuff much easier and faster.
People wanting to use SDL to parse the joystick with the latest kernel on dev boards should try and type the following once per reboot:
mknod /dev/GPIO c 253 0
It just may give you SDL joystick support (with the latest file system image, it's done automatically on startup)
All buttons are now reported via SDL, you can even press the joystick (VK_TAT), use the volume buttons (VK_VOL_DOWN, VK_VOL_UP) etc. The joystick is 8-way.
SD card is auto-mounted using file system type 'vfat', so this means long filename support as standard.
SD is mounted at location "/mnt/sd" whilst nand is at "/mnt/nand" should you wish to access datafiles from your apps.
SD access now seems to be much faster:
Reading:
[root@Linux /]$umount /mnt/sd
[root@Linux /]$mount /dev/discs/disc0/part1 /mnt/sd -t vfat
[root@Linux /]$ls -l /mnt/sd/squidge
-rwxr-xr-x 1 root root 1608260 Oct 13 2005 /mnt/sd/squidge
[root@Linux /]$time cat /mnt/sd/squidge >/dev/null
real 0m2.082s
user 0m0.000s
sys 0m0.300s
[root@Linux /]$
754KB/sec
Writing:
[root@Linux gp2x]$ls -l MusicPlayer
-rwxr--r-- 1 root root 1179668 Jan 1 00:00 MusicPlayer
[root@Linux gp2x]$umount /mnt/sd
[root@Linux gp2x]$mount /dev/discs/disc0/part1 /mnt/sd -t vfat
[root@Linux gp2x]$time cp MusicPlayer /mnt/sd; time umount /mnt/sd
real 0m1.006s
user 0m0.030s
sys 0m0.970s
real 0m3.497s
user 0m0.020s
sys 0m0.300s
255KB/sec
USB
Device uses the NetChip 2272 IC for USB support. The NET2272 is a USB-function device, and as a result is a slave to the USB host.
Anything I've missed?
To make a GP2X utility (I've no idea what these are supposed to be yet, but they are run exactly the same as above), call them "filename.gpu" and place them in the root of the sd card.
The device takes a while to bootup, and most of this time is spent uncompressing the linux kernel and mounting the root file system. Not a lot can be done about how fast the root file system is mounted, but the uncompressed size of the linux kernel seems to be smaller than the compressed size :blink: (it reads 1048576 bytes from nand, and the uncompressed size is 1027686 bytes).
The menu system, and all applications, are run from bash. Whilst this seems strange (additional bootup time and memory usage), at least it means us developers can drop to a shell to launch our stuff instead of messing around with the interface. Makes testing stuff much easier and faster.
People wanting to use SDL to parse the joystick with the latest kernel on dev boards should try and type the following once per reboot:
mknod /dev/GPIO c 253 0
It just may give you SDL joystick support (with the latest file system image, it's done automatically on startup)
All buttons are now reported via SDL, you can even press the joystick (VK_TAT), use the volume buttons (VK_VOL_DOWN, VK_VOL_UP) etc. The joystick is 8-way.
SD card is auto-mounted using file system type 'vfat', so this means long filename support as standard.
SD is mounted at location "/mnt/sd" whilst nand is at "/mnt/nand" should you wish to access datafiles from your apps.
SD access now seems to be much faster:
Reading:
[root@Linux /]$umount /mnt/sd
[root@Linux /]$mount /dev/discs/disc0/part1 /mnt/sd -t vfat
[root@Linux /]$ls -l /mnt/sd/squidge
-rwxr-xr-x 1 root root 1608260 Oct 13 2005 /mnt/sd/squidge
[root@Linux /]$time cat /mnt/sd/squidge >/dev/null
real 0m2.082s
user 0m0.000s
sys 0m0.300s
[root@Linux /]$
754KB/sec
Writing:
[root@Linux gp2x]$ls -l MusicPlayer
-rwxr--r-- 1 root root 1179668 Jan 1 00:00 MusicPlayer
[root@Linux gp2x]$umount /mnt/sd
[root@Linux gp2x]$mount /dev/discs/disc0/part1 /mnt/sd -t vfat
[root@Linux gp2x]$time cp MusicPlayer /mnt/sd; time umount /mnt/sd
real 0m1.006s
user 0m0.030s
sys 0m0.970s
real 0m3.497s
user 0m0.020s
sys 0m0.300s
255KB/sec
USB
Device uses the NetChip 2272 IC for USB support. The NET2272 is a USB-function device, and as a result is a slave to the USB host.
Anything I've missed?