Is an emulator a real quemu withl ARM-linux ???

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Is an emulator a real quemu withl ARM-linux ???

Postby eugenk » Sun Feb 03, 2008 3:30 am

Hi ALL ! Sorry for my disgusting English, and sorry if my message will be found offtopic. Today I first time have read documentation about emulator, and find out many interesting things. For example, that emulator creates internal flash ROM image userdata.img in \Documents and Settings\<user>\Local Settings\Application Data\Android. The second surprising thing, that it has "-qemu" option. When I saw that, I at once went to \Application Data\Android, to look image file. And what was I surprised, when find the next dump fragment:
================================================
11dffb0c ad00cd50 /system/lib/libdvm.so
11dffb10 00000001
11dffb14 00127fe0 [heap]
11dffb18 00000000
11dffb1c 00000000
11dffb20 ad0646bc /system/lib/libdvm.so
11dffb24 00000004
11dffb28 4000b8e0
11dffb2c ad065378 /system/lib/libdvm.so
===============================================

There is linux so-libraries in ROM image !!! But much more surprised was the second fragment:
=================================================
pid: 472, tid: 568 >>> system_server <<<
signal 11 (SIGSEGV), fault addr 00000042
r0 0019bd38 r1 00000007 r2 0017f708 r3 00000042
r4 00127f70 r5 0019bd38 r6 ad3490a0 r7 ad021fb1
r8 40152a18 r9 00000000 10 11dffce8 fp 00001866
ip ad0646f4 sp 11dffbc0 lr ad32726f pc 00000042 cpsr 00000010
================================================
It is ARM registers names !!! Рrobably qemu crashes and dumps crashlog. So I understand that emulator is qemu based product, and it emulates not only linux, but ARM !!! I thing early, that emulator is usual Java application, for modeling some other Java-environment. But now, I cannot understand, how emulator can works with so fantastic speed ??? Now I develop rather complex application, based on OpenGL. And it runs so fast, that it is possible to look picture without any anger ! And it is qemu !!!

The second question. If we have a valuable linux on emulator, have somebody tried to setup some linux programs ? For example, I want "midnight commander", "gdb", "less"... When I run "adb shell" i find out only "sh", "ls", "pwd", and "cat". It is much better that nothing but I want have usual linux environment, in "adb" if it works with real linux.

Third question. Does somebody know, how to compile for Android from C/C++ ? What CPU type ? What memory mapping, etc. Very desirable will to have headers. It will be very convenient to have standard linux utilities on emulator and "adb".

Once more, sorry if this matter is offtopic. I don't want place it on http://code.google.com/android/ forum, because http://www.anddev.org/ seems me much more competent and practically useful.

Regards
Eugene.
eugenk
Developer
Developer
 
Posts: 29
Joined: Wed Jan 30, 2008 8:07 pm
Location: Russian Federation, Moscow

Top

Postby don » Sun Feb 03, 2008 4:26 am

This answer is way above my skill level, so if anyone disagrees, please correct me! However, my understanding is that Android runs on Java syntax code compiled in Dalvik byte code (I seem to remember an interesting article about how Google was able to get around Java's licenses on JME by compiling to something other than Java ByteCode). If understand this correctly, it means that there is not a way to code Android apps in C/C++ (unless perhaps if you wrote a compiler to compile the C into Dalvik).

As for your other questions, I have no idea. I am very new to embedded apps, so I know very little about ARM processors and such. Also, a bit of a Linux newb, though I am working on that one.

I know this wasn't very helpful (and potentially wrong -- seriously if I am, please correct me. I would hate to be the source of incorrect information), but maybe your questions about ARM and Linux will be more fruitful.

Good Luck!
don
Junior Developer
Junior Developer
 
Posts: 18
Joined: Fri Dec 07, 2007 5:17 am

Postby eugenk » Tue Feb 05, 2008 6:04 am

Thank, don ! I solve this already ! Emulator indeed is ARM-linux system on qemu. Furthermore, I install ARM-linux toolchain, compile simple "Hello World" C-program and successfully run it with adb. By the way. This means, that it is impossible to use simple application-embedded profiling tools, based on RTDSC Pentium instruction. It is pity... :(
eugenk
Developer
Developer
 
Posts: 29
Joined: Wed Jan 30, 2008 8:07 pm
Location: Russian Federation, Moscow

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests