Compile of Android Kernel and Android OS

363 views
Skip to first unread message

muasif80

unread,
Jan 13, 2011, 6:53:11 AM1/13/11
to Android Linux Kernel Development
I would like to know the difference if any between Android Kernel
compiling and Android OS compiling.

Secondly if I want to compile Android OS with some default general
configurations then where I can get help for it. I have gone through
the source.android.com getting source and I have actually downloaded
the source using

repo sync command

After this I have no clue what to do. The info on source.android.com
is not enough for a beginner to understand the process completely.

I have actually got errors while compiling and those errors are not
understandable for me.

So I need help to successfully compile the Android OS and if Android
Kernel is something different from Android OS then I want to know
about this difference as well.

Can anyone help me please? I will be very thankful to any help.

Regards,
Asif

MS

unread,
Jan 13, 2011, 6:07:22 PM1/13/11
to android...@googlegroups.com
I agree. The documentation is severely lacking and outdated. Trying to get up and running is very tough. Thanks to all the people in this group who help

Mike

ashutosh deshmukh

unread,
Jan 13, 2011, 11:20:43 PM1/13/11
to android...@googlegroups.com
When you download using repo sync, you will not get "kernel". Actually, Android uses Linux kerenel for its Process management, low level I/O management. If you obtain the source code for a specific Board for e.g TI's OMaP3430 Board, than TI will provide kerenel code which will run on their boards.
 
But if you have alrady downloaded the souce code, than you can still build the Android OS.
You can try with Build command "make sdk", which will build the necessary Android image and sdk tools such as emulator,adb of android.
 
There are differnt google groups such as android-platform, android-porting, android-kernel on which you can post your issues, and discuss with Android community.
 
Hope this helps,


 



--
Thanks,
Ashutosh  Deshmukh
 
 

muasif80

unread,
Jan 18, 2011, 11:58:33 AM1/18/11
to Android Linux Kernel Development
I am at the moment researching a lot about this. I have seen a few
places where a device was to be attached with the computer in order to
compile the source for that device. Can anyone elaborate on this? That
is whether it is a must that you have to have an android phone
available to you in order to compile the AOSP.

Regards,
Asif

On Jan 14, 9:20 am, ashutosh deshmukh
<ashutosh.deshmukh2...@gmail.com> wrote:
> When you download using repo sync, you will not get "kernel". Actually,
> Android uses Linux kerenel for its Process management, low level I/O
> management. If you obtain the source code for a specific Board for e.g TI's
> OMaP3430 Board, than TI will provide kerenel code which will run on their
> boards.
>
> But if you have alrady downloaded the souce code, than you can still build
> the Android OS.
> You can try with Build command "make sdk", which will build the necessary
> Android image and sdk tools such as emulator,adb of android.
>
> There are differnt google groups such as android-platform, android-porting,
> android-kernel on which you can post your issues, and discuss with Android
> community.
>
> Hope this helps,
>
> On 13 January 2011 03:53, muasif80 <muasi...@gmail.com> wrote:
>
>
>
> > I would like to know the difference if any between Android Kernel
> > compiling and Android OS compiling.
>
> > Secondly if I want to compile Android OS with some default general
> > configurations then where I can get help for it. I have gone through
> > the source.android.com getting source and I have actually downloaded
> > the source using
>
> > repo sync command
>
> > After this I have no clue what to do. The info on source.android.com
> > is not enough for a beginner to understand the process completely.
>
> > I have actually got errors while compiling and those errors are not
> > understandable for me.
>
> > So I need help to successfully compile the Android OS and if Android
> > Kernel is something different from Android OS then I want to know
> > about this difference as well.
>
> > Can anyone help me please? I will be very thankful to any help.
>
> > Regards,
> > Asif
>
> > --
> > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsu...@googlegroups.com>

Virgil

unread,
Jan 20, 2011, 8:38:24 PM1/20/11
to Android Linux Kernel Development
Is there any place where one can find an up-to-date how-to kernel
compilation? Lacking documentation is an understatement. I would be
particularly interested in compiling the kernel on MAC OS snow
leopard... which is not supported according the the wiki, but actually
supported...

Regards,
Virgil
> > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go oglegroups.com>

Greg KH

unread,
Jan 21, 2011, 2:12:01 PM1/21/11
to android...@googlegroups.com
On Thu, Jan 20, 2011 at 5:38 PM, Virgil <vir...@maginatics.com> wrote:
> Is there any place where one can find an up-to-date how-to kernel
> compilation? Lacking documentation is an understatement.

What? Have you read the documentation provided? What is wrong with
it? The kernel comes with TONS of free documentation, and there are
free books (look for Linux Kernel in a Nutshell which details how to build
a kernel, it is free online.)

> I would be
> particularly interested in compiling the kernel on MAC OS snow
> leopard... which is not supported according the the wiki, but actually
> supported...

No, that's not supported at all, sorry. Use a Linux machine to build
the kernel, that's the only way.

good luck,

greg k-h

A Curtis

unread,
Jan 24, 2011, 1:50:52 AM1/24/11
to Android Linux Kernel Development
> > Is there any place where one can find an up-to-date how-to kernel
> > compilation? Lacking documentation is an understatement.
>
> What?  Have you read the documentation provided?  What is wrong with
> it?  The kernel comes with TONS of free documentation, and there are
> free books (look for Linux Kernel in a Nutshell which details how to build
> a kernel, it is free online.)
>
> > I would be
> > particularly interested in compiling the kernel on MAC OS snow
> > leopard... which is not supported according the the wiki, but actually
> > supported...
>
> No, that's not supported at all, sorry.  Use a Linux machine to build
> the kernel, that's the only way.


I believe I just worked through this problem.

1. Follow the instructions in NDK-5 to setup a stand-alone compiler

2. Get a copy of elf.h from Linux and copy it to /usr/include

3. Comment out #include <features.h> in elf.h

Now follow the normal Linux build procedure of setting ARCH,
CROSS_COMPILE and kernel configuration.

Steve Modica

unread,
Jan 24, 2011, 8:07:52 AM1/24/11
to android...@googlegroups.com
This page has a better elf solution. I'm using it.
We build the kernel on Mac OS.

Steve

http://plattanimattan.blogspot.com/2010/04/cross-compiling-linux-on-mac-osx.html

--
Steve Modica
CTO - Small Tree Communications
www.small-tree.com
phone: 651-209-6509 ext 301
mobile: 651-261-3201


Virgil Mihailovici

unread,
Jan 26, 2011, 1:11:57 PM1/26/11
to android...@googlegroups.com, Steve Modica
Thank for all the pointers, I gave up on MacOS compilation for now, I'm
sure it can be done, but I'm not willing to spend the time right now, I'll
just use a VM.

I guess I did not phrase the question well though: what I wanted to ask is
how to compile a kernel for the simulator?
I found this
http://linuxclues.blogspot.com/2010/05/build-compile-linux-kernel-android.h
tml

So I guess the answer to my question would be: the latest kernel that runs
on the simulator is the goldfish kernel 2.6.29, which is more than 1 year
old (almost two actually). Is that correct?

Thanks again,
Virgil

Reply all
Reply to author
Forward
0 new messages