building android custom kernel for emulator - Code a World
building android custom kernel for emulator
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