Android4.4 compiling a custom kernel

Source: Internet
Author: User

1. Download Kernel Source: https://android.googlesource.com/kernel/goldfish/

Download goldfish-android-goldfish-3.4.tar.gz (I am the source of Android4.4)


2. Create a new kernel folder in the Android source directory

$ mkdir Kernel

Unzip goldfish-android-goldfish-3.4.tar.gz to kernel folder


3. Export the cross-compilation tool directory to the $PATH environment variable.

$ VI ~/.BASHRC

Input content: Export path= $PATH: ~/android/4.4/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin


4. Modify the makefile file to find these two lines:

ARCH = $ (subarch)
Cross_compile = $ (config_cross_compile: "%" =%)

Comment out and then change to

#ARCH? = $ (Subarch)
#CROSS_COMPILE = $ (config_cross_compile: "%" =%)
ARCH? = Arm
Cross_compile? = arm-eabi-


5. $ make Goldfish_armv7_defconfig

$ make-j8

After compiling, the Zimage kernel file will be generated in the Kernel/arch/arm/boot directory.


6. Run the emulator with your own compiled kernel:

[Email protected]:~/android/4.4$ emulator-partition-size 1024-kernel/kernel/arch/arm/boot/zimage-system./out/ Target/product/generic/system.img-data./out/target/product/generic/userdata.img-ramdisk./out/target/product/ Generic/ramdisk.img

Android4.4 compiling a custom kernel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.