View Single Post
Posts: 468 | Thanked: 610 times | Joined on Jun 2006
#3
Originally Posted by rash.m2k View Post
First question:

I'm trying to compile Apache Axis2c for the Nokia N9 (or any LGPL or permissive licensing tool that allows me to do XML data binding).

I do believe I have successfully cross compiled this using scratchbox. However even after reading the tutorials I am a little clueless on Scratchbox (I installed i using the python installer file from Nokia).

My questions is how does scratchbox work? As I understand it's a sandboxed environment where you change 'profiles' between host and target(s) and then compile apps for the target environment, but how can it emulate the ARM cpu? Specifically what is CPU Transparency?
You could see scratchbox as a wrapper around cross-architecture compilation tools, a changed root environment and (optionally) an emulator or remote device.
All this is done to get good performance and good debug output.
If you compile something in a scratchbox target, it looks to the developer as if you are just compiling on a platform of the chosen target (for example compiling for Maemo on ARM). But actually you are using crosscompilation tools. Scratchbox hides that complexity.

When you run an ARM compiled binary you can configure scratchbox to run the file within a changed root environment using either an ARM emulator (QEMU), or running the binary on an actual ARM CPU over a network (for example using scratchbox remote shell on a N900).

Scratchbox is rather complex, and I found that you really do need to know how a lot of the stuff works when compiling more complex stuff, otherwise you don't get why somethings do what they do.

Development using QtSDK is a lot more user friendly (and almost as powerful ). It uses MADDE instead of Scratchbox. (both have very similar functions).
If you are developing for N9, you might want to upgrade to the latest Qt Creator after installing the latest SDK. There are some bugs when using N9 (limited size of packaged projects.)

You need scratchbox if you want to compile kernel modules, and it may be easier if you use a lot of libraries that are not included in the QtSDK targets.
 

The Following 4 Users Say Thank You to Bernard For This Useful Post: