Android: Download kernel source and compile, package

Source: Internet
Author: User

One, the Android kernel source code download:

1.Google git address:

$ git clone  https://android.googlesource.com/kernel/common.git  

$ git clone https://android.googlesource.com/kernel/exynos.git

$ git clone https://android.googlesource.com/kernel/goldfish.git

$ git clone https://android.googlesource.com/kernel/msm.git

$ git clone https://android.googlesource.com/kernel/omap.git

$ git clone https://android.googlesource.com/kernel/samsung.git

$ git clone https://android.googlesource.com/kernel/tegra.git   

2. Tsinghua server address:

 git clone https://aosp.tuna.tsinghua.edu.cn/kernel/common.git
 git clone  Https://aosp.tuna.tsinghua.edu.cn/kernel/exynos.git
 git clone https:// Aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git
 git clone https://aosp.tuna.tsinghua.edu.cn/ Kernel/hikey-linaro.git
 git clone https://aosp.tuna.tsinghua.edu.cn/kernel/lk.git
  Git clone https://aosp.tuna.tsinghua.edu.cn/kernel/msm.git
 git clone https:// Aosp.tuna.tsinghua.edu.cn/kernel/omap.git
 git clone https://aosp.tuna.tsinghua.edu.cn/ Kernel/samsung.git
 git clone https://aosp.tuna.tsinghua.edu.cn/kernel/tegra.git
  Git clone https://aosp.tuna.tsinghua.edu.cn/kernel/x86_64.git

Goldfish This project contains the source code suitable for the simulator platform;
MSM This project contains the source code for ADP1, ADP2, Nexus One, Nexus 4, and can be used as a starting point for the development of custom kernels for the high-pass MSM chipset;
Omap This project contains the source code suitable for the PandaBoard, Galaxy Nexus, and can be used as the starting point for the development of the Texas Instruments OMAP chipset core custom work;
Samsung this project contains the source code suitable for Nexus S and can be used as the starting point for the development of custom work for the Samsung Hummingbird chipset core;
Tegra This project contains the source code for the Xoom and Nexus 7, and can be used as the starting point for the NVIDIA Datu chipset core development customization work;
Exynos This project contains the source code for the Nexus 10, and can be used as a starting point for custom work in the Samsung Orion chipset core development.

Second, compile:
1. The code base download after the corresponding directory can be seen through ls-al. Git, git branch-a view all branches, I hand Nexus tablet brush Android5.0 system, all select the following kernel version:

  git checkout Remotes/origin/android-tegra-flounder-3.10-lollipop-release

2. After the branch code is downloaded:

(1) Modify Makefile:

#ARCH? = $ (Subarch)
#CROSS_COMPILE = $ (config_cross_compile: "%" =%)

Modified to:

ARCH? = Arm
Cross_compile? = arm-eabi-

(2) Configuration:

kernel/xxx/arch/arm/configs/, there are many configuration files under the directory
Make Tegra_defconfig, select the default configuration, and then generate the. config
Make menuconfig, this command allows you to further configure kernel updates. config


(3) Compile:

Once the kernel is configured, you can enter: Make, waiting for the zimage to be generated.

Three, packaging zimage to boot.img, and brush machine:

# Download the Unpacking tool https://Github.com/derekhe/u8825d-bootimg-scripts# Unzip to any place, get the boot.img you're using from your phone and put it in the extracted directory #1. Unzip the existing boot.img./unpack-bootimg.pl boot.img
#2. Copy the compiled Zimage file to this directory, and the path itself determinesCp.. /arch/arm/boot/zimage./
#3mv Boot.img boot.img.bak./ repack-bootimg.pl zimage boot.img-ramdisk boot.img
# 4adb reboot./fastboot devices./fastboot Erase Boot./fastboot Flash boot boot.img
./fastboot reboot

if the boot is congratulation!!! ^v^

Android: Download kernel source and compile, package

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.