GP2X Gp2nix Developer Environment (poc)


timbobsteve

Member
Joined
Oct 4, 2005
Messages
301
Hi All,

I thought I would finally release some info on my soon to be released Linux development environment. Basically it is a completely standalone build environment for GP2X developers. Initially it will be released as a liveCD, but eventually it will be released as an installable ISO distribution and a host of different emu software versions (VirtualPC, VMWare etc). Also, stemming from my own frustration at the lack of complete linux based toolchains, I will release a tarball of my working toolchain and SDL libs. GP2niX is currently still being pieced together, but thanks to jboody's help in testing the toolchain, a release before the new year seems quite plausible.

ATM GP2niX has the following:

[System]
- Based on Slackware 10.2 (latest)
- X (basic setup)
- Fluxbox (a simple Window Manager)
- fbdesk (icons and desktop manager for Fluxbox)
- X-Pkgtool (install more packages when required [HDD Install Only])
[Developer]
- GNU Tools (for native x86 linux Dev)
- Original arm-linux toolchain (for GP2X)
- SciTE (basic text editor with syntax highlighting and gcc integration)
- SDL runtime libraries
- SDL for GP2X (files from gp32x.de archive "gp2xlibs.tar.gz")

[TODO]
- Add jboody's Simple Game Engine: SGE (libFreeType, libPNG and libLUA)
- Add native SDL Developer libraries and remove SDL-Runtime
- Strip unrequired files [man pages etc.]
- Create standard developer user for LiveCD
- Add configuration option for GP2X Develoment under SciTE
- Configure Asthetics (GP2niX Themes etc)

At the moment the entire system is just over 1GB. This has to be drastically reduced to be usable. Manual files and unneccessary libraries are most likely the best place to start culling space. There is also alot of tmp stuff that was used during the CrossTool process (actually crosstool used alot of space). My own toolchain is roughly 120M (and can probably be stripped more)

Overall I think the liveCD image is going to be around 500 Mb. Is this acceptable to the community?

Just a side note, GP2niX is not trying to compete with andLinux (or andGP2X), it is instead, meant to be an alternative development environment for those who seek a native linux system to develop for the GP2X console.

Although there is no release at the moment I feel the need to thank a few people:

-jboody for testing my arm toolchain
-LordDavon for his help on working with arm-linux and the SDL libs
-evening2005 for CrossTool help and information on arm-linux toolchain

Hopefully with a bit of support from everone I can get this released before the new year and we can all be happy little dev'ers !!!!!

Updates soon!
 
Last edited by a moderator:
1GB!?

You must be including a lot .. Linux distros tend to be _enormous_ (one of the things that annoys me about Linux distros.. they've forgotten their history about being lean or big, up to the user. Should clock in with as little as 100MB give or take..)

I'd ensure Emacs or XEmacs, and VIM are on there (though Emacs may not be healthy for trimming sizes down.. a not-too-tight Emacs coudl clock you about 10MB all by itself :/)

You could probably toss out quite a lot of packages and utils .. ie: Did slackware defaults bring you postscript print support and all that sort of frivilous stuff? games? media apps like movie viewers? Cut out all that :)

jeff
 
Great! I cannot wait for your distro.

Especially, I like your taste of choice of the system - slack, fluxbox - (the simple is the best, give me more control !!)

IMO, the simple vi will be enough (at least for me) than fancy VIM or emacs..though I know the power of emacs..
 
timbobsteve posted on Dec 19 2005 at 03:55 AM said:
Also, stemming from my own frustration at the lack of complete linux based toolchains, I will release a tarball of my working toolchain and SDL libs.

Now THAT'S something I really want to see! I was quite stunned when I tried to find a native linux toolchain and found nothing. Since I use linux as my primary OS I'm not really that interested in an complete distro or a Live CD but rather just an installable toolchain, like the ones offered for Windows and MacOS X.

Looking forward to your release, keep up the good work!
 
Last edited by a moderator:
skeezix posted on Dec 19 2005 at 02:04 PM said:
1GB!?

You must be including a lot .. Linux distros tend to be _enormous_ (one of the things that annoys me about Linux distros.. they've forgotten their history about being lean or big, up to the user. Should clock in with as little as 100MB give or take..)

As I said, it is only in the development stage... my main concern was actually getting a working toolchain that would compile and work for gp2x dev!

I'd ensure Emacs or XEmacs, and VIM are on there (though Emacs may not be healthy for trimming sizes down.. a not-too-tight Emacs coudl clock you about 10MB all by itself :/)
emacs is out (mainly personal preference) I will put in vi, joe and nano for CLI editing.

You could probably toss out quite a lot of packages and utils .. ie: Did slackware defaults bring you postscript print support and all that sort of frivilous stuff? games? media apps like movie viewers? Cut out all that :)

again... beginning stages of creation... I started with a 1GB slack install... now I am stripping it.... NOTE: slack install was 500MB with almost nothing installed.

All printing support is removed. Emacs is not installed. KDE and Gnome are non-existant. Man pages take up ALOT of space. CrossTool build directory is around 300 Mb. Still have to rip out alot of libs.

Perhaps I can make up a list of Pkg's currently installed and someone could browse the list and give hints on removal trimming space?

Anyway... I only get to work on it at night... work is usually pretty tight on letting me work with linux (they are M$ fanboyz!)
 
Last edited by a moderator:
Don't be silly. Slackware ends up just around 1Gb at a full install.

vim should be included (hey, it's not THAT big),
emacs could be replaced with mg,
fluxbox should probably be replaced with pekwm (more usability, smaller size), but why on earth would you need X on such a machine? Sounds silly.
A lot of development manual pages should be kept, while most program manuals can be removed. However, these take almost no space at all when gzipped, really.

timbobsteve posted on Dec 19 2005 at 04:44 AM said:
skeezix posted on Dec 19 2005 at 02:04 PM said:
1GB!?

You must be including a lot .. Linux distros tend to be _enormous_ (one of the things that annoys me about Linux distros.. they've forgotten their history about being lean or big, up to the user. Should clock in with as little as 100MB give or take..)

As I said, it is only in the development stage... my main concern was actually getting a working toolchain that would compile and work for gp2x dev!

I'd ensure Emacs or XEmacs, and VIM are on there (though Emacs may not be healthy for trimming sizes down.. a not-too-tight Emacs coudl clock you about 10MB all by itself :/)
emacs is out (mainly personal preference) I will put in vi, joe and nano for CLI editing.

You could probably toss out quite a lot of packages and utils .. ie: Did slackware defaults bring you postscript print support and all that sort of frivilous stuff? games? media apps like movie viewers? Cut out all that :)

again... beginning stages of creation... I started with a 1GB slack install... now I am stripping it.... NOTE: slack install was 500MB with almost nothing installed.

All printing support is removed. Emacs is not installed. KDE and Gnome are non-existant. Man pages take up ALOT of space. CrossTool build directory is around 300 Mb. Still have to rip out alot of libs.

Perhaps I can make up a list of Pkg's currently installed and someone could browse the list and give hints on removal trimming space?

Anyway... I only get to work on it at night... work is usually pretty tight on letting me work with linux (they are M$ fanboyz!)
 
Last edited by a moderator:
gamkiller posted on Dec 19 2005 at 02:08 AM said:
fluxbox should probably be replaced with pekwm (more usability, smaller size), but why on earth would you need X on such a machine? Sounds silly.

I was under the impression that this distro was to give newbies an easy to use, no setup required development environment. Considering that, placing them at a terminal with no windowing environment will likely be enough to send them right back to Windows cowering in a corner. Very few are comfortable with the command line these days. Not giving them X sounds even more silly.
 
Last edited by a moderator:
i look forward to this linux distro .. and i don't agree that putting 'newbie programmers' at a shell prompt is a bad thing .. if you're going to write software, for fun or even for a living, there is utterly no excuse, and i really mean, no excuse, for being scared of the terminal .. newbie programmers who don't want to go near the terminal 'because its not productive for them' are, pretty much, not even near kindergarten, let alone graduating to newbie status .. this is just my opinion of course, but if you can't get the cajone's up to make Makefile, then geeze .. life is going to be one big long drag for you, Mr. Expert Programmer, running away from things you "don't like" ..

;)

write code. run code. repeat.
 
I'm happy either way. Terminal or X. As long as it's an easier solution than using Windows (Ugh, I'm so lazy...).
 
noname posted on Dec 19 2005 at 05:31 AM said:
Now THAT'S something I really want to see! I was quite stunned when I tried to find a native linux toolchain and found nothing. Since I use linux as my primary OS I'm not really that interested in an complete distro or a Live CD but rather just an installable toolchain, like the ones offered for Windows and MacOS X.

There are several options to build working tool-chains from scripts (and the scripts easy to get and use, check the DevKitGP2X or Open2x build scripts, loads of people are using them without any issues).

If you’re on Linux then building your own tool-chain could be considered desirable and seems to suit most people who have expressed a preference (Linux users (as a rough rule) tend to want control of the build, install, optimisations etc. etc.).

Hence binaries only currently being made for the systems that require very evil/complex build processes (Canadian cross, building gLibC on Linux and porting it over ect.). Building GCC from scripts on Linux for Linux is a walk in the park.
 
Last edited by a moderator:
This isn't the dark ages, so I wouldn't sweat things like X -- its not _that_ big anymore. Back in 1992 when we didnt have working shared libs, life was harder .. but these days the XServer is only a couple of MB. Its all the extra packages and funk that bulk up, and you don't need most of that stuff.

But yeah, the big toruble is cutting it down and deciding what to rip out.. good call :)

I'd toss emacs I suppose (emacs folks will make their own build chain anyway), but include simple GUI editors.. if your goal is to make it friendly, you need X and you need friendly easy editors with clickies :)

Try not to make decisions on your personal preference though .. make them based on the needs of your target audience (which could also be you of course :)

jeff
 
torpor posted on Dec 19 2005 at 03:11 AM said:
i look forward to this linux distro .. and i don't agree that putting 'newbie programmers' at a shell prompt is a bad thing .. if you're going to write software, for fun or even for a living, there is utterly no excuse, and i really mean, no excuse, for being scared of the terminal .. newbie programmers who don't want to go near the terminal 'because its not productive for them' are, pretty much, not even near kindergarten, let alone graduating to newbie status .. this is just my opinion of course, but if you can't get the cajone's up to make Makefile, then geeze .. life is going to be one big long drag for you, Mr. Expert Programmer, running away from things you "don't like" ..

;)

write code. run code. repeat.

And X removes them from the terminal how? A terminal is still just a mouseclick away and all of that power is right at their fingertips. Using a DE, even Flux, provides them with a bit of a comfort zone, though. What's the excuse for leaving out X these days? To save a few MB? For "performance"? They're not going to be running this on a 486 with 4MB of RAM. A well-setup Fluxbox desktop will have benefits that far outweigh the downsides.
 
Last edited by a moderator:
OK.... tinkered with Slimming Slack last night. List of progress:

Removed all Manual Pages (don't worry some will go back in!)
Removed all unnecessary files from CrossCompile (around 300Mb)
Slimmed ToolChain to roughly 80Mb (this includes libs!)
Removed networking packages (whois, tracert, wirelees-tools etc) TCP/IP and DHCP Client are still in!

The distro is sitting around 830Mb which is still far too big for my liking.
I hace tar.gz'pd my toolchain and I will do a complete re-install of Slackware tonight to see if I can start even smaller.

In terms of manual pages I will only be leaving in dev related man pages. I think that the user will easily be able to log onto the net using GP2niX if they need info on using mv/cp/ls etc.

As I mentioned I have tar'd my toolchain... does anyone have any place to host it?

More news soon.

BTW: X is in, emacs is out, vim is a possability. Other than that not much else is being added.
 
Here is my working SDK for linux.

It includes SDL and the arm-linux toolchain.
There is also a working test program included.

http://www.savefile.com/files.php?fid=8113652

To install, copy the file to / and extract with "tar -zxvf gp2x-linux-toolchain.tar.gz"

The file should extract to /opt/ creating the following directory structure:

/opt/
/opt/local/
/opt/local/gp2x
/opt/local/gp2x/bin
/opt/local/gp2x/gp2x-test
/opt/local/gp2x/include
/opt/local/gp2x/info
/opt/local/gp2x/lib
/opt/local/gp2x/libexec
/opt/local/gp2x/man
/opt/local/gp2x/share

Add the toolkit to your path:

export PATH=/opt/local/gp2x/bin:$PATH

Now you can run the compiler using the following:

arm-linux-g++

Remember to change the compiler binary in your own makefiles to make sure they use the correct compiler.

Let me know of any defects or problems you experience with the DevKit.
 
Already looked into it... not really what I wanted.
Not only do I want a minimalist slackware environment to dev for the GP2X in, I also wanted to sue this project as an opportunity to learn a little more about the inards of linux.

Thanks for the suggestion though.
 
Hi timbobsteve,

It looks like you are off to a good start. I have some questions and comments about what you are planning on supporting with your distribution.

1) Are you going to support a native and cross-compiling environment (especially for SDL) so that people can compile their programs under Linux in addition to compiling for the GP2X. I have found this very useful myself so far because it makes debugging so much easier. In my mind this eliminates the question of whether or not to include X. Please include it, if only for the purpose of creating a better debugging environment.

2) Are you going to support static and dynamic linking? Static is easy, but for dynamic it would be nice to have a "standard" GP2X libraries that you download to the GP2X. This would allow us to have a standard set of libraries that we could depend on for dynamic linking.

3) I think it would be nice to support other libraries in addition to the SDL ones although I currently don't use them yet. i.e. Rlyeh's minimal lib and Pygame. I can understand if they are not in a first release though.

4) Let me know if you need help with more demos/tutorials. Any suggestions on topics?

5) What kind of documentation are you going to include (I think the lack of documentation is currently the biggest problem with setting up a dev environment)? I think that installation directions and a tutorial based on the gp2x-test program would be a minimum.

I'll download your dev environment tonite and give it a shot.

--Jeff
 
jboody posted on Dec 20 2005 at 03:54 PM said:
1) Are you going to support a native and cross-compiling environment (especially for SDL) so that people can compile their programs under Linux in addition to compiling for the GP2X. I have found this very useful myself so far because it makes debugging so much easier. In my mind this eliminates the question of whether or not to include X. Please include it, if only for the purpose of creating a better debugging environment.

Already planned to add SDL_Linux and SDL_GP2X libs for dev. I too prefer to debug on linux.

2) Are you going to support static and dynamic linking? Static is easy, but for dynamic it would be nice to have a "standard" GP2X libraries that you download to the GP2X. This would allow us to have a standard set of libraries that we could depend on for dynamic linking.

Perhaps you could help me out with this. ATM I think there is quite a few different builds of dynamic libs for GP2X. If you could hunt down a reliable set of Dynamic Libs I can write Up an installer script to help ppl get them on the GP2X. Personally though I think dev's should statically link all there progs... saves users confusion with resolving dependancies.

3) I think it would be nice to support other libraries in addition to the SDL ones although I currently don't use them yet. i.e. Rlyeh's minimal lib and Pygame. I can understand if they are not in a first release though.

I had originally planned to support Rlyeh's MinimalLib, SDL and the leaked GPH SDK. I have however decided to remove the GPH SDK (I cannot find a working version). Perhaps I can replace it with PyGame. Either way, Rlyeh's lib and PyGame are not going to be in the initial release. I also have to work in your SGE library (is that right? is it a library or a binary with scripting support?).

4) Let me know if you need help with more demos/tutorials. Any suggestions on topics?

Perhaps you can test out my ToolChain yourself. I have had one report of it not working at all for one user (but this is most likely to me breaking you makefile :p)

5) What kind of documentation are you going to include (I think the lack of documentation is currently the biggest problem with setting up a dev environment)? I think that installation directions and a tutorial based on the gp2x-test program would be a minimum.

There is already a basic readme for the ToolChain I released thismorning. In the proper release of GP2niX I will most likely have more Doco on using CLI to compile, using makefiles, a standard makefile for ppl to use, info on using SciTE in GP2X and C++/C editing modes (this is most exciting), I will probably need a makefile for standard x86 SDL apps and a little bit of doco on SDL dev as well. If you want you can try and help out with some of this.

I'll download your dev environment tonite and give it a shot.

Probably not the best idea ATM. It seems to be broken, fix will be up in aprx 16hrs from this post (I am in Australia, so it makes it hard to tell the time everywhere else)

I will have another release soon. Hopefully by 2morrow I will have a sourceforge project up and will be able to host files there.

Are you any good with web pages jboody? I might need a webpage done. Just a thought.
 
Last edited by a moderator:
Perhaps you could help me out with this. ATM I think there is quite a few different builds of dynamic libs for GP2X. If you could hunt down a reliable set of Dynamic Libs I can write Up an installer script to help ppl get them on the GP2X. Personally though I think dev's should statically link all there progs... saves users confusion with resolving dependancies.

Lets just get a version that works with static linking first, but I think it would still be good if we had a set standard GP2NIX libraries that the user could install on their GP2X and know that any programs written using GP2NIX would work.

I also have to work in your SGE library (is that right? is it a library or a binary with scripting support?).

Currently it is a binary that that runs Lua scripts and also loads my Lua API. It works like Python where you run "python script.py"

Perhaps you can test out my ToolChain yourself. I have had one report of it not working at all for one user (but this is most likely to me breaking you makefile)

Yep. I tried out the ToolChain and found a few things so I stopped. The bin directory did not have executable permission so I typed "chmod 755 /opt/local/gp2x/bin/*". You changed the target of the Makefile to gp2x-test.gpe from gp2x-test which causes the Makefile to expect gp2x-test.gpe.cpp which doesn't exist. Normally my Makefile generates a binary file called gp2x-test and then you launch it on the GP2X with the script gp2x-test.gpe. If you don't launch the binary with the script then it won't return to the menu when the program executes. I did not name the binary with a gpe extension so that people would not accedently run the wrong one.

While you are fixing these problems, I will improve my gp2x-test demo. As far as web pages go I tend to write them by hand using standard HTML (see SGE Homepage for an example). I'll be happy to do it as long as my style is ok with you though.

--Jeff
 
Back
Top