How to regenerate bionic/libc/common/kernel headers for linux kernel v2.6.30

by Elvis Dowson » Thu, 23 Jul 2009 20:35:50 GMT


Sponsored Links
 i,
I'm working on trying to port android to linux-omap-2.6.30
kernel version. I've managed to successfully compile the kernel image.
When performing the port to a new kernel version, the bionic/libc
headers also require an update to linux kernel 2.6.30.

I was wondering if someone would be able to validate the changes and
modifications that I have made so far, and suggest some better fixes,
for example, I've had to disable boot animation, to get the
compilation to proceed, due to a linker error. Since this is a first
iteration, at this port, I thought it was acceptable just to try to
see how far it goes. I haven't tested it yet, but was wondering if
someone would be interested in trying this out in parallel, and get
android 1.5 SDK running on android-2.6.30 kernel version.

The reason for attempting this is to update the kernel version for the
gumstix overo, to better take advantage of the power management
functionality currently under development in kevin hilman's linux-omap-
pm pm branch.

Best regards,

Elvis

Technote android-2.6.30-001: How to regenerate bionic/libc/common/
kernel headers for linux kernel v2.6.30

Overview

This document describes how to update the android/bionic/libc/kernel
headers to linux kernel v2.6.30.

Procedure

Step 01.00: Backup the existing android/bionic/libc folder.

You will need the following header files from the existing v2.6.29
linux kernel headers at a later step:

android-alarm.h
android-pmem.h
android_power.h
ashmem.h
binder.h
msm_adsp.h
msm_audio.h
msm_mdp.h
keychord.h

Step 02.00: Clean up the existing android/bionic/libc/kernel folder.

Delete the contents of the following folders

android/bionic/libc/kernel/arch-arm
android/bionic/libc/kernel/arch-x86
android/bionic/libc/kernel/common

Step 03.00: Copy the required linux kernel v2.6.30 headers to the
android/bionic/libc/kernel/original folder.

[TODO: Insert steps on how to clone linux-omap-2.6 git repository and
switch to the omap-2.6.30 branch].

Copy the contents of the following folder to the specific target
location:

linux-omap-2.6/include/asm-generic to android/bionic/libc/kernel/
original/
linux-omap-2.6/include/linux to android/bionic/libc/kernel/original/
linux-omap-2.6/include/mtd to android/bionic/libc/kernel/original/

Step 04.00: Generate the clean linux headers.

Run the tools/update_all.py script to generate the clean linux
headers.

$ cd android/bionic/libc/kernel
$ tools/update_all.py

This will generate the headers into the android/bionic/libc/kernel/
common folder.

Step 05.00: Copy the following headers from the backup v2.6.29 bionic/
libc/kernel/common/linux folder to the new android/bionic/libc/kernel/
common/linux folder.

android-alarm.h
android-pmem.h
android_power.h
ashmem.h
binder.h
msm_adsp.h
msm_audio.h
msm_mdp.h
keychord.h

Step 06.00: Copy the architecture-specific headers.

Copy the contents of the architecture-specific asm folders to the
following target location:

linux-omap-2.6/arch/arm/include/asm to android/bionic/libc/kernel/arch-
arm/
linux-omap-2.6/arch/x86/include/asm to android/bionic/libc/kernel/arch-
x86/

Step 07.00: Delete the contents of the android/out folder.


Step 08.00: Build the android sdk.

$ cd android
$ make -j4

Step 09.00: Apply the following patches for the errors that pop up
during the build process.


Fixes for errors that can come up during compilation




Other Threads

1. MapView in SDK 1.5

Hi all,

I've just downloaded the Cupcake SDK. I'm afraid I can't find MapView
anymore... Any help?

Thanks
--~--~---------~--~----~------------~-------~--~----~

2. res PNG filesize inflated upon packaging

I've got ~200 png files in the /res/drawable folder, mostly interface
and sprite sheet stuff. They're all indexed pngs, and weigh in at a
grand total of a bit over 400kb.

When I run aapt to package them into the apk, their filesize nearly
doubles. Opening the apk up with 7zip and extracting the drawables
confirms it: 790kb.

Does anyone have any idea why this would be happening? I thought the
packaging process was meant to compress the pngs, not inflate them! :P

Cheers,
Tom
--~--~---------~--~----~------------~-------~--~----~

3. Support for iterations in xml view - Dynamic Data display

4. Template ROW using xml and api

5. AOP support

6. xml view defination to take event handler class name

7. updating a view based on another view