Posts: 36 | Thanked: 13 times | Joined on Dec 2009 @ Bandung, Indonesia
#1
From the Maemo SDK Installation Guide I have to install Maemo 5 SDK on Scratchbox with two targets: ARMEL and X86.

I can run the Maemo UI using X86.

ARMEL is used for compiling applications for the actual device/N900 (since the device uses ARMEL, not X86). ARMEL also supports other features like OpenGL ES, which X86 doesn't.

This confuses me, so what's the use of X86 target if I can just use ARMEL for everything?

From limited observation, it seems that X86 is useful for one and only one purpose: running X86 apps as-is. That is, I can compile a Qt app using Qt creator on Ubuntu, and run exactly that same executable on X86 Maemo on Scratchbox.

Whilst if I use ARMEL, I'll need to compile that app using QMake etc. inside Scratchbox ARMEL, and then run it. Is this the case?

Any guide is appreciated. Thank you.
 
slobodsky's Avatar
Posts: 63 | Thanked: 41 times | Joined on Feb 2010 @ Moscow
#2
Maemo SDK has no emulator. You can't run ARMEL binaries on your PC. You have to compile your app for X86 target to debug it on your PC in Xephir environment (N900-like UI).
__________________
Sorry for bad English. If you can point out mistakes in this post, send me a private message.
 

The Following User Says Thank You to slobodsky For This Useful Post:
Posts: 36 | Thanked: 13 times | Joined on Dec 2009 @ Bandung, Indonesia
#3
Originally Posted by slobodsky View Post
Maemo SDK has no emulator. You can't run ARMEL binaries on your PC. You have to compile your app for X86 target to debug it on your PC in Xephir environment (N900-like UI).
So that means ARMEL target is only usable for compiling apps, and X86 is only usable for running apps?
 
velox's Avatar
Posts: 390 | Thanked: 1,332 times | Joined on Dec 2009
#4
Originally Posted by ceefour View Post
So that means ARMEL target is only usable for compiling apps, and X86 is only usable for running apps?
Basically, yes.

The link you've posted above contains links to forum.nokia.com, where interested soon-to-be-developers can find a lengthy but nice flash-tutorial about installing the SDK and the basics of using it, it might actually answer most of your questions.

direct link: http://www.forum.nokia.com/document/..._with_Maemo_5/ (beware, has sound)
 

The Following 2 Users Say Thank You to velox For This Useful Post:
Posts: 36 | Thanked: 13 times | Joined on Dec 2009 @ Bandung, Indonesia
#5
Originally Posted by velox View Post
Basically, yes.

The link you've posted above contains links to forum.nokia.com, where interested soon-to-be-developers can find a lengthy but nice flash-tutorial about installing the SDK and the basics of using it, it might actually answer most of your questions.

direct link: http://www.forum.nokia.com/document/..._with_Maemo_5/ (beware, has sound)
Thanks velox! I can't believe I've downloaded the ZIP version of Getting Started with Maemo 5 and I haven't opened it yet. Too many files littered all over my hard drive. (I hope soon file managers/desktop environments have a feature to easily mark & find important files etc.)

Thanks for reminding me!
 
slobodsky's Avatar
Posts: 63 | Thanked: 41 times | Joined on Feb 2010 @ Moscow
#6
Originally Posted by ceefour View Post
So that means ARMEL target is only usable for compiling apps, and X86 is only usable for running apps?
Not quite. You need ARMEL target for compiling apps for device when you want to see how they will run there. Before this you compile, run and fix bugs on PC with X86 target. It's different from current Windows Mobile development where we have an emulator and run native ARM binaries on PC.
__________________
Sorry for bad English. If you can point out mistakes in this post, send me a private message.
 

The Following User Says Thank You to slobodsky For This Useful Post:
Posts: 15 | Thanked: 3 times | Joined on Jan 2010
#7
You can also run/test using the ARMEL target, but you need to execute it remotely (on your N900, if you have SSH set up). You can still debug it that way.
 
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#8
Originally Posted by slobodsky View Post
Maemo SDK has no emulator. You can't run ARMEL binaries on your PC. You have to compile your app for X86 target to debug it on your PC in Xephir environment (N900-like UI).
Sorry for being blunt, but you're wrong.

Proof:
Code:
[sbox-FREMANTLE_ARMEL: ~/test] > cat test.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
	printf("Hello world!\n");
	exit(EXIT_SUCCESS);
}

[sbox-FREMANTLE_ARMEL: ~/test] > gcc test.c -o test

[sbox-FREMANTLE_ARMEL: ~/test] > file test
test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped

[sbox-FREMANTLE_ARMEL: ~/test] > ldd test
	libc.so.6 => /lib/libc.so.6 (0x00000000)
	/lib/ld-linux.so.3 => /lib/ld-linux.so.3 (0x00000000)

[sbox-FREMANTLE_ARMEL: ~/test] > ./test
Hello world!
FREMANTLE_ARMEL environment uses qemu to run ARM binaries on your PC. They are started in the same environment, so they can access Xephyr aswell.
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 

The Following 3 Users Say Thank You to smoku For This Useful Post:
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#9
Originally Posted by ceefour View Post
This confuses me, so what's the use of X86 target if I can just use ARMEL for everything?
There are edge cases, which qemu can't handle and crashes. (ie. self-modyfing code)
But it's being improved: http://meego.gitorious.org/qemu-maemo , so it should get better.

And you cannot reliably debug ARM binaries running on qemu emulation. You need to do it on X86 target, or put ARM binary on device and attach gdb there.

And most of all - native X86 binaries run faster, without processor emulation (even so fast as qemu provides).
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N

Last edited by smoku; 2010-03-31 at 15:08.
 

The Following User Says Thank You to smoku For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:46.