Compile Android for several architectures

31 views
Skip to first unread message

arturo.di...@gmail.com

unread,
Dec 28, 2007, 12:51:18 PM12/28/07
to Android Internals
Hello all,

I am a completely newbie with the android platform and more interested
in the internals than in developing applications. I have just
downloaded the android-emulator, android-sdk, android-kernel and a
generic linux kernel from kernel.org (same version as the android
one).

I need to compile the kernel to support architectures like ARM and
MIPS (I know that the kernel in th emulator is already compiled for
ARM, but i want to do it myself). I have started to compile the
android-emulator by running 'build_emulator' that easy!!!... the
problem comes when i try to launch the emulator: SDL init failure. I
copied the system files from the android sdk, that is inside tools/lib/
* to the same folder as the just compiled emulator and the command
line:
./emulator -system lib/images

Could anyone help me?

My next milestones would be:
. take a generic linux kernel, apply the patch compared with the
android kernel and compile it for ARM, MIPS, and other
. run the emulator with those kernels using the system.img and
userdata.img files from android

Thanks all in advance.

Arturo Díaz

Bryan Wu

unread,
Dec 28, 2007, 1:23:25 PM12/28/07
to android-...@googlegroups.com
On Dec 29, 2007 1:51 AM, arturo.di...@gmail.com

<arturo.di...@gmail.com> wrote:
>
> Hello all,
>
> I am a completely newbie with the android platform and more interested
> in the internals than in developing applications. I have just
> downloaded the android-emulator, android-sdk, android-kernel and a
> generic linux kernel from kernel.org (same version as the android
> one).
>
> I need to compile the kernel to support architectures like ARM and
> MIPS (I know that the kernel in th emulator is already compiled for
> ARM, but i want to do it myself). I have started to compile the
> android-emulator by running 'build_emulator' that easy!!!... the
> problem comes when i try to launch the emulator: SDL init failure. I
> copied the system files from the android sdk, that is inside tools/lib/
> * to the same folder as the just compiled emulator and the command
> line:
> ./emulator -system lib/images
>
> Could anyone help me?
>
> My next milestones would be:
> . take a generic linux kernel, apply the patch compared with the
> android kernel and compile it for ARM, MIPS, and other

Android kernel is for emulator or a Qualcomm's MSM chip kernel version
from git.kernel.org.
It is not for other chip, architecture and platform. So cross
compiling currently
Android kernel to ARM, MIPS or others is useless.

Actually, any functional 2.6.23 kernel can support Android. For
example, if you have a
2.6.23.y kernel for MIPS board, that's OK. No need to porting the
Android kernel.

> . run the emulator with those kernels using the system.img and
> userdata.img files from android
>

This is also impossible.
The system.img and userdata.img only contains the prebuilt binary
executives and libs.
Without source code, you can not get the right binary things for your
target such as MIPS.
And the all imgs are for ARM v5 ISA, even ARM v4 ISA chips can not run
Android applications.

So real porting should be waiting for Google releasing the complete
source code of Android.

-Bryan Wu

---
Blackfin Linux Kernel Maintainer
http://blackfin.uclinux.org

Reply all
Reply to author
Forward
0 new messages