Compliling/building Linux Software To Run On Pandora


stustaff

Member
Joined
Jan 25, 2008
Messages
297
Ok so as far as I can work out say a piece of software exists..(im using x-moto as the example as thats what im looking at) for Linux - http://en.wikipedia.org/wiki/X-Moto

And there are currently 'builds' for Ubuntu and Fedora and OSX and Windows

Does it then follow that its possible to bulid one that will run on the pandora's Linux OS?

I have never used linux so dont really understand all this building stuff

or is all that irrelavent and the game needs porting? whats the difference their Port or build.
Its all very confusing.
 
stustaff said:
Ok so as far as I can work out say a piece of software exists..(im using x-moto as the example as thats what im looking at) for Linux - http://en.wikipedia.org/wiki/X-Moto

And there are currently 'builds' for Ubuntu and Fedora and OSX and Windows

Does it then follow that its possible to bulid one that will run on the pandora's Linux OS?

I have never used linux so dont really understand all this building stuff

or is all that irrelavent and the game needs porting? whats the difference their Port or build.
Its all very confusing.



Yes it is possible (and very likely that it will be ported soon). Why? Because there is the source code available. If there would be only builds (binary files) available for whatever Linux that runs on an x86 machine, it would not be possible, unless there's also the source code available, so it can be ported to the arm architecture, the pandora uses.

Building stuff means compiling the source code to executable binary files.

Porting something means basically the same but also incorporates adjusting the code, so that it runs on a different architecture.

That simply means xmoto needs to be ported from x86 to arm (and probably to OpenGL ES).

HTH
 
Last edited by a moderator:
MONVMENTVM said:
stustaff said:
Ok so as far as I can work out say a piece of software exists..(im using x-moto as the example as thats what im looking at) for Linux - http://en.wikipedia.org/wiki/X-Moto

And there are currently 'builds' for Ubuntu and Fedora and OSX and Windows

Does it then follow that its possible to bulid one that will run on the pandora's Linux OS?

I have never used linux so dont really understand all this building stuff

or is all that irrelavent and the game needs porting? whats the difference their Port or build.
Its all very confusing.



Yes it is possible (and very likely that it will be ported soon). Why? Because there is the source code available. If there would be only builds (binary files) available for whatever Linux that runs on an x86 machine, it would not be possible, unless there's also the source code available, so it can be ported to the arm architecture, the pandora uses.

Building stuff means compiling the source code to executable binary files.

Porting something means basically the same but also incorporates adjusting the code, so that it runs on a different architecture.

That simply means xmoto needs to be ported from x86 to arm (and probably to OpenGL ES).

HTH


Ah ok so in effect a build means making something 'executable'and able to run on software and hardware that it should work on ex X86 and linux

Porting in this case would mean the same but also amending the source code to work on an architecture it wasnt originally written for.

is that right?
 
Last edited by a moderator:
The terms that are confusing you are all part of the programming/development process when working on different operating systems, and flavors there-of. "Builds" and the process of "Building" a program is simply taking the available sourcecode and compiling it for a specific OS or Platform. As a general rule of thumb, if a program exists for Linux and is open source; it can be compiled (or built) for the Pandora with little or no effort at all. Building is available to anyone regardless of programming know-how. If you can download source, and type "Configure" and "Make" in a terminal window you can build software from the source (Most of the time). Porting is the process of taking a program designed for another platform (Nintendo DS/Windows/Andriod/etc) and massaging it so that it will work on the Pandora's platform, Angstrom Linux. Porting is more involved because it takes rooting around in the programs source and making changes.

People will often throw the words "Build" and "Port" around interchangably. That's ok. Ultimately they are synonmous with taking a program from one platform and making it run on another.

This flowchart from the Wiki is designed to tell you if a "Program X" can be made to run on the Pandora.

If you decide it's time to dirty your hands and you want to build a program from source, here's a simple tutorial from tuxfiles.
 
Ok so on the flow chart i get as far as is the software written in a language for which there is an ARM compiler available

Its written in well i dont know and cant find it anywhere does this give any clues?

* libsqlite integration (for a better and faster data managing)
* libcurl is now mandatory
* sdl_ttf integration (DejaVuSans.ttf is used)
* utf-8 integration

Edit found it! it says The source package is also available in C++

so is there a compiler for C++ in ARM?
 
stustaff said:
so is there a compiler for C++ in ARM?
Yep. GCC is ported to ARM. Worth having a look at this page if you are new to programming as GCC is available for the vast majority of platforms: http://gcc.gnu.org/

You might want to check to see if the libraries you need are available for ARM, other than that it's all good.
 
Last edited by a moderator:
A collection of Software functions under a common name that you can include into your code for the sake of not having to type and develop everything yourself.
'libsqlite' for example would be a libary that contains a DataBase Engine
 
stustaff said:
libraries?
Yes, the ones you already mentioned:
stustaff said:
* libsqlite integration (for a better and faster data managing)
* libcurl is now mandatory
* sdl_ttf integration (DejaVuSans.ttf is used)
* utf-8 integration
Something I should explain is why libraries exist. The base functionality of languages like C and C++ is actually fairly small, you add the extra functions you need with libraries. Some of these are standard so that all compilers can rely on them being available (stdio in C, for example), but many are not standard. I am unsure about which categories the ones you have mentioned are in (standard or not) but the fact they have been pointed out means they are likely to be non-standard.

This is fine if they are available for ARM. If not every time a function from, let's say libcurl, is used the compiler won't know what to do with it.

Have a look for the libraries availability on ARM. If you can't find them hopefully someone here will be able to tell you whether your libraries are available, or how easy they will be to obtain.
 
