GP2X Methods Of Dev


Nice to see you about again fdave :). If you need any quick help getting a tool-chain or libs setup drop me a mail or pop on to IRC.

As for dev'ing, use an old school card reader here. My code tends to regularly crash the GP2X so samba is just as slow ;).

I guess I can give up hacking about with FinalBurn now :D.

Very nice to have a scene 'genius' back on board :D.
 
I code in Textpad (windows) and run the makefile from windows. Copy the .img file to a sd card and boot the gp2x (I use the ART103 bootloader and bypass linux, boot .img files from the sd card). For linux .gpes, I copy to the sdcard too, the usb link is way too slow (as far as mounting the thing as a flash drive). Have not tried the samba thing.
 
stu said:
Parkydr said:
Set "Menu Extension" to "ON" to get the other options
Ah-ha! Cheers for that. I should have done my homework and read this... At least now I can also prevent SD card wear-out :p

For any other (non-linux) newbs reading who would like to mount a folder (as shared on your PC) onto your GP2X (via Samba on the GP2X), you can do the following. I assume here that you've already read Andrew's blog and can get a terminal session open to your GP2X:
  • Get the ARM Samba client from here
  • Start up the Samba server on the GP2X
  • Browse to \\gp2x in Windows Explorer or similar
  • Copy the contents of the above zip file to the root of your GP2X, overwriting if Windows asks you to
  • Once logged in to your GP2X via telnet, type "insmod smbfs" at the shell to install the samba filesystem module
  • You're then free to mount any shares you may have on your host PC - simply type something like "smbmount //192.168.1.1/gp2x /mnt/sd/" at the shell, depending on your networking/share setup.
Also, for proper game testing while telnet'd in, be sure to "killall gp2xmenu" at the shell, or else when you start a program via telnet the menu will still have input focus, as well as try attempt to compete for the screen.

To start a program from the telnet shell simply type something similar to the following on the command line:

CODE

cd /mnt/sd/myprogramdir/
./myprogram.gpe



You should see any text sent to standard out/standard error on the terminal - the program should start as normal on your GP2X, with all the usual graphical output going to the GP2X's screen. If you want to terminate the application without quiting properly (e.g. the program has hung or something) you can try hitting Ctrl+C in the terminal. If that fails, you might need to start another command window, telnet into your GP2X again, and then type

CODE

killall myprogram.gpe



If that did nothing and the first terminal has still not dropped back out to the the command prompt, you might need to do the more drastic:

CODE

killall -9 myprogram.gpe



More info on the Samba stuff available, as always, on the wiki.

HTH!



Hi :)
I am trying to do samba stuff with my gp2x (firmware 2.1.1) and am having troubles (WinXP SP2).
I have enabled samba server and ftp/telnet in the menu.
I can FTP/telnet in just fine but I can't seem to access it via samba :(

I have tried \\<gp2x ip address> and this doesn't work.
I have also tried \\gp2x which doesn't work for me either.

I have even tried installing the ARM samba client (via FTP) so I can try some windows shared stuff but am getting errors...see below:

[root@gp2x root]$insmod smbfs
Using /lib/modules/2.4.25/kernel/smbfs.o
[root@gp2x root]$
[root@gp2x root]$smbmount //10.10.2.92/gp2x /mnt/ext
sh: /usr/bin/smbmount: Permission denied

10.10.2.92 is the internal ip of my computer and gp2x is a shared folder 'c:\gp2x' I have made.
/mnt/ext does exist on the gp2x...

I have even turned off simple file sharing to see if this helps but to no avail :(

any ideas?
cheers,
Paul.
 
Last edited by a moderator:
I use my usb cable for my camera. The one for my gp2x doesn't work. I compile my game on windows and if it doesn't crash then I try it on gp2x. I have no way of debugging on gp2x but then again I never use debuggers anyway because I don't know what 'bugs' are??
 
Paul Nicholls said:
Hi :)
I am trying to do samba stuff with my gp2x (firmware 2.1.1) and am having troubles (WinXP SP2).
I have enabled samba server and ftp/telnet in the menu.
I can FTP/telnet in just fine but I can't seem to access it via samba :(

I have tried \\<gp2x ip address> and this doesn't work.
I have also tried \\gp2x which doesn't work for me either.

I have even tried installing the ARM samba client (via FTP) so I can try some windows shared stuff but am getting errors...see below:

[root@gp2x root]$insmod smbfs
Using /lib/modules/2.4.25/kernel/smbfs.o
[root@gp2x root]$
[root@gp2x root]$smbmount //10.10.2.92/gp2x /mnt/ext
sh: /usr/bin/smbmount: Permission denied

10.10.2.92 is the internal ip of my computer and gp2x is a shared folder 'c:\gp2x' I have made.
/mnt/ext does exist on the gp2x...

I have even turned off simple file sharing to see if this helps but to no avail :(

any ideas?
cheers,
Paul.
Because you transferred over FTP, the file permissions have probably gone bad. Try: "chmod +x /usr/bin/smbmount".
 
Last edited by a moderator:
nickspoon said:
Paul Nicholls said:
Hi :)
I am trying to do samba stuff with my gp2x (firmware 2.1.1) and am having troubles (WinXP SP2).
I have enabled samba server and ftp/telnet in the menu.
I can FTP/telnet in just fine but I can't seem to access it via samba :(

I have tried \\<gp2x ip address> and this doesn't work.
I have also tried \\gp2x which doesn't work for me either.

I have even tried installing the ARM samba client (via FTP) so I can try some windows shared stuff but am getting errors...see below:

[root@gp2x root]$insmod smbfs
Using /lib/modules/2.4.25/kernel/smbfs.o
[root@gp2x root]$
[root@gp2x root]$smbmount //10.10.2.92/gp2x /mnt/ext
sh: /usr/bin/smbmount: Permission denied

10.10.2.92 is the internal ip of my computer and gp2x is a shared folder 'c:\gp2x' I have made.
/mnt/ext does exist on the gp2x...

I have even turned off simple file sharing to see if this helps but to no avail :(

any ideas?
cheers,
Paul.
Because you transferred over FTP, the file permissions have probably gone bad. Try: "chmod +x /usr/bin/smbmount".


Thanks nickspoon, I will give this a try :)
cheers,
Paul.
 
Last edited by a moderator:
Paul Nicholls said:
nickspoon said:
Paul Nicholls said:
Hi :)
I am trying to do samba stuff with my gp2x (firmware 2.1.1) and am having troubles (WinXP SP2).
I have enabled samba server and ftp/telnet in the menu.
I can FTP/telnet in just fine but I can't seem to access it via samba :(

I have tried \\<gp2x ip address> and this doesn't work.
I have also tried \\gp2x which doesn't work for me either.

I have even tried installing the ARM samba client (via FTP) so I can try some windows shared stuff but am getting errors...see below:

[root@gp2x root]$insmod smbfs
Using /lib/modules/2.4.25/kernel/smbfs.o
[root@gp2x root]$
[root@gp2x root]$smbmount //10.10.2.92/gp2x /mnt/ext
sh: /usr/bin/smbmount: Permission denied

10.10.2.92 is the internal ip of my computer and gp2x is a shared folder 'c:\gp2x' I have made.
/mnt/ext does exist on the gp2x...

I have even turned off simple file sharing to see if this helps but to no avail :(

any ideas?
cheers,
Paul.
Because you transferred over FTP, the file permissions have probably gone bad. Try: "chmod +x /usr/bin/smbmount".


Thanks nickspoon, I will give this a try :)
cheers,
Paul.



The permission denied issue has now gone away, but I now get this problem:

[root@gp2x root]$smbmount //pnicholls/gp2x /mnt/ext -o guest
load_client_codepage: filename /usr/share/samba/codepages/codepage.850 does not
exist.
load_unicode_map: filename /usr/share/samba/codepages/unicode_map.850 does not e
xist.
tdb((null)): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No
such file or directory
tdb((null)): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No
such file or directory
tdb((null)): tdb_open_ex: could not open file /var/run/samba/unexpected.tdb: No
such file or directory
Error connecting to 10.10.2.92 (No route to host)
100: Connection to pnicholls failed
SMB connection failed

any ideas?
cheers,
Paul.
 
Last edited by a moderator:
No route to host means your GP2X doesn't know how to get to 10.10.2.92

The 'route' command will list the routes

Is 10.10.2.92 the ip address of your PC's usb network i/f or its main network i/f?
 
Parkydr said:
No route to host means your GP2X doesn't know how to get to 10.10.2.92

The 'route' command will list the routes

Is 10.10.2.92 the ip address of your PC's usb network i/f or its main network i/f?
10.10.2.92 is the main network internal IP address of the PC.
The PC's usb network IP is set to 10.1.0.1 (GP2X = 10.1.0.2)

cheers,
Paul.
 
Last edited by a moderator:
Dr_Ian said:
I compile my game on windows and if it doesn't crash then I try it on gp2x. I have no way of debugging on gp2x but then again I never use debuggers anyway because I don't know what 'bugs' are??
I do pretty much the same, except that I've written a script that runs my app with stdout and stderr redirected to files on the SD card.

That way I can put debug messages in my code, copy it across to the SD card via a card reader, run it on the GP2X and then put the SD card back in the reader to view the output.

Works really well, and I don't waste batteries (I don't have an AC adaptor yet).

Coder.
 
Last edited by a moderator:
Paul Nicholls said:
Parkydr said:
No route to host means your GP2X doesn't know how to get to 10.10.2.92

The 'route' command will list the routes

Is 10.10.2.92 the ip address of your PC's usb network i/f or its main network i/f?
10.10.2.92 is the main network internal IP address of the PC.
The PC's usb network IP is set to 10.1.0.1 (GP2X = 10.1.0.2)

cheers,
Paul.


try

CODE
smbmount //10.1.0.1/gp2x /mnt/ext


then
 
Last edited by a moderator:
Using USB networking, I mount the root of the filesystem of the GP2X to Z: on Windows, then on cygwin I compile using this kind of command

CODE
gcc main.c -o main.gpe -blahblah && cp main.gpe /cygdrive/z/mnt/sd/appdir/
, thus my program automatically copies in case the compilation is succesful, and then I go on telnet and run my program using ./main.gpe in the appropriate folder.
 
i use the samba client (availible in the archive) so that i can mount directories from my windows pc over usbnet. in other words i can see my harddisk on the gp2x using that. and then i telnet to the gp2x kill the menu and start running everything from the shell, way faster then using the menu and it works great !
 
Back
Top