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. UAC based on sip

Hi

I need to implement an user agent at the client side based on SIP, who does
Registeration and Invite in Java on Android 2.3. Can any body please help
with some sample example. Prompt answer will really be appreciated, as it is
very urgent.

Thanks

-- 

2. Problems with getting signal strength

Hello everyone,

I'm trying to get strength of current signal in GSM networks, tried to code
it by myself, then looked at some tutorial, but still can't get it to work.
Here is what I have right now.

public class TestActivity extends Activity{
     private MyPhoneStateListener m_psl;
     private TelephonyManager m_tm;

     @Override
     protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          m_tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
          m_psl = new MyPhoneStateListener();
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_CELL_LOCATION);
    }

     @Override
     protected void onDestroy() {
          super.onDestroy();
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_NONE);
     }

     @Override
     protected void onPause() {
          super.onPause();
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_NONE);
     }

     @Override
     protected void onResume() {
          super.onResume();
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
          m_tm.listen(m_psl, PhoneStateListener.LISTEN_CELL_LOCATION);
     }

     private class MyPhoneStateListener extends PhoneStateListener{

          @Override
          public void onSignalStrengthsChanged(SignalStrength
signalStrength){
               super.onSignalStrengthsChanged(signalStrength);
               Toast.makeText(getApplicationContext(), "Signal strength is
now "+signalStrength.getGsmSignalStrength(), Toast.LENGTH_SHORT).show();
          }

          @Override
          public void onCellLocationChanged(CellLocation location) {
               super.onCellLocationChanged(location);
               Toast.makeText(getApplicationContext(), "Current cell
location changed", Toast.LENGTH_SHORT).show();
          }
     };
}

Tried on on Nexus One 2.1 and 2.2 and I still get the signal strength toast
only when I start/resume the application. When the application is running, I
receive onCellLocationChanged toasts while I move around, which is fine and
how it's suppose to be, but the signal strength toast is not showing even
when I see the signal strength changing in the task bar. I know this is a
common goal so I suppose there must be some mistake in my code or some way
to achieve this.

Thanks for all your replies.
Best regards,
Filip Havlicek

-- 

3. Your expert advice

4. SIP Client Registeration

5. apk installation error

6. Change App Widget size from code before loading it

7. Android menyambut Tahun Baru Impleks