Last edited by a moderator:
stustaff said:
* libsqlite integration (for a better and faster data managing)
* libcurl is now mandatory
* sdl_ttf integration (DejaVuSans.ttf is used)
* utf-8 integration
libcurl shouldn't be a problem (library for HTTP downloads, basically, so can probably even just be stripped out). SDL_TTF is standard fare and is definitely available (as would be "UTF-8", which isn't a library as such just a way of handling fonts/international text). SQLite may be a bit more of a problem - that's a cut-down version of an SQL database - a quick Google, however, shows it is marked as "cross platform"

So the chances are this is easily portable in terms of requirements... the only problem would be specifics such as is it hardcoded for a certain size screen, does it include optimisations specifically for x86, does it rely on having Internet/joypad/keyboard/hardware acceleration etc. But that's all part of porting anything anyway.
 
Last edited by a moderator:
ledow said:
stustaff said:
* libsqlite integration (for a better and faster data managing)
* libcurl is now mandatory
* sdl_ttf integration (DejaVuSans.ttf is used)
* utf-8 integration
libcurl shouldn't be a problem (library for HTTP downloads, basically, so can probably even just be stripped out). SDL_TTF is standard fare and is definitely available (as would be "UTF-8", which isn't a library as such just a way of handling fonts/international text). SQLite may be a bit more of a problem - that's a cut-down version of an SQL database - a quick Google, however, shows it is marked as "cross platform"

So the chances are this is easily portable in terms of requirements... the only problem would be specifics such as is it hardcoded for a certain size screen, does it include optimisations specifically for x86, does it rely on having Internet/joypad/keyboard/hardware acceleration etc. But that's all part of porting anything anyway.


Thanks for adding some more info ledow, I was hoping it would be something I could attempt and whilst im pretty technology Savvy it looks like its beyond me :( really want to see this game on there too.
 
Last edited by a moderator:
Look in Debian package repositories for the armel architecture and in the Ångström repositories for stuff that is already compiled and works.
 
I dont know if anyone could do this or if it represents loads of work

but it would be good if someone could post a HIGH level FAQ or guide to this

e.g
1 - Get source Code
2 - check if libraries are available in xxxx
3 - if not then xxxx
4 - etc

Im willing to have a go and start trying to port/build something and will use google forums etc but could do with a start point.

Actually first I might try asking people in the X-Moto forums who create the different Linux Builds for help or if they are willing to do it.

Whats the info I would need to give them about the P and its operating systems?
 
Why don't you work your way up to this? You have no idea how to program or use linux.. Why don't you learn at least one or the other first?

X-moto will be amongst the first things ported to Pandora, compiling all the extraneous libraries and crap is child's play usually, you are fretting over some silly crap.
 
Senor Quack said:
Why don't you work your way up to this? You have no idea how to program or use linux.. Why don't you learn at least one or the other first?

X-moto will be amongst the first things ported to Pandora, compiling all the extraneous libraries and crap is child's play usually, you are fretting over some silly crap.
Well working my way up to it is kind of the whole point, I tend to learn best when looking at an actual problem and Learn especially well if its something i'm motivated to do.

How do I learn unless its based around doing somehthing? im open to suggestions.

Will it? ok thats good then but it is something id still like to learn to do.

Sorry if you think im 'fretting' and that its "Silly Crap" im 'fretting' over.
personally Im excited about the possibilities of playing something I really like on a portable device maybe that excitement comes across as fretting?
 
Last edited by a moderator:
I think it'd be a practical plan to take as little time as 4 months to learn C and Linux enough to do a port of something. It'd be a bit more though to learn the C++ you'd need to understand what was going on in X-moto.

You don't need to learn full-blown C++ to port a C++ program, though, that is the good news. Once you are introduced to the fundamentals, it's enough because you won't be designing classes, just using the existing ones in the program and doing most of your work in straight C if you want.

As to whether the OpenGL stuff will work seamlessly with the Pandora would not be my department, I have no experience with 3D at all. You might have to learn even more if some sort of incompatibility is found.

I like X-moto and hope you succeed, there's plenty of time between now and when the Pandora is in most people's hands.

edit to add: You can find every single piece of information you need to start from scratch learning how to port something on these very forums. Just search the forums with google for the information you need. Also, read K&R's book, Bruce Eckel's Thinking in C++, together with a LOT of various forum topics. Add site:gp32x.de in your google search terms and you can search past topics much better than the site's search engine. Worked for me.
 
Last edited by a moderator:
Senor Quack said:
I think it'd be a practical plan to take as little time as 4 months to learn C and Linux enough to do a port of something. It'd be a bit more though to learn the C++ you'd need to understand what was going on in X-moto.

You don't need to learn full-blown C++ to port a C++ program, though, that is the good news. Once you are introduced to the fundamentals, it's enough because you won't be designing classes, just using the existing ones in the program and doing most of your work in straight C if you want.

As to whether the OpenGL stuff will work seamlessly with the Pandora would not be my department, I have no experience with 3D at all. You might have to learn even more if some sort of incompatibility is found.

I like X-moto and hope you succeed, there's plenty of time between now and when the Pandora is in most people's hands.

edit to add: You can find every single piece of information you need to start from scratch learning how to port something on these very forums. Just search the forums with google for the information you need. Also, read K&R's book, Bruce Eckel's Thinking in C++, together with a LOT of various forum topics. Add site:gp32x.de in your google search terms and you can search past topics much better than the site's search engine. Worked for me.




Thanks Senor Quack, I'll start having a look through all that.
 
Last edited by a moderator:
Back
Top