maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Confused with scratchbox (https://talk.maemo.org/showthread.php?t=11664)

free 2007-11-13 16:36

Confused with scratchbox
 
Hello

I would like to port some application to these nice little toys. I managed to do several ones but I can't say I really understand what I'm doing. Also looking at the documentation on scratchbox didn't really answer my questions.

What I did for a simple package, an arch-independent software (let's start by simple things first)

1)use x86 target
2)grab dependencies
3)configure build run with xephyr
4)switch to arm target
5) reconfigure, rebuild all
6) upload to the device

It worked until now but I'm not sure

* Does this seem logical to you?
* On step 3 what I did is
CFLAGS="-O2 -fomit-frame-pointer -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp"
Is that correct, usefull, or completly stupid?

* Can we run within the arm target?
* If yes, what's the use of x86 target?

* Where does qemu plays?

Any information from somebody who knows would greatly help me (or a link to a tutorial,..)

You don't need to answer to all questions in one go :)

Thanks a million

lardman 2007-11-13 17:05

Re: Confused with scratchbox
 
Quote:

-mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp
That's fine, but note that if you define -mcpu=arm1136jf-s, qemu (used by scratchbox to emulate an ARM processor) won't be able to run the resulting binary (this may cause problems if intermediate binaries are used).

Personally I just use "-mfpu=vfp -mfloat-abi=softfp"

X86 target allows you to startup the maemo gui and see what an app will look like. I never use it, I perfer to test on the device.

penguinbait 2007-11-13 17:26

Re: Confused with scratchbox
 
Quote:

Originally Posted by lardman (Post 94073)
That's fine, but note that if you define -mcpu=arm1136jf-s, qemu (used by scratchbox to emulate an ARM processor) won't be able to run the resulting binary (this may cause problems if intermediate binaries are used).

Personally I just use "-mfpu=vfp -mfloat-abi=softfp"

X86 target allows you to startup the maemo gui and see what an app will look like. I never use it, I perfer to test on the device.

So if you are just testing on the device (n800 in my case), there is no reason to use x86 at all? I have never used it?

cvmiller 2007-11-13 17:57

Re: Confused with scratchbox
 
Quote:

Originally Posted by penguinbait (Post 94088)
So if you are just testing on the device (n800 in my case), there is no reason to use x86 at all? I have never used it?

I agree. I have NFS mounted my scratchbox machine:/directory and run the apps directly on my N800. Of course, if you need to install libs to run your app, then it is a little more fun. Usually I just point my LD_LIBRARY_PATH to the nfs dir as well.

hope this helps,

Craig...

free 2007-11-13 18:20

Re: Confused with scratchbox
 
Ok x86 can start the maemo gui, it's the primary use.

And thanks for the idea of LD_LIBRARY path, no need to start it directly on the device, only remotely from the scratchbox.
I guess you have to set the DISPLAY variable to :0.0 for graphical stuffs?


Thanks you all for clarification so far!

penguinbait 2007-11-14 01:23

Re: Confused with scratchbox
 
Quote:

Originally Posted by cvmiller (Post 94122)
I agree. I have NFS mounted my scratchbox machine:/directory and run the apps directly on my N800. Of course, if you need to install libs to run your app, then it is a little more fun. Usually I just point my LD_LIBRARY_PATH to the nfs dir as well.

hope this helps,

Craig...


Wow I never thought of that its a good idea, I just tar it up and transfer to device. Not a bad Idea when you want to qucikly test something. I compile KDE and then transfer and pray :)

It usually goes smoothly, 90+ source packages:D

free 2007-11-14 15:04

Re: Confused with scratchbox
 
Yeah and it's the other way around, my post was wrong (eventhough it could work but makes no real sense)
Your tablet access your scratchbox release directory.

Saves a bit of time for debugging.
Good for you penguinbait isnt it? Means we'll get kde4 in less than a few days? :D

penguinbait 2007-11-14 15:19

Re: Confused with scratchbox
 
Quote:

Originally Posted by free (Post 94648)
Yeah and it's the other way around, my post was wrong (eventhough it could work but makes no real sense)
Your tablet access your scratchbox release directory.

Saves a bit of time for debugging.
Good for you penguinbait isnt it? Means we'll get kde4 in less than a few days? :D

I was/am not able to compile QT4, did I miss something somewhere?

free 2007-11-14 17:59

Re: Confused with scratchbox
 
Quote:

Originally Posted by penguinbait (Post 94662)
I was/am not able to compile QT4, did I miss something somewhere?

Yeah, that I was teasing you :-p

Back to the subject, I have a much more clearer view about the process, thank you all.

If there are new ideas, please post again!

penguinbait 2007-11-16 23:44

Re: Confused with scratchbox
 
Quote:

Originally Posted by lardman (Post 94073)
That's fine, but note that if you define -mcpu=arm1136jf-s, qemu (used by scratchbox to emulate an ARM processor) won't be able to run the resulting binary (this may cause problems if intermediate binaries are used).

Personally I just use "-mfpu=vfp -mfloat-abi=softfp"

X86 target allows you to startup the maemo gui and see what an app will look like. I never use it, I perfer to test on the device.


I am looking in Kinfocenter at the processors

Bogomips: 388.54
Features: swp half thumb fastmult vfp edsp java


I had just finished compiling KDE as always I do not add any extra flags. I am considering recompiling everything again using the optimizations you point out.

Two questions:
1) Do you think KDE would benefit from this, or only things like quake?

2) Would any of those other "Features" listed above be usefull?

You input is greatly appreciated :D


All times are GMT. The time now is 06:42.

vBulletin® Version 3.8.8