码迷,mamicode.com
首页 > 其他好文 > 详细

Building and booting Nexus 5 kernel

时间:2017-12-26 14:22:05      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:-o   nload   not run   ali   tom   out   clone   kitkat   ken   

1. Downloading toolchain and setup.

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/

2. Downloading kernel source code :

$git clone https://android.googlesource.com/kernel/msm.git
looking into kernel version : 3.4.0-gd59db4e
$git checkout -b android-msm-hammerhead-3.4-kitkat-mr1 origin/android-msm-hammerhead-3.4-kitkat-mr1

switch to this branch; otherwise doesn't compile yet.
$make ARCH=arm SUBARCH=arm hammerhead_defconfig
$make -j16 ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi- 2>&1 |tee kernel_make.out
alias makenexus5="make -j16 ARCH=arm KCFLAGS=-ggdb3 CROSS_COMPILE=arm-eabi-"

```
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
CAT     arch/arm/boot/zImage-dtb
Kernel: arch/arm/boot/zImage-dtb is ready
```

3. Repacking Android image:

https://github.com/xiaolu/mkbootimg_tools.git

4. Flashing the custom kernel

let's try and check if it works or not.
Connect your phone using USB cable to your PC, 
be sure that you have USB debugging enabled.

$ adb start-server
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
$ adb reboot bootloader
$ fastboot flash boot boot.img

ref :

http://marcin.jabrzyk.eu/posts/2014/05/building-and-booting-nexus-5-kernel
http://pete.akeo.ie/2013/10/compiling-and-running-your-own-android.html

Building and booting Nexus 5 kernel

标签:-o   nload   not run   ali   tom   out   clone   kitkat   ken   

原文地址:https://www.cnblogs.com/bittorrent/p/8117174.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!