building android custom kernel for emulator - Code a World

building android custom kernel for emulator

PengLiang posted @ 2011年7月01日 11:00 in Android , 3085 阅读

    1. Clone the android kernel source from android.git.kernel.org
        #git clone git://android.git.kernel.org/kernel/common.git


    2. Check out the emulator branch
        #git checkout -t origin/android-goldfish-2.6.29 -b goldfish


    3. Generate the kernel configuration for emulator
        #make ARCH=arm goldfish_defconfig
    or get a config copy from a exist emulator rom.
        #adb pull /proc/config.gz


    4. Edit the .config file, set the custom option, like enable uinput module
        CONFIG_INPUT_UINPUT=y


    5. Compile the kernel using cross toolchain (you can get prebuilt cross toolchain from android source repo or just
        #git clone git://android.git.kernel.org/platform/prebuilt.git  all platform cross chain are there.)
        #make ARCH=arm CROSS_COMPILE=prebuilt/YOUR_PLATFORM/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
        
    6. Now, the kernel built is in the arch/arm/boot/ folder.   You can start the emulator with this kernel
        #emulator -avd YOUR_AVD -kernel ANDROID_KERNEL_PATH/arch/arm/boot/zImage
 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee