Porting From Linux (x86) To Linux (arm)


Grum

Still Fresh
Joined
Apr 14, 2008
Messages
8
Hello all,

I was just wandering how the technical minded folk here generally start going about a port from X86 to ARM, if you have the source code.

I know this is a very general question so at best I'm only expecting very general answers.
 
I don't really understand your question :blink:

To port something you need to know the diff between the 2 systems and the impact on the code :

for example to port the jpeglib you need only a support of filesystem <stdio.h> ( fopen ,fread ....) an support of a console ( printf )
it's all

all i needed rewrite to port for the NDS was the makefile to indicate the good target processor ....

and for optimization made some little modifications : put the critical functions in the 'ITCM' of the ARM9 ....


Now for graphics it is more difficult : needs more rewriting ....
 
OK, my bad I did word my question really badly. What I meant to say in part is are people already starting to port stuff to the pandora without hardware?
 
Grum said:
Hello all,

I was just wandering how the technical minded folk here generally start going about a port from X86 to ARM, if you have the source code.

I know this is a very general question so at best I'm only expecting very general answers.

For some software it will generally only require a recompile, others, changing of assembly code, or, writing / modding your own libraries.

The idea is, check and see if all of the code you're working with is in pure C (no assembly) and if the libraries it depends on are also as such. You can replace any necessary code with either straight C or preferably, ARM assembly.

You also have to take into account applications that use specific display routines (Qtopia vs X for instance) and see what the target device supports for output.

After that, you check your development environment, see if you've got all the stuff for cross-compiling. Make sure you can compile ARM, have all of the devel packages for the dependencies and give the compiler a whirl.
Copy it over to your target and try to run it. Don't count on it doing anything the first try, but as long as you can compile the code and get it to run (if only to return an error) you're already off to a great start.
 
Last edited by a moderator:
# ./configure --host=arm-linux

This will make most source code (if not depending on other libraries) compile, and probably even run on the gp2x.

Now for it to run well, a lot more sweat will be needed.
 
What's the best way to start work on a port when I dont have access to hardware?
 
Back
Top