GP2X Building An Sdk


Oscaruzzo

Member
Joined
Sep 26, 2005
Messages
227
Age
50
Location
Italy
Website
Visit site
OK, since it looks like the gp2x comes with exactly zero bytes of software, I'm about to build my own SDK for linux from the source code.

I'd like to build something that can build executables which will run on the gp "as is", ie without changing kernel, libc or other libraries. Also, i'd like having dinamic linked libraries, to keep binaries small.

So, what do I need to download? I already did some experiments, but i know that binutils, libc and gcc must match the ones that gph shuld provide.

Basically I'm going for this "combination"

glibc 2.2.5
gcc 3.2.3
binutils 2.16.1

Do I need something else (or some different versions)?

For those of you who got the "prototype" SDK: what software are you using?
 
no, use gcc4

As I said, I'd like to try putting dyncamically linked executables (or libraries) on the GP2X "as it is". Compiling with GCC4 would force me either to link everything statically, or upgrade the GP2X to have a dual libc configuration...

Edit: I saw you added "evrything before 3.5 is awful slow on arm". Is this so bad? That would be a good reason to try making the two runtimes live together...
 
Last edited by a moderator:
Put it this way...

Quake compiled with 2.95 with full optimization = 1.17 frames/sec.
Quake compiled with 4.03 with partial optimization = >10 frames/sec.

So, GCC4 is roughly 8.5 times faster :)
 
Anything thats 3.4.0 or above is a huge amount quicker at floating point operations (as long as you compile gcc with soft-float support). Quake2 went from 0.75 fps to 5.5fps just by doing that.
 
Put the SDK on the GP2X. Its really un-necessary to have any other development machine than the GP2X itself.

Think about it a bit. No "external SDK" work is worth the effort, the only decent thing to do is build an SD-based 'add-on' to the GP2X that can self-host: tools to build the -complete- system should be on the image, yes .. kernel, gcc, binutils, SDL, etc.

Soon as I get my GP2X and get some time with it (gonna port some of my old games to it, first-thing), I'll dig in on any effort to get self-hosting devtools on an SD-based 'extension' to the default (GPH-provided) system image ..
 
Put the SDK on the GP2X. Its really un-necessary to have any other development machine than the GP2X itself.

Nice idea, but the GP2X itself is too slow to compile large projects, and would cause far too much wear to SD cards and/or NAND. Much better to do the development on a PC and just copy the exe over.
 
Last edited by a moderator:
Last edited by a moderator:
OK, since it looks like the gp2x comes with exactly zero bytes of software, I'm about to build my own SDK for linux from the source code.

I'd like to build something that can build executables which will run on the gp "as is", ie without changing kernel, libc or other libraries. Also, i'd like having dinamic linked libraries, to keep binaries small.

So, what do I need to download? I already did some experiments, but i know that binutils, libc and gcc must match the ones that gph shuld provide.

Basically I'm going for this "combination"

glibc 2.2.5
gcc 3.2.3
binutils 2.16.1

Do I need something else (or some different versions)?

For those of you who got the "prototype" SDK: what software are you using?

I hope that using DLLs doesn't end up like windows though. You have all of these little files everywhere and it is a pain to figure out what to remove if you delete the app. If you move the app it is a pain to know what dll to move with it too. Simpler is better. Just like most of the GP32 stuff drag ONE file onto the card and go, no need to build a complex directory structure with files sprayed everywhere, much to sloppy. So the app takes a few kilobytes more, BFD 2 gig cards are pretty cheap.
 
Last edited by a moderator:
OK, since it looks like the gp2x comes with exactly zero bytes of software, I'm about to build my own SDK for linux from the source code.

I'd like to build something that can build executables which will run on the gp "as is", ie without changing kernel, libc or other libraries. Also, i'd like having dinamic linked libraries, to keep binaries small.

So, what do I need to download? I already did some experiments, but i know that binutils, libc and gcc must match the ones that gph shuld provide.

Basically I'm going for this "combination"

glibc 2.2.5
gcc 3.2.3
binutils 2.16.1

Do I need something else (or some different versions)?

For those of you who got the "prototype" SDK: what software are you using?

I hope that using DLLs doesn't end up like windows though. You have all of these little files everywhere and it is a pain to figure out what to remove if you delete the app. If you move the app it is a pain to know what dll to move with it too. Simpler is better. Just like most of the GP32 stuff drag ONE file onto the card and go, no need to build a complex directory structure with files sprayed everywhere, much to sloppy.
Why not just have a /lib directory in the NAND or on the SD card, that all the programs via linux adhere to and use?
 
Last edited by a moderator:
"Why not just have a /lib directory in the NAND or on the SD card, that all the programs via linux adhere to and use?"

Because the /lib on normal linux machines is full of symlinks, and the FAT32 on the SD card doesn't support symlinks.
 
Is there documentation available on how to build a crosscompiler from the GCC sources?
I guess i can just compile glibc with that to have a working build environment, but correct me if i'm wrong.
Does the gp2x support native posix threads, or should I use linux threads?
I'm using GNU/Linux with a native GNU build system.
Any other suggestions or remarks?

Edit:
theoddbot: I can't imagine why "mke2fs -j" shouldn't work,
but probably it's just my lack of knowledge about SD-cards

SirDzstic
 
Back
Top