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. MediaScannerConnection

MediaScannerConnection provides a way to add a newly created (audio)
file to the phone's mediastore. However, I am wondering how to tell
the mediastore that the application deleted an (audio) file and
therefore is not available anymore ?

--~--~---------~--~----~------------~-------~--~----~

2. VerifyError with Maps Add-ons

After the first time I (re)install a new APK sometimes I get
VerifyErrors when an Activity references another Activity that extends
MapActivity.  The app will crash, and then when I restart it it works
fine.

This is only on 1.5 targets with the google API addons (target 3).  If
anyone has any suggestions please let me know.

Here is the logcat:
05-07 15:44:32.024: WARN/dalvikvm(16630): Unable to resolve superclass
of Lcom/tunewiki/lyricplayer/android/community/maps/MusicMapActivity;
(210)
05-07 15:44:32.024: WARN/dalvikvm(16630): Link of class 'Lcom/tunewiki/
lyricplayer/android/community/maps/MusicMapActivity;' failed
05-07 15:44:32.024: ERROR/dalvikvm(16630): Could not find class
'com.tunewiki.lyricplayer.android.community.maps.MusicMapActivity',
referenced from method
com.tunewiki.lyricplayer.android.player.VideoPlayer.launchMusicMap
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY: unable to resolve const-
class 464 (Lcom/tunewiki/lyricplayer/android/community/maps/
MusicMapActivity;) in Lcom/tunewiki/lyricplayer/android/player/
VideoPlayer;
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY:  rejecting opcode 0x1c
at 0x0004
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY:  rejected Lcom/tunewiki/
lyricplayer/android/player/VideoPlayer;.launchMusicMap ()V
05-07 15:44:32.024: WARN/dalvikvm(16630): Verifier rejected class Lcom/
tunewiki/lyricplayer/android/player/VideoPlayer;
05-07 15:44:32.024: WARN/dalvikvm(16630): Class init failed in
newInstance call (Lcom/tunewiki/lyricplayer/android/player/
VideoPlayer;)
05-07 15:44:32.024: DEBUG/AndroidRuntime(16630): Shutting down VM
05-07 15:44:32.034: WARN/dalvikvm(16630): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
05-07 15:44:32.214: ERROR/AndroidRuntime(16630): Uncaught handler:
thread main exiting due to uncaught exception
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):
java.lang.VerifyError:
com.tunewiki.lyricplayer.android.player.VideoPlayer
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
java.lang.Class.newInstanceImpl(Native Method)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
java.lang.Class.newInstance(Class.java:1472)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.os.Looper.loop(Looper.java:123)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):     at
dalvik.system.NativeStart.main(Native Method)

Thanks,
Zach
--~--~---------~--~----~------------~-------~--~----~

3. canvas and android.graphics.camera 3d rotation issue

4. Settings.Secure.getInt got wrong value in AdbSettingsObserver

5. How to prevent Failed Binder Transaction

6. How to get Application Name from the process?

7. virgin